/* Password Screen */
#password-screen {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.97);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-box {
    background: rgba(20, 20, 20, 0.98);
    border: 2px solid #00ff88;
    border-radius: 10px;
    padding: 50px 60px;
    width: 100%;
    max-width: 460px;
    box-shadow: 0 0 60px rgba(0, 255, 136, 0.25);
    position: relative;
    overflow: hidden;
}

.auth-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #00ff88, transparent);
    animation: scanTop 3s linear infinite;
}

.auth-title {
    color: #00ff88;
    font-size: 1.4em;
    text-shadow: 0 0 10px #00ff88;
    margin-bottom: 8px;
    text-align: center;
}

.auth-subtitle {
    color: #555;
    font-size: 0.8em;
    text-align: center;
    margin-bottom: 35px;
}

.auth-prompt {
    color: #00ff88;
    font-size: 0.9em;
    margin-bottom: 10px;
}

.auth-prompt::before {
    content: '$ ';
}

.auth-input-wrapper {
    display: flex;
    align-items: center;
    border: 1px solid #404040;
    border-radius: 5px;
    background: rgba(0, 0, 0, 0.5);
    padding: 0 12px;
    transition: border-color 0.3s;
}

.auth-input-wrapper:focus-within {
    border-color: #00ff88;
    box-shadow: 0 0 15px rgba(0, 255, 136, 0.2);
}

.auth-input-icon {
    display: flex;
    align-items: center;
    margin-right: 10px;
    opacity: 0.5;
}

.auth-input-icon img {
    width: 16px;
    height: 16px;
    filter: invert(1) sepia(1) saturate(3) hue-rotate(100deg);
}

#username-input,
#password-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: #c0c0c0;
    font-family: 'Share Tech Mono', monospace;
    font-size: 1em;
    padding: 14px 0;
    caret-color: #00ff88;
}

.auth-btn {
    width: 100%;
    margin-top: 20px;
    padding: 14px;
    background: rgba(0, 255, 136, 0.1);
    border: 1px solid #00ff88;
    border-radius: 5px;
    color: #00ff88;
    font-family: 'Share Tech Mono', monospace;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s;
    letter-spacing: 0.05em;
}

.auth-btn:hover {
    background: rgba(0, 255, 136, 0.25);
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.4);
}

.auth-error {
    color: #ff5f56;
    text-shadow: 0 0 5px #ff5f56;
    font-size: 0.85em;
    margin-top: 15px;
    text-align: center;
    min-height: 1.2em;
    opacity: 0;
    transition: opacity 0.3s;
}

.auth-error.visible {
    opacity: 1;
}

/* Dashboard */
#dashboard {
    display: none;
}

.dashboard-title {
    font-size: 1.6em;
    color: #00ff88;
    text-shadow: 0 0 10px #00ff88;
    margin: 0;
}

.dashboard-title::before {
    content: '> ';
}

/* App Grid */
.apps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 25px;
    margin-top: 10px;
}

.app-card {
    background: rgba(25, 25, 25, 0.9);
    border: 1px solid #303030;
    border-radius: 10px;
    padding: 30px 25px;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.app-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: #00ff88;
    opacity: 0.4;
    transition: opacity 0.3s;
}

.app-card:hover {
    border-color: #00ff88;
    box-shadow: 0 0 30px rgba(0, 255, 136, 0.2);
    transform: translateY(-4px);
}

.app-card:hover::before {
    opacity: 1;
}

.app-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
}

.app-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: invert(1) sepia(1) saturate(3) hue-rotate(100deg) brightness(1.1);
    opacity: 0.85;
    transition: opacity 0.3s;
}

.app-card:hover .app-icon img {
    opacity: 1;
}

.app-name {
    color: #00ff88;
    font-size: 1.2em;
    text-shadow: 0 0 5px #00ff88;
}

.app-desc {
    color: #666;
    font-size: 0.82em;
    line-height: 1.5;
    flex: 1;
}

.app-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.78em;
    color: #555;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #00ff88;
    box-shadow: 0 0 6px #00ff88;
    animation: statusPulse 2s infinite;
}

@keyframes statusPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.app-launch {
    display: inline-block;
    padding: 10px 18px;
    background: rgba(0, 255, 136, 0.08);
    border: 1px solid #00ff88;
    border-radius: 5px;
    color: #00ff88;
    text-decoration: none;
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.85em;
    transition: all 0.3s;
    text-align: center;
}

.app-launch:hover {
    background: rgba(0, 255, 136, 0.2);
    box-shadow: 0 0 15px rgba(0, 255, 136, 0.35);
}

.logout-btn {
    background: transparent;
    border: 1px solid #404040;
    border-radius: 4px;
    color: #555;
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.8em;
    padding: 8px 14px;
    cursor: pointer;
    transition: all 0.3s;
}

.logout-btn:hover {
    border-color: #ff5f56;
    color: #ff5f56;
}

@media (max-width: 600px) {
    .auth-box {
        padding: 35px 25px;
    }
    .apps-grid {
        grid-template-columns: 1fr;
    }
}
