/* Reset a základní styly */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Barvy */
    --primary: #FF6B6B;
    --primary-dark: #DC2626;
    --secondary: #1A1A1A;
    --secondary-light: #2D2D2D;
    --accent: #4ECDC4;
    --background: #0A0A0A;
    --surface: #141414;
    --surface-light: #1F1F1F;
    --text: #FFFFFF;
    --text-muted: #A0A0A0;
    --border: #333333;
    
    /* Gradienty */
    --gradient-primary: linear-gradient(135deg, #FF6B6B 0%, #DC2626 100%);
    --gradient-dark: linear-gradient(180deg, #1A1A1A 0%, #0A0A0A 100%);
    --gradient-surface: linear-gradient(135deg, #1F1F1F 0%, #141414 100%);
    
    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 2rem;
    --space-lg: 3rem;
    --space-xl: 4rem;
    --space-2xl: 6rem;
    
    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    
    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.3);
    --shadow-glow: 0 0 40px rgba(255, 107, 107, 0.3);
    
    /* Animations */
    --transition-fast: 0.2s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* Base */
html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    background-color: var(--background);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 900;
}

h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
}

h3 {
    font-size: clamp(1.5rem, 3vw, 2rem);
}

p {
    color: var(--text-muted);
    font-size: 1.1rem;
    line-height: 1.8;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--primary-dark);
}

/* Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--space-md);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    transition: all var(--transition-base);
    cursor: pointer;
    border: none;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 20px rgba(255, 107, 107, 0.3);
}

.btn-primary:hover {
    box-shadow: 0 6px 30px rgba(255, 107, 107, 0.4);
    transform: translateY(-2px);
}

.btn-secondary {
    background: var(--surface);
    color: var(--text);
    border: 2px solid var(--border);
}

.btn-secondary:hover {
    background: var(--surface-light);
    border-color: var(--primary);
    color: var(--primary);
}

.btn-block {
    width: 100%;
    justify-content: center;
}

/* Gradient Text */
.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 1000;
    padding: 1rem 0;
    transition: all var(--transition-base);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand a {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    text-decoration: none;
}

.logo-img {
    width: 45px;
    height: 45px;
    border-radius: 10px;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: nowrap;
}

.nav-link {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.9rem;
    padding: 0.4rem 0.6rem;
    transition: color var(--transition-fast);
    position: relative;
    white-space: nowrap;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: width var(--transition-base);
}

.nav-link:hover {
    color: var(--text);
}

.nav-link:hover::after {
    width: 100%;
}

.nav-button {
    padding: 0.5rem 1rem;
    background: var(--gradient-primary);
    color: white;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all var(--transition-base);
    white-space: nowrap;
}

.nav-button:hover {
    box-shadow: 0 4px 20px rgba(255, 107, 107, 0.3);
    transform: translateY(-1px);
    color: white;
}

/* Login Section */
.login-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: var(--space-2xl) 0;
    position: relative;
    overflow: hidden;
}

.login-bg {
    position: absolute;
    inset: 0;
    z-index: -1;
}

.login-gradient {
    position: absolute;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 30% 30%, rgba(255, 107, 107, 0.15) 0%, transparent 50%),
                radial-gradient(circle at 70% 70%, rgba(78, 205, 196, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 50% 50%, rgba(220, 38, 38, 0.05) 0%, transparent 70%);
    animation: gradient-shift 20s ease-in-out infinite;
}

@keyframes gradient-shift {
    0%, 100% { transform: scale(1) rotate(0deg); }
    33% { transform: scale(1.1) rotate(120deg); }
    66% { transform: scale(0.9) rotate(240deg); }
}

.login-pattern {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 30px 30px;
    animation: float 30s linear infinite;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(-20px, -20px); }
}

.login-container {
    max-width: 1200px;
    margin: 0 auto;
    background: var(--surface);
    border-radius: 24px;
    border: 1px solid var(--border);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-header {
    text-align: center;
    padding: var(--space-xl) var(--space-lg) var(--space-lg);
    border-bottom: 1px solid var(--border);
    background: linear-gradient(180deg, rgba(255, 107, 107, 0.05) 0%, transparent 100%);
}

.login-title {
    font-size: 2.5rem;
    margin-bottom: var(--space-sm);
}

.login-subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* Tabs */
.login-tabs {
    display: flex;
    border-bottom: 1px solid var(--border);
    background: var(--background);
}

.tab-button {
    flex: 1;
    padding: var(--space-md);
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    transition: all var(--transition-base);
    position: relative;
}

.tab-button::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background: var(--gradient-primary);
    transition: width var(--transition-base);
}

.tab-button.active {
    color: var(--text);
}

.tab-button.active::after {
    width: 100%;
}

.tab-button:hover {
    color: var(--text);
    background: rgba(255, 107, 107, 0.05);
}

.tab-icon {
    width: 20px;
    height: 20px;
}

.tab-content {
    display: none;
    padding: var(--space-xl);
    animation: fadeIn 0.4s ease-out;
}

.tab-content.active {
    display: block;
}

/* QR Login */
.qr-login-grid {
    display: grid;
    grid-template-columns: minmax(340px, 520px) 1fr;
    gap: var(--space-xl);
    align-items: start;
}

.qr-left-section {
    display: flex;
    justify-content: center;
    align-items: center;
}

.qr-right-section {
    padding: 0 var(--space-md);
}

.qr-right-section .qr-instructions {
    max-width: 560px;
}

.qr-container {
    position: relative;
    background: white;
    border-radius: 20px;
    padding: var(--space-lg);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    display: inline-block;
    min-width: 320px;
}

.qr-code {
    width: 280px;
    height: 280px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    min-height: 280px;
}

.qr-code canvas {
    border-radius: 12px;
    max-width: 100%;
    height: auto;
}

.qr-loading {
    text-align: center;
    color: #333;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 107, 107, 0.2);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.qr-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(26, 26, 26, 0.95);
    border-radius: 20px;
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

.qr-overlay.show {
    display: flex;
}

.qr-expired {
    text-align: center;
    color: white;
}

.expired-icon {
    width: 60px;
    height: 60px;
    margin-bottom: var(--space-md);
    stroke: var(--primary);
}

.qr-timer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    margin-top: var(--space-md);
    padding: var(--space-sm) var(--space-md);
    background: var(--surface);
    border-radius: 50px;
    color: white;
}

.timer-label {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.timer-value {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--primary);
    font-variant-numeric: tabular-nums;
}

.qr-instructions h3 {
    margin-bottom: var(--space-md);
    color: var(--primary);
}

.instructions-list {
    list-style: none;
    margin-bottom: var(--space-lg);
}

.instructions-list li {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-sm) 0;
    color: var(--text-muted);
}

.step-number {
    width: 32px;
    height: 32px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    flex-shrink: 0;
}

.qr-benefits {
    display: flex;
    gap: var(--space-lg);
    padding: var(--space-md);
    background: rgba(255, 107, 107, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(255, 107, 107, 0.2);
}

.benefit {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    color: var(--text-muted);
}

.benefit-icon {
    width: 20px;
    height: 20px;
    stroke: var(--primary);
}

/* Email Login Form */
.login-form {
    max-width: 400px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: var(--space-md);
}

.form-label {
    display: block;
    margin-bottom: var(--space-xs);
    color: var(--text);
    font-weight: 500;
}

.input-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    stroke: var(--text-muted);
    pointer-events: none;
}

.form-input {
    width: 100%;
    padding: 14px 16px 14px 48px;
    background: var(--background);
    border: 2px solid var(--border);
    border-radius: 12px;
    color: var(--text);
    font-size: 1rem;
    transition: all var(--transition-base);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--surface-light);
}

.form-input::placeholder {
    color: var(--text-muted);
}

.toggle-password {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.eye-icon {
    width: 20px;
    height: 20px;
    stroke: var(--text-muted);
    transition: stroke var(--transition-fast);
}

.toggle-password:hover .eye-icon {
    stroke: var(--text);
}

.eye-icon.hidden {
    display: none;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-lg);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    cursor: pointer;
    color: var(--text-muted);
}

.checkbox-input {
    position: absolute;
    opacity: 0;
}

.checkbox-custom {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border);
    border-radius: 4px;
    position: relative;
    transition: all var(--transition-fast);
}

.checkbox-input:checked + .checkbox-custom {
    background: var(--gradient-primary);
    border-color: var(--primary);
}

.checkbox-input:checked + .checkbox-custom::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 6px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.forgot-link {
    color: var(--primary);
    font-size: 0.9rem;
}

.btn-submit {
    position: relative;
    min-height: 48px;
}

.loading-spinner {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.loading-spinner.hidden {
    display: none;
}

.error-message {
    margin-top: var(--space-md);
    padding: var(--space-sm) var(--space-md);
    background: rgba(220, 38, 38, 0.1);
    border: 1px solid rgba(220, 38, 38, 0.3);
    border-radius: 8px;
    color: #EF4444;
    text-align: center;
    display: none;
}

.error-message.show {
    display: block;
    animation: shake 0.5s;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

.divider {
    text-align: center;
    margin: var(--space-lg) 0;
    position: relative;
}

.divider::before,
.divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: calc(50% - 30px);
    height: 1px;
    background: var(--border);
}

.divider::before {
    left: 0;
}

.divider::after {
    right: 0;
}

.divider span {
    color: var(--text-muted);
    padding: 0 var(--space-md);
    background: var(--surface);
}

.social-login {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    max-width: 400px;
    margin: 0 auto;
}

.social-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: 12px var(--space-md);
    background: var(--background);
    border: 2px solid var(--border);
    border-radius: 12px;
    color: var(--text);
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-base);
}

.social-button:hover {
    border-color: var(--primary);
    background: var(--surface-light);
    transform: translateY(-2px);
}

.social-icon {
    width: 20px;
    height: 20px;
}

.register-link {
    text-align: center;
    margin-top: var(--space-lg);
    padding-top: var(--space-lg);
    border-top: 1px solid var(--border);
}

.register-link p {
    color: var(--text-muted);
}

/* Success Overlay */
.success-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.success-overlay:not(.hidden) {
    opacity: 1;
}

.success-content {
    text-align: center;
    animation: successPop 0.5s ease-out;
}

@keyframes successPop {
    0% {
        transform: scale(0.5);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.success-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto var(--space-lg);
    position: relative;
}

.checkmark {
    width: 100%;
    height: 100%;
    stroke: #10B981;
    stroke-width: 2;
    fill: none;
    animation: drawCheck 0.6s ease-out 0.3s forwards;
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
}

@keyframes drawCheck {
    to {
        stroke-dashoffset: 0;
    }
}

.success-title {
    color: var(--text);
    margin-bottom: var(--space-sm);
}

.success-message {
    color: var(--text-muted);
}

.hidden {
    display: none !important;
}

/* Responsive */
@media (max-width: 768px) {
    .login-container {
        margin: var(--space-md);
    }
    
    .qr-login-grid {
        grid-template-columns: 1fr;
    }
    
    .qr-left-section {
        margin-bottom: var(--space-lg);
    }
    
    .qr-container {
        max-width: 350px;
        margin: 0 auto;
    }
    
    .qr-benefits {
        flex-direction: column;
        gap: var(--space-sm);
    }
    
    .login-tabs {
        flex-direction: column;
    }
    
    .tab-button::after {
        display: none;
    }
    
    .tab-button.active {
        background: rgba(255, 107, 107, 0.1);
        border-left: 3px solid var(--primary);
    }
    
    .nav-menu {
        display: none;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}
