:root {
    --netflix-red: #e50914;
    --netflix-dark-red: #b20710;
    --bg-primary: #0a0a0a;
    --bg-secondary: #1a1a1a;
    --bg-tertiary: #2a2a2a;
    --text-primary: #ffffff;
    --text-secondary: #b3b3b3;
    --border-color: #333333;
    --shadow-light: 0 4px 20px rgba(0,0,0,0.3);
    --shadow-heavy: 0 10px 40px rgba(0,0,0,0.5);
    --border-radius: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('fondo.png') center center no-repeat;
    background-size: cover;
    opacity: 0.1;
    z-index: -1;
    pointer-events: none;
}

.header {
    background: rgba(26, 26, 26, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
    transition: var(--transition);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-title {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.header-title i {
    color: var(--netflix-red);
    font-size: 2rem;
    filter: drop-shadow(0 0 10px rgba(229, 9, 20, 0.3));
}

.header-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.header-btn:hover {
    background: var(--bg-tertiary);
    border-color: var(--netflix-red);
    transform: translateY(-1px);
}

.main-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 80px);
    padding: 2rem 1rem;
}

.card {
    background: rgba(26, 26, 26, 0.9);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 3rem;
    width: 100%;
    max-width: 480px;
    box-shadow: var(--shadow-heavy);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--netflix-red), transparent);
}

.avatar-container {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
    position: relative;
}

.avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--netflix-red);
    box-shadow: 0 0 30px rgba(229, 9, 20, 0.3);
    transition: var(--transition);
}

.avatar:hover {
    transform: scale(1.05);
    box-shadow: 0 0 40px rgba(229, 9, 20, 0.5);
}

.form-container {
    text-align: center;
}

.form-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.form-subtitle {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 2rem;
    font-weight: 400;
}

.input-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.input-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    text-align: left;
}

.input-field {
    width: 100%;
    padding: 1rem 1.25rem;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 400;
    transition: var(--transition);
    outline: none;
}

.input-field:focus {
    border-color: var(--netflix-red);
    background: var(--bg-tertiary);
    box-shadow: 0 0 0 3px rgba(229, 9, 20, 0.1);
}

.input-field::placeholder {
    color: var(--text-secondary);
    opacity: 0.7;
}

.btn-primary {
    width: 100%;
    background: linear-gradient(135deg, var(--netflix-red) 0%, var(--netflix-dark-red) 100%);
    border: none;
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
    padding: 1rem 2rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: var(--transition);
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(229, 9, 20, 0.3);
}

.btn-primary:active {
    transform: translateY(0);
}

/* Modal styles */
.modal-bg {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease-out;
    padding: 1rem;
}

.modal-content {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 2rem;
    max-width: 90vw;
    max-height: 90vh;
    overflow: auto;
    position: relative;
    box-shadow: var(--shadow-heavy);
    animation: modalSlideIn 0.4s ease-out;
}

.modal-header {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 1.5rem;
    padding: 1.5rem 2rem;
    background: linear-gradient(135deg, var(--netflix-red) 0%, var(--netflix-dark-red) 100%);
    border-radius: 20px 20px 0 0;
    margin: -2rem -2rem 1.5rem -2rem;
    position: relative;
    box-shadow: 0 4px 20px rgba(229, 9, 20, 0.3);
}

.modal-logo-container {
    display: flex;
    justify-content: center;
    align-items: center;
    flex: 1;
}

.modal-netflix-logo {
    height: 40px;
    width: auto;
    filter: brightness(0) invert(1);
    opacity: 0.95;
}

.close-modal {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: var(--transition);
    position: absolute;
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
}

.close-modal:hover {
    background: rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-50%) rotate(90deg);
}

.modal-body {
    color: var(--text-primary);
    line-height: 1.6;
}

.loading {
    text-align: center;
    padding: 3rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-color);
    border-top: 3px solid var(--netflix-red);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading-text {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.alert {
    background: rgba(229, 9, 20, 0.1);
    border: 1px solid rgba(229, 9, 20, 0.3);
    border-radius: var(--border-radius);
    padding: 1rem;
    text-align: center;
    color: var(--text-primary);
    font-weight: 500;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@media (max-width: 768px) {
    .header {
        padding: 1rem;
    }

    .header-title {
        font-size: 1.5rem;
    }

    .card {
        padding: 2rem 1.5rem;
        margin: 1rem;
    }

    .modal-content {
        margin: 1rem;
        padding: 1.5rem;
    }

    .avatar {
        width: 100px;
        height: 100px;
    }
}

@media (max-width: 480px) {
    .card {
        padding: 1.5rem 1rem;
    }

    .form-title {
        font-size: 1.25rem;
    }

    .btn-primary {
        padding: 0.875rem 1.5rem;
    }
}