/* Brand Colors */
:root {
    --kohls-purple: #0b243a; /* primary */
    --kohls-magenta: #0b243a; /* unified to primary */
    --kohls-light-purple: #0b243a; /* unified to primary */
    --kohls-accent: #0b243a; /* unified to primary */
    --white: #FFFFFF;
    --light-gray: #F5F5F5;
    --medium-gray: #E0E0E0;
    --dark-gray: #424242;
    --error-red: #D32F2F;
    --success-green: #388E3C;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, var(--kohls-purple) 0%, var(--kohls-magenta) 100%);
    min-height: 100vh;
    color: var(--dark-gray);
}

/* Page Management */
.page {
    display: none;
    min-height: 100vh;
    width: 100%;
}

.page.active {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Login Page */
.container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.login-card {
    background: var(--white);
    border-radius: 20px;
    padding: 50px 40px;
    max-width: 450px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: fadeInUp 0.6s ease-out;
}

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

/* Logo */
.logo-container {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
    position: relative;
    height: 100px;
}

.logo {
    max-width: 200px;
    max-height: 100px;
    object-fit: contain;
    display: none;
}

.logo.loaded {
    display: block;
}

.logo-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 180px;
    height: 80px;
    background: linear-gradient(135deg, var(--kohls-purple), var(--kohls-magenta));
    border-radius: 12px;
    font-size: 36px;
    font-weight: bold;
    color: var(--white);
    letter-spacing: 8px;
}

.logo-placeholder.hidden {
    display: none;
}

/* Title */
.title {
    font-size: 28px;
    font-weight: 600;
    color: var(--kohls-purple);
    text-align: center;
    margin-bottom: 10px;
}

.gradient-kohls {
    background: linear-gradient(135deg, #6B2B84, #9B1B6A);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.subtitle {
    font-size: 16px;
    color: var(--dark-gray);
    text-align: center;
    margin-bottom: 35px;
    opacity: 0.8;
}

/* Form */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.input-group {
    position: relative;
    width: 100%;
}

.password-input {
    width: 100%;
    padding: 16px 50px 16px 20px;
    font-size: 16px;
    border: 2px solid var(--medium-gray);
    border-radius: 12px;
    outline: none;
    transition: all 0.3s ease;
    background: var(--light-gray);
}

.password-input:focus {
    border-color: var(--kohls-purple);
    background: var(--white);
    box-shadow: 0 0 0 4px rgba(11, 36, 58, 0.1);
}

.password-input.error {
    border-color: var(--error-red);
    animation: shake 0.5s;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.toggle-password {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    color: var(--dark-gray);
    opacity: 0.6;
    transition: opacity 0.2s;
}

.toggle-password:hover {
    opacity: 1;
}

.eye-icon {
    width: 22px;
    height: 22px;
}

.error-message {
    color: var(--error-red);
    font-size: 14px;
    text-align: center;
    min-height: 20px;
    margin-top: -10px;
}

.submit-button {
    width: 100%;
    padding: 16px;
    font-size: 16px;
    font-weight: 600;
    color: var(--white);
    background: linear-gradient(135deg, var(--kohls-purple), var(--kohls-magenta));
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.submit-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(11, 36, 58, 0.4);
}

.submit-button:active {
    transform: translateY(0);
}

.submit-button.loading {
    pointer-events: none;
    background: var(--medium-gray);
}

.button-text {
    transition: opacity 0.2s;
}

.submit-button.loading .button-text {
    opacity: 0;
}

.button-loader {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: var(--white);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.submit-button.loading .button-loader {
    display: block;
}

@keyframes spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Video Page */
#video-page {
    background: #0b243a;
}

.video-container {
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.video-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    background: #0b243a;
    backdrop-filter: blur(10px);
}

.logo-small-container {
    height: 40px;
    position: relative;
}

.logo-small {
    max-height: 40px;
    max-width: 120px;
    object-fit: contain;
    display: none;
}

.logo-small.loaded {
    display: block;
}

.logo-small-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    padding: 0 20px;
    background: linear-gradient(135deg, var(--kohls-purple), var(--kohls-magenta));
    border-radius: 8px;
    font-size: 18px;
    font-weight: bold;
    color: var(--white);
    letter-spacing: 4px;
}

.logo-small-placeholder.hidden {
    display: none;
}

.logout-button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    color: var(--white);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.logout-button:hover {
    background: rgba(255, 255, 255, 0.2);
}

.logout-button svg {
    width: 18px;
    height: 18px;
}

.video-wrapper {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    position: relative;
    flex-direction: column;
    overflow: auto;
    min-height: 0;
}

.demo-video {
    width: 100%;
    max-width: 1200px;
    max-height: calc(100vh - 200px);
    height: auto;
    border-radius: 8px;
    display: none;
    object-fit: contain;
}

.demo-video.loaded {
    display: block;
}

.video-caption {
    margin-top: 16px;
    margin-bottom: 16px;
    color: var(--white);
    font-size: 18px;
    line-height: 1.5;
    text-align: center;
    max-width: 980px;
    width: 100%;
    opacity: 0.95;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.35);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    flex-shrink: 0;
}

.video-caption.hidden {
    display: none;
}

.video-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    color: var(--white);
    text-align: center;
    padding: 40px;
}

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

.video-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-top-color: var(--white);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.video-loading p {
    font-size: 16px;
    opacity: 0.9;
}

.video-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    color: var(--white);
    text-align: center;
    padding: 40px;
}

.video-placeholder.hidden {
    display: none;
}

.video-icon {
    width: 80px;
    height: 80px;
    opacity: 0.5;
}

.video-placeholder p {
    font-size: 16px;
    opacity: 0.7;
    max-width: 400px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .login-card {
        padding: 40px 30px;
    }
    
    .title {
        font-size: 24px;
    }
    
    .video-header {
        padding: 15px 20px;
    }
    
    .video-wrapper {
        padding: 15px;
    }
    
    .demo-video {
        max-height: calc(100vh - 220px);
    }
    
    .video-caption {
        font-size: 16px;
        padding: 10px 12px;
        margin-top: 12px;
        margin-bottom: 12px;
    }
}

@media (max-width: 480px) {
    .login-card {
        padding: 30px 20px;
    }
    
    .logo-placeholder {
        width: 140px;
        height: 60px;
        font-size: 28px;
    }
    
    .title {
        font-size: 22px;
    }
    
    .subtitle {
        font-size: 14px;
    }
    
    .video-wrapper {
        padding: 10px;
    }
    
    .demo-video {
        max-height: calc(100vh - 240px);
    }
    
    .video-caption {
        font-size: 14px;
        padding: 8px 10px;
        margin-top: 10px;
        margin-bottom: 10px;
    }
}

