:root {
    --bg-main: #0b0f14;
    --bg-panel: #131a24;
    --bg-panel-alt: #0f1520;
    --border-color: #1f2a3a;
    --text-main: #d7dce2;
    --text-muted: #8b97a8;
    --text-accent: #4da3ff;
    --success: #3fb950;
    --danger: #f85149;
    --radius: 3px; /* Sharper corners for OGame look */
}

html, body {
    height: 100%;
    margin: 0;
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: "Segoe UI", Tahoma, sans-serif;
}

/* Centering Logic */
.full-height {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

/* OGame Card Style */
.login-card {
    min-width: 360px;
    max-width: 360px;
    margin: 50px auto;
    padding: 24px;
    background: rgba(19, 26, 36, 0.8);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
    color: #fff;
    font-family: system-ui, -apple-system, sans-serif;
}

.login-header {
    font-size: 1.3rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 16px;
}

.login-body .form-group {
    margin-bottom: 12px;
}

.login-body label {
    display: block;
    font-size: 0.85rem;
    margin-bottom: 4px;
    color: #ccc;
}

.login-body input {
    width: 100%;
    padding: 8px 10px;
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,0.2);
    background: rgba(255,255,255,0.05);
    color: #fff;
    outline: none;
}

    .login-body input:focus {
        border-color: #4da3ff;
        box-shadow: 0 0 6px rgba(77,163,255,0.3);
    }

.btn-login {
    width: 100%;
    padding: 10px 0;
    margin-top: 8px;
    background: #4da3ff;
    border: none;
    border-radius: 6px;
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

    .btn-login:hover {
        background: #1a73e8;
    }

.register-link {
    margin-top: 10px;
    text-align: center;
    font-size: 0.8rem;
}

    .register-link span {
        color: #aaa;
        margin-right: 4px;
    }

    .register-link a {
        color: #4da3ff;
        font-weight: 600;
        text-decoration: none;
    }

        .register-link a:hover {
            text-decoration: underline;
        }

/* Divider */
.login-divider {
    text-align: center;
    margin: 18px 0;
    font-size: 0.85rem;
    color: #aaa;
    position: relative;
}

    .login-divider span {
        background: rgba(19,26,36,0.8);
        padding: 0 12px;
        position: relative;
        z-index: 1;
    }

    .login-divider::before {
        content: "";
        position: absolute;
        top: 50%;
        left: 0;
        right: 0;
        height: 1px;
        background: rgba(255,255,255,0.2);
        transform: translateY(-50%);
    }

/* Base Sign-in Button (from before) */
.base-signin-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 8px;
    cursor: pointer;
    font-family: system-ui, -apple-system, sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #000;
    width: 100%;
    margin-top: 8px;
    height: 44px;
    transition: all 0.2s;
}

    .base-signin-btn:hover {
        background: #f0f0f0;
    }

    .base-signin-btn > div {
        width: 16px;
        height: 16px;
        background-color: #00f;
        border-radius: 2px;
        flex-shrink: 0;
    }

.signin-status {
    margin-top: 10px;
    font-size: 0.8rem;
    text-align: center;
}
.login-body {
    padding: 20px;
}

/* Form Styling */
.form-group {
    margin-bottom: 15px;
}

    .form-group label {
        display: block;
        font-size: 0.75rem;
        margin-bottom: 5px;
        color: var(--text-muted);
        text-transform: uppercase;
    }

input[type="text"],
input[type="email"],
input[type="password"] {
    width: 100%;
    box-sizing: border-box; /* Fixes padding overflow */
    background: #080c11;
    border: 1px solid var(--border-color);
    padding: 10px;
    color: var(--text-main);
    border-radius: var(--radius);
}

input:focus {
    border-color: var(--text-accent);
    outline: none;
}

/* Button */
.btn-login {
    width: 100%;
    padding: 10px;
    background: linear-gradient(#1a2535, #111a28);
    border: 1px solid var(--border-color);
    color: var(--text-accent);
    font-weight: bold;
    cursor: pointer;
    text-transform: uppercase;
}

    .btn-login:hover {
        background: #1a2535;
        border-color: var(--text-accent);
    }

.error-list {
    margin-top: 10px;
    color: var(--danger);
    font-size: 0.8rem;
    list-style: none;
    padding: 0;
}

.login-body a:hover span {
    text-decoration: underline;
    text-shadow: 0 0 5px var(--text-accent);
}

/* Ensure the bar stays dark and fixed at the top */
.top-nav {
    height: 40px;
    background: #0f1520; /* Solid fall-back */
    background: linear-gradient(to bottom, #131a24 0%, #0f1520 100%);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    position: sticky;
    top: 0;
    z-index: 1000;
}

/* Fix for centered logo even if side widths change */
.nav-side {
    flex: 1 1 0; /* Distribute space equally */
    display: flex;
    align-items: center;
    gap: 18px;
}

.right-side {
    justify-content: flex-end;
}

.nav-center {
    flex: 0 0 auto;
}

/* Force all nav links to start as muted gray/white */
.nav-link,
.nav-link:link,
.nav-link:visited {
    color: #ffffff !important; /* Force white */
    opacity: 0.7; /* Slight transparency for the 'muted' look */
    text-decoration: none;
    transition: all 0.2s ease;
}

    /* On hover, make them bright blue/white */
    .nav-link:hover {
        color: var(--text-accent) !important;
        opacity: 1;
        filter: drop-shadow(0 0 5px var(--text-accent));
    }

/* Specific fix for the logout button to glow red on hover */
.logout-btn:hover {
    color: #ff4d4d !important;
    filter: drop-shadow(0 0 5px #ff4d4d);
}

/* Ensure the logo isn't affected by visited link colors */
.main-logo,
.main-logo:visited {
    color: var(--text-accent) !important;
    text-decoration: none;
    opacity: 1;
}


.base-signin-btn:disabled,
.base-signin-btn[disabled] {
    background-color: #555 !important; /* darker grey */
    border-color: #333 !important;
    color: #999 !important; /* muted text */
    cursor: not-allowed;
    opacity: 0.6;
    pointer-events: none; /* prevent hover effects */
    box-shadow: none; /* remove hover/active shadows */
}

    /* Remove hover effect for disabled */
    .base-signin-btn:disabled:hover,
    .base-signin-btn[disabled]:hover {
        background-color: #555 !important;
        color: #999 !important;
    }

.error-text {
    color: #ff4d4d;
    font-size: 0.75rem;
    margin-top: 5px;
    display: block;
    text-align: left;
    font-weight: 500;
}

/* Stil za input polje koje ima grešku */
input.input-validation-error {
    border: 1px solid #ff4d4d !important;
    background-color: rgba(255, 77, 77, 0.05) !important;
    box-shadow: 0 0 5px rgba(255, 77, 77, 0.2);
}

/* Stil za sažetak grešaka na vrhu */
.validation-summary-errors {
    background: rgba(255, 77, 77, 0.1);
    border: 1px solid #ff4d4d;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 15px;
    color: #ff4d4d;
    list-style: none;
    font-size: 0.85rem;
}