/* Prevent flash of content */
body {
    overflow: hidden;
}

#main-content {
    visibility: hidden;
}

#main-content.loaded {
    visibility: visible;
}

/* Mobile Warning Screen */
.mobile-warning {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: linear-gradient(135deg, #1c1c1e 0%, #2c2c2e 100%);
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

.mobile-warning-content {
    text-align: center;
    padding: 40px 24px;
    max-width: 400px;
}

.mobile-warning-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    background: rgba(88, 86, 214, 0.15);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-warning-icon i {
    font-size: 40px;
    color: var(--indigo);
}

.mobile-warning h2 {
    font-size: 24px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 16px;
    letter-spacing: -0.5px;
}

.mobile-warning p {
    font-size: 16px;
    line-height: 1.5;
    color: var(--text-secondary);
    margin-bottom: 32px;
}

.mobile-warning-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--indigo);
    color: #ffffff;
    text-decoration: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.mobile-warning-button:hover {
    background: #6664d4;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(88, 86, 214, 0.3);
}

@media (max-width: 768px) {
    .mobile-warning {
        display: flex;
    }
    
    #loading-screen,
    #login-screen,
    #main-content {
        display: none !important;
    }
}

/* Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    transition: opacity 0.5s ease;
}

.loading-screen.fade-out {
    opacity: 0;
}

.loading-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 60px;
}

.apple-logo-boot {
    color: #fff;
    font-size: 120px;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.8;
    }
    50% {
        opacity: 1;
    }
}

.loading-bar-container {
    width: 220px;
}

.loading-bar {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    overflow: hidden;
}

.loading-bar-fill {
    height: 100%;
    background: #fff;
    border-radius: 2px;
    width: 0%;
    transition: width 0.3s ease;
}

/* Login Screen */
.login-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    background-image: url(../../../assets/macos/bg/Tahoe.jpg);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    color: var(--text);
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    z-index: 9999;
    transition: opacity 0.5s ease;
    padding-top: 80px;
    opacity: 0;
    pointer-events: none;
}

.login-screen.active {
    opacity: 1;
    pointer-events: auto;
}

.login-screen.fade-out {
    opacity: 0;
}

.login-content {
    position: absolute;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
}

.login-datetime {
    position: absolute;
    top: 60px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    color: #fff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    -webkit-font-smoothing: antialiased;
    z-index: 10;
}

.login-time {
    font-size: 110px;
    font-weight: 200;
    letter-spacing: -3px;
    margin-bottom: 0;
    line-height: 1;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', sans-serif;
}

.login-date {
    font-size: 26px;
    font-weight: 400;
    opacity: 0.95;
    margin-bottom: 8px;
    line-height: 1;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', sans-serif;
}

.login-user {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.login-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.25);
    margin-bottom: 8px;
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.login-avatar:hover {
    transform: scale(1.05);
    border-color: rgba(255, 255, 255, 0.4);
}

.login-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.login-name {
    font-size: 20px;
    font-weight: 500;
    color: #fff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    margin-bottom: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', sans-serif;
    -webkit-font-smoothing: antialiased;
    cursor: pointer;
}

.login-input-container {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 0;
    margin-top: 12px;
}

.login-input-container.visible {
    display: flex;
}

#login-input {
    width: 260px;
    padding: 5px 20px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: none;
    border-radius: 50px;
    color: #fff;
    font-size: 15px;
    text-align: center;
    outline: none;
    transition: all 0.2s ease;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', sans-serif;
    -webkit-font-smoothing: antialiased;
}

#login-input::placeholder {
    color: rgba(255, 255, 255, 0.65);
    font-weight: 400;
}

#login-input:focus {
    background: rgba(255, 255, 255, 0.28);
   
}

.login-hint {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.75);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    margin-top: 10px;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', sans-serif;
    -webkit-font-smoothing: antialiased;
    font-weight: 400;
}

@keyframes fade-in-out {
    0%, 100% {
        opacity: 0.5;
    }
    50% {
        opacity: 1;
    }
}

/* Status bar on login screen */
.login-screen::before {
    content: '';
    position: absolute;
    top: 12px;
    right: 20px;
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .apple-logo-boot {
        font-size: 80px;
    }
    
    .loading-bar-container {
        width: 180px;
    }
    
    .login-screen {
        padding-top: 60px;
    }
    
    .login-time {
        font-size: 72px;
        letter-spacing: -2px;
    }
    
    .login-date {
        font-size: 20px;
        margin-top: 6px;
    }
    
    .login-datetime {
        margin-bottom: 140px;
    }
    
    .login-avatar {
        width: 90px;
        height: 90px;
        font-size: 45px;
    }
    
    .login-name {
        font-size: 22px;
    }
    
    #login-input {
        width: 240px;
        padding: 9px 16px;
        font-size: 14px;
    }
    
    .login-hint {
        font-size: 12px;
    }
}
