:root {
    --bg-color: #0d1117;
    --card-bg: rgba(23, 28, 36, 0.7);
    --text-color: #ffffff;
    --accent-color: #58a6ff;
    --error-color: #f85149;
    --transition-speed: 0.3s;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
}

body,
html {
    height: 100%;
    width: 100%;
    background-color: var(--bg-color);
    color: var(--text-color);
    overflow: hidden;
    position: fixed;
    /* Prevent mobile bounce/scroll */
}

.screen {
    height: 100vh;
    height: 100dvh;
    width: 100%;
    display: flex;
    flex-direction: column;
    transition: opacity var(--transition-speed) ease-in-out;
    overflow: hidden;
    position: relative;
}

.hidden {
    display: none;
    opacity: 0;
    pointer-events: none;
}

/* Login Screen Styles */
#login-screen {
    background-image: url('login_background_1772362093473.png');
    background-size: cover;
    background-position: center;
    align-items: center;
    justify-content: center;
}

#login-screen::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
}

.glass-card {
    position: relative;
    background: var(--card-bg);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 2.5rem 1.5rem;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    text-align: center;
    width: 90%;
    max-width: 400px;
    animation: fadeIn 0.8s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

p {
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 2rem;
}

.pin-display {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.dot {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
    transition: all 0.2s ease;
}

.dot.active {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    box-shadow: 0 0 10px var(--accent-color);
}

.error-msg {
    color: var(--error-color);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    visibility: hidden;
    height: 1.5rem;
}

.error-msg.visible {
    visibility: visible;
}

.numpad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.numpad button {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 1.5rem;
    padding: 1rem;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.numpad button:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.05);
}

.numpad button:active {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(0.95);
}

/* Dashboard Styles */
header {
    width: 100%;
    background: rgba(22, 27, 34, 0.8);
    backdrop-filter: blur(10px);
    padding: 0.5rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    z-index: 100;
    flex-shrink: 0;
}

.logo {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--accent-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-right: 0.5rem;
    letter-spacing: 0.5px;
}

.actions {
    display: flex;
    gap: 0.4rem;
    flex-shrink: 0;
}

.actions button {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.8);
    padding: 0.35rem 0.6rem;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.8rem;
    transition: all 0.2s;
    white-space: nowrap;
}

.actions button svg {
    width: 16px;
    height: 16px;
    stroke-width: 2.5px;
}

.actions button:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(88, 166, 255, 0.5);
    color: white;
}

main {
    flex: 1;
    width: 100%;
    overflow: hidden;
    position: relative;
    background: #000;
}

iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
    position: absolute;
    top: 0;
    left: 0;
}

/* Mobile Adjustments */
@media (max-width: 480px) {
    .logo {
        font-size: 0.85rem;
    }

    .actions button span {
        display: none;
        /* Hide button text on very small screens to save space */
    }

    .actions button {
        padding: 0.35rem;
    }

    .glass-card {
        padding: 2rem 1rem;
    }

    h1 {
        font-size: 1.5rem;
    }
}

/* Privacy Overlay */
.privacy-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    background: rgba(13, 17, 23, 0.9);
    backdrop-filter: blur(40px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.privacy-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.privacy-overlay .glass-card {
    border: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(255, 255, 255, 0.03);
    padding: 2rem;
}