/* 
    Modern Forum Style for Jx2 ID System
    Developed by Antigravity
*/

:root {
    --bg-main: #0f172a;
    --bg-card: #1e293b;
    --bg-header: #1e293b;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent-color: #3b82f6;
    --accent-hover: #2563eb;
    --gold-color: #fbbf24;
    --danger: #ef4444;
    --border-color: #334155;
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    box-sizing: border-box;
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: var(--font-family);
    margin: 0;
    line-height: 1.5; /* Slightly tighter */
    background-image: url('bg_premium.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    font-size: 14px; /* Global reduction */
}

/* Header */
.zid_header {
    background: rgba(30, 41, 59, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    height: 70px;
}

.zid_header_inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    height: 100%;
}

.zidlogo a {
    color: var(--gold-color);
    text-decoration: none;
    font-size: 24px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.zidlogfrom {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 0.95rem;
}

.zidlogfrom a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 600;
}

/* Global Link Color Fix */
a {
    color: var(--gold-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    filter: brightness(1.2);
}

a:not([class*="btn"]):not(.zidmitem a):hover {
    text-decoration: underline;
}

.zid_regform a, .zid_loginform a, .backtologin a {
    color: var(--gold-color) !important;
    font-weight: 600;
}

/* Account Info Bar */
.accuser_code {
    background: rgba(59, 130, 246, 0.1);
    border-bottom: 1px solid rgba(59, 130, 246, 0.2);
    padding: 10px 0;
    font-size: 0.9rem;
}

.accuser_code_inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    color: var(--text-secondary);
}

.accuser_code strong {
    color: var(--gold-color);
}

/* Body Layout */
.zidbody {
    max-width: 1080px;
    margin: 20px auto;
    padding: 0 15px;
    min-height: 40vh; /* Reduced from 80vh to bring footer up */
}

.zingid_accinfo {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 20px;
    width: 100%;
}

/* Premium Gaming Sidebar - Discord Inspired */
.zid_sidemenu {
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(25px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 15px;
    height: fit-content;
}

.sidemenu_list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.zidmitem a {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    border-radius: 12px;
    text-decoration: none;
    color: #e2e8f0;
    transition: all 0.2s ease;
    background: rgba(30, 41, 59, 0.3);
    border: 1px solid transparent;
}

.zidmitem a i {
    font-size: 1.2rem;
    width: 32px;
    text-align: center;
    margin-right: 18px; /* Increased spacing */
    color: var(--gold-color);
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.zidmitem a:hover, .zidmitem a.selected {
    background: rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.3);
    color: #ffffff;
}

.zidmitem a.selected {
    background: rgba(59, 130, 246, 0.25);
    border-color: var(--gold-color);
}

.zidm_text {
    display: flex;
    flex-direction: column;
}

.zidm_title {
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.2;
}

.zidm_desc {
    font-size: 10px; /* Made smaller as requested */
    color: #94a3b8;
    margin-top: 1px;
    opacity: 0.8;
}

/* Content Area */
.zid_infocontent {
    background: var(--bg-card);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    padding: 20px; /* Reduced padding */
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Login Page Styling */
.zid_loginform {
    max-width: 450px !important;
    margin: 30px auto !important; /* Reduced margin */
    background: var(--bg-card);
    padding: 35px !important;
    border-radius: 24px !important;
    border: 1px solid var(--border-color);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.formheader {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 30px;
    color: var(--accent-color);
}

.finput {
    margin-bottom: 15px;
    position: relative;
}

.finput input, select.input_login, .reg_birthday select {
    width: 100%;
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    padding: 12px 15px;
    border-radius: 12px;
    color: white;
    font-size: 0.95rem;
    transition: var(--transition);
    appearance: none; /* Reset for selects */
    -webkit-appearance: none;
}

select.input_login, .reg_birthday select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2394a3b8'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 40px;
}

.finput input:focus, select.input_login:focus, .reg_birthday select:focus {
    border-color: var(--accent-color);
    outline: none;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.zidsignin_btn, .zidregbtn {
    display: block;
    width: 100%;
    text-align: center;
    background: linear-gradient(135deg, var(--accent-color), var(--accent-hover));
    color: white !important;
    padding: 14px;
    border-radius: 12px;
    font-weight: 700;
    text-decoration: none;
    margin-top: 20px;
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

.zidsignin_btn:hover, .zidregbtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(59, 130, 246, 0.3);
}

/* Captcha Styling */
.regcaptcha {
    display: flex;
    gap: 15px;
    margin-top: 15px;
}

.captchaborder {
    background: white;
    padding: 5px;
    border-radius: 8px;
}

/* Footer */
.zidfooter {
    border-top: 1px solid var(--border-color);
    padding: 25px 0;
    margin-top: 30px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.zidfooter_inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.zidfooter_left {
    flex: 1;
    min-width: 300px;
}

.zidfooter_right {
    list-style: none;
    display: flex;
    gap: 20px;
    padding: 0;
    flex-wrap: wrap;
}

.zidfooter_right a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
}

.zidfooter_right a:hover {
    color: var(--accent-color);
}

/* Content Elements Styles */
.content_title {
    font-size: 1.25rem; /* Smaller titles */
    color: var(--gold-color);
    margin-bottom: 20px;
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.inforow {
    background: rgba(15, 23, 42, 0.6);
    padding: 12px 20px;
    border-radius: 12px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    border: 1px solid var(--border-color);
    backdrop-filter: blur(4px);
    transition: var(--transition);
    width: 100%;
    flex-wrap: wrap;
}

.inforow:hover {
    background: rgba(30, 41, 59, 0.8);
    border-color: var(--accent-color);
}

.inforow label {
    color: var(--text-secondary);
    font-weight: 600;
    width: 180px;
    flex-shrink: 0;
}

.infotext {
    flex: 1;
    font-weight: 600;
    color: var(--text-primary);
    padding: 0 20px;
}

.lk_update {
    margin: 0;
    flex-shrink: 0;
}

.lk_update a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(59, 130, 246, 0.1);
    color: #ffffff !important;
    text-decoration: none !important;
    font-weight: 700;
    font-size: 11px;
    padding: 6px 12px;
    border-radius: 6px;
    border: 1px solid rgba(59, 130, 246, 0.3);
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.lk_update a:hover {
    background: var(--accent-color);
    border-color: var(--accent-color);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* Character Card Style */
.character_card {
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 25px;
}

.character_header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.character_name {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--gold-color);
}

.character_actions .sfbtn_submit {
    padding: 6px 14px;
    font-size: 12px;
}

.character_actions {
    display: flex;
    gap: 15px;
}

.character_details {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 10px;
}

.detail_row {
    display: flex;
    padding: 8px 0;
}

.detail_label {
    width: 140px;
    color: var(--text-secondary);
    font-weight: 600;
}

.detail_value {
    color: var(--text-primary);
    font-weight: 600;
}

/* Form Elements inside content */
.subcont {
    background: rgba(15, 23, 42, 0.5);
    padding: 20px;
    border-radius: 12px;
    margin-top: 10px;
    border: 1px dashed var(--border-color);
}

.subform_input, .subform_input_gc {
    background: var(--bg-main) !important;
    border: 1px solid var(--border-color) !important;
    color: white !important;
    padding: 8px 12px !important;
    border-radius: 8px !important;
    width: 100%;
}

.sfbtn_submit {
    background: var(--accent-color);
    color: white !important;
    padding: 8px 18px; /* Reduced padding */
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    display: inline-block;
    transition: var(--transition);
    font-size: 13px; /* Slightly smaller */
}

.sfbtn_submit:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
}

.sfbtn_cancel {
    color: var(--text-secondary) !important;
    text-decoration: none;
    margin-left: 15px;
    font-size: 13px;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.2s;
}

.sfbtn_cancel:hover {
    background: rgba(255, 255, 255, 0.05);
    color: white !important;
}

/* Utilities */
.clr { clear: both; }

/* Registration & Forgot Password Special Styles */
.zid_regform {
    max-width: 600px !important;
    margin: 30px auto !important; /* Reduced margin */
    background: var(--bg-card);
    padding: 35px !important;
    border-radius: 24px !important;
    border: 1px solid var(--border-color);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.zidregmethodtab {
    display: flex;
    list-style: none;
    padding: 0;
    margin-bottom: 30px;
    border-bottom: 1px solid var(--border-color);
}

.zidregmethodtab li {
    flex: 1;
}

.zidregmethodtab a {
    display: block;
    text-align: center;
    padding: 15px;
    color: var(--text-secondary);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: var(--transition);
}

.zidregmethodtab a.selected {
    color: var(--accent-color);
    border-bottom-color: var(--accent-color);
    font-weight: 700;
}

.zidfglist {
    list-style: none;
    padding: 0;
    margin: 20px 0;
}

.zidfglist li {
    margin-bottom: 15px;
    background: var(--bg-main);
    padding: 12px 20px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.zidfglist label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.zidnextbtn, .sfbtn_submit {
    background: var(--accent-color);
    color: white !important;
    padding: 12px 25px;
    border-radius: 10px;
    font-weight: 700;
    text-decoration: none;
    display: inline-block;
    transition: var(--transition);
    border: none;
    cursor: pointer;
}

.zid_backbtn, .sfbtn_cancel {
    background: rgba(148, 163, 184, 0.1);
    color: var(--text-secondary) !important;
    padding: 12px 25px;
    border-radius: 10px;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: var(--transition);
}

.zidnextbtn:hover, .sfbtn_submit:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
}

/* Fix for loading overlays */
.loadingfrm {
    background: rgba(15, 23, 42, 0.8) !important;
    border-radius: 24px;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
}

.formtipbubble {
    background: var(--danger);
    color: white;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.8rem;
    margin-top: 5px;
}

.account_valid { color: #10b981; }
.account_invalid { color: var(--danger); }

/* Registration Page Specific Fixes */
.reg_birthday {
    display: flex;
    gap: 10px;
    margin-bottom: 5px;
}

.reg_birthday .finput {
    flex: 1;
    margin-bottom: 0;
}

.reg_birthday select {
    cursor: pointer;
}

.reg_sex {
    background: var(--bg-main);
    padding: 15px 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    border: 1px solid var(--border-color);
}

.reg_sex .flabel {
    margin: 0;
    font-weight: 600;
    color: var(--text-secondary);
}

.reg_sex label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.zid_regform_notice {
    background: rgba(59, 130, 246, 0.1);
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 0.85rem;
    margin-bottom: 20px;
    border-left: 4px solid var(--accent-color);
}

.zidterm {
    background: var(--bg-main);
    padding: 15px;
    border-radius: 12px;
    max-height: 200px;
    overflow-y: auto;
    font-size: 0.8rem;
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
}

.zidterm h2 {
    font-size: 1rem;
    color: var(--gold-color);
    margin-top: 0;
}

#fcapcha_button {
    background: var(--bg-main);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    margin-bottom: 20px;
}

/* Ensure checkAccountValid button doesn't break input */
.reg_username {
    position: relative;
}

.checkusernamebtn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--accent-color);
    color: white !important;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    z-index: 5;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2);
}

/* Responsive */
@media (max-width: 992px) {
    .zidbody {
        width: 100% !important;
        max-width: 100%;
        margin: 15px auto;
        padding: 0 10px;
        box-sizing: border-box;
    }

    .zingid_accinfo {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .zid_sidemenu {
        margin-bottom: 0;
    }

    .zid_infocontent {
        padding: 10px;
    }

    .inforow {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        padding: 10px 12px;
    }

    .inforow label, .subcont_lb {
        width: 100% !important;
        margin-bottom: 2px;
    }

    .infotext {
        width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
        flex: none !important;
    }
    
    .lk_update {
        width: 100%;
        text-align: right;
    }

    /* Adjust sidebar for mobile */
    .zidm_itemwrapper span {
        display: none; /* Hide descriptions on small mobile if too cluttered */
    }
}

@media (max-width: 600px) {
    .zid_header_inner {
        padding: 0 10px;
    }

    .zidlogo a {
        font-size: 18px;
    }

    .zidlogfrom {
        font-size: 0.8rem;
    }

    .accuser_code_inner {
        font-size: 0.8rem;
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
        text-align: center;
    }
    
    .accuser_code_inner i {
        margin-right: 3px;
    }
}
