/* General styles for desktop */
body, html {
    margin: 0;
    padding: 0;
    background-color: #0E1930;
    font-family: "Jura", sans-serif;
}

.header {
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(10px);
    background: rgba(11, 18, 32, 0.70);
    border-bottom: 1px solid rgba(255, 255, 255, 0.10);
    color: white;
}

.header-inner {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    width: min(1280px, calc(100% - 24px));
    gap: 18px;
}

.links {
    display: flex;
    align-items: center;
    gap: 10px;
}

.links a {
    padding: 8px 10px;
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.70);
    border: 1px solid transparent;
    text-decoration: none;
}

.links a:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.10);
    text-decoration: none;
    color: rgba(255, 255, 255, 0.92);
    cursor: pointer;
}

.links a.primary {
    background: rgba(122, 162, 255, 0.16);
    border-color: rgba(122, 162, 255, 0.30);
    color: #9cc4ff;
}

.links a.primary:hover {
    background: rgba(122, 162, 255, 0.22);
}

.links a.active {
    background: rgba(255, 255, 255, 0.10);
    border-color: rgba(255, 255, 255, 0.20);
    color: rgba(255, 255, 255, 0.92);
}

.links a.primary.active {
    background: rgba(122, 162, 255, 0.25);
    border-color: rgba(122, 162, 255, 0.45);
    color: #9cc4ff;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 220px;
    text-decoration: none;
    color: inherit;
}

.logo {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    /* background: linear-gradient(135deg, rgba(122, 162, 255, 0.95), rgba(156, 196, 255, 0.70)); */
    /* box-shadow: 0 10px 25px rgba(122, 162, 255, 0.25); */
    display: grid;
    place-items: center;
    font-weight: 800;
    /* color: rgba(7, 11, 18, 0.9); */
    letter-spacing: 0.5px;
    user-select: none;
    font-size: 16px;
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.brand-text strong {
    font-size: 2vh;
    letter-spacing: 0.2px;
    color: rgba(255, 255, 255, 0.92);
}

.brand-text span {
    font-size:1.5vh;
    color: rgba(255, 255, 255, 0.55);
}

/* Mobile nav toggle */
.nav-toggle {
    display: none;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.08);
    color: white;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.nav-toggle .bar {
    display: block;
    width: 18px;
    height: 2px;
    background: rgba(255, 255, 255, 0.92);
    margin: 3px auto;
    border-radius: 2px;
}

.buttons {
    z-index: 2;
    position: absolute;
    top: 70vh;
    left: 58px;
}

.button {
    z-index: 2;
    width: 15vw;
    height: 5vh;
    margin-bottom: 20px;
    background: #00559a;
    box-shadow: 0px 5px 15px rgba(37, 44, 97, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    font-size: 2vh;
}

#btnlogin {
    background: #09599A;
}

#btnlogin:hover {
    background: #004679;
}

.button:hover {
    background: #004679;
    cursor: pointer;
}

.button-inner {
    color: white;
    font-size: 2vh;
    font-weight: 600;
    text-decoration: none;
}

.msgBox {
    position: relative;
    background: darkred;
    border-radius: 10px;
    margin: auto;
    width: 80%;
    top: 8vh;
    opacity: 100%;
    z-index: 9998;
    text-align: center;
    color: white;
}

.flash-success {
    color: green;
    background-color: #d4edda;
    padding: 10px;
    border: 1px solid #c3e6cb;
    margin-bottom: 10px;
    border-radius: 5px;
}

.flash-error {
    color: red;
    background-color: #f8d7da;
    padding: 10px;
    border: 1px solid #f5c6cb;
    margin-bottom: 10px;
    border-radius: 5px;
}

.FormBox {
    z-index: 5;
    display: block;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 20px;
    margin-left: auto;
    margin-right: auto;
    top: 15vh;
    margin-bottom: auto;
    width: 40%;
    height: 60vh;
    position: relative;
    background: rgba(110, 110, 110, 0.9);
    border-radius: 50px;
}

.back-btn {
    text-decoration: none;
    margin-left: 5px;
    margin-top: 5px;
    color: #6F6F6F;
}

.back-btn:hover {
    cursor: pointer;
}

.bottom-text {
    position: fixed;
    bottom: 5vh;
    letter-spacing: 0.5px;
    color: white;
    width: 100%;
    text-align: center;
    font-size: 2vh;
}

.flash-message {
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid transparent;
    border-radius: 4px;
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.flash-error {
    color: #a94442;
    background-color: #f2dede;
    border-color: #ebccd1;
}

.flash-success {
    color: #3c763d;
    background-color: #dff0d8;
    border-color: #d6e9c6;
}

.flash-warning {
    color: #8a6d3b;
    background-color: #fcf8e3;
    border-color: #faebcc;
}

.flash-info {
    color: #31708f;
    background-color: #d9edf7;
    border-color: #bce8f1;
}

.close {
    cursor: pointer;
    font-size: 20px;
    line-height: 20px;
    color: #000;
    opacity: 0.5;
    text-shadow: 0 1px 0 #fff;
}

/* Loading screen */
.loading-screen {
    position: fixed;
    z-index: 1000;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    color: white;
    text-align: center;
}

.loading-screen .spinner {
    position: absolute;
    top: 30%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.loader {
    display: inline-block;
    width: 80px;
    height: 80px;
    border: 10px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top-color: #3498db;
    animation: spin 1s infinite linear;
}

.lock-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    font-size: 2.5em;
    color: #3498db;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-text {
    position: absolute;
    top: 45%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.5em;
    font-weight: bold;
    margin-top: 20px;
}

.security-icons {
    position: absolute;
    top: 60%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2em;
}

.security-icons i {
    margin: 0 10px;
    color: #3498db;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
    }
}

/* Responsive design for mobile devices */
@media only screen and (max-width: 768px) {
    .header {
        height: 7vh;
    }

    .header-inner {
        padding: 0 10px;
        gap: 10px;
    }

    .nav-toggle {
        display: inline-flex;
    }

    .links {
        position: fixed;
        top: 7vh;
        left: 0;
        right: 0;
        display: none;
        flex-direction: column;
        gap: 8px;
        padding: 12px;
        background: rgba(11, 18, 32, 0.92);
        backdrop-filter: blur(8px);
        border-bottom: 1px solid rgba(255, 255, 255, 0.12);
        z-index: 100;
    }

    .links.open {
        display: flex;
    }

    .links a {
        margin-right: 0;
        font-size: 16px;
        padding: 12px 14px;
        border-radius: 12px;
    }

    .buttons {
        top: 80vh;
        left: 20px;
    }

    .button {
        width: 40vw;
        height: 6vh;
        font-size: 1.8vh;
    }

    .msgBox {
        width: 90%;
        top: 10vh;
    }

    .FormBox {
        width: 90%;
        height: auto;
        top: 20vh;
        border-radius: 20px;
    }

    .bottom-text {
        font-size: 1.5vh;
    }
}
/* Mobile Optimization - Touch targets and spacing */
@media (max-width: 768px) {
    button, a.btn, input[type=\"button\"], input[type=\"submit\"] {
        min-height: 44px;
        min-width: 44px;
        padding: 10px 16px;
        font-size: 14px;
        border-radius: 8px;
    }
    
    input[type=\"text\"],
    input[type=\"email\"],
    input[type=\"password\"],
    input[type=\"search\"],
    select,
    textarea {
        min-height: 44px;
        padding: 10px 12px;
        font-size: 16px;
        border-radius: 6px;
        border: 1px solid #e5e7eb;
    }
    
    .container {
        padding: 0 12px;
    }
}

@media (max-width: 480px) {
    body {
        font-size: 14px;
    }
    
    h1 { font-size: 20px; }
    h2 { font-size: 18px; }
    h3 { font-size: 16px; }
    h4, h5, h6 { font-size: 14px; }
    
    button, a.btn, input[type=\"button\"], input[type=\"submit\"] {
        min-height: 48px;
        min-width: 48px;
        padding: 12px 16px;
        font-size: 14px;
        width: 100%;
        border-radius: 6px;
    }
    
    input[type=\"text\"],
    input[type=\"email\"],
    input[type=\"password\"],
    input[type=\"search\"],
    select,
    textarea {
        width: 100%;
        min-height: 44px;
        padding: 12px 12px;
        font-size: 16px;
        border-radius: 6px;
        box-sizing: border-box;
    }
    
    .container {
        padding: 0 10px;
        margin: 0 auto;
    }
    
    .modal, .dialog, .popup {
        width: 95vw !important;
        max-height: 90vh !important;
        border-radius: 8px;
    }
}

/* Focus styles for keyboard navigation */
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #1a73e8;
    outline-offset: 2px;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: more) {
    button {
        border: 2px solid currentColor;
    }
}
