/* ========================================
   FIFA Module - Common Styles
   GitHub-inspired Design System
   Used by: All FIFA module pages (JC, ZC, RJ, future pages)
   ======================================== */

/* === CSS Variables (Design Tokens) === */
:root {
    /* GitHub Colors */
    --gh-bg: #ffffff;
    --gh-bg-secondary: #f6f8fa;
    --gh-border: #d0d7de;
    --gh-border-light: #d8dee4;
    --gh-text-primary: #24292f;
    --gh-text-secondary: #57606a;
    --gh-text-tertiary: #8c959f;
    --gh-link: #0969da;
    --gh-success: #1a7f37;
    --gh-success-bg: #dafbe1;
    --gh-success-dark: #176e2e;
    --gh-warning: #9a6700;
    --gh-warning-bg: #fff8c5;
    --gh-danger: #cf222e;
    --gh-danger-bg: #ffebe9;
    --gh-purple: #8250df;
    --gh-purple-bg: #fbefff;
    
    /* Width/Height Utilities (missing) */
    --gh-width-xs: 48px;
    --gh-height-xs: 16px;
    --gh-width-sm: 80px;
    --gh-height-sm: 24px;

    /* Width/Height Utilities */
    --gh-width-xs: 48px;
    --gh-height-xs: 16px;
    --gh-width-sm: 80px;
    --gh-height-sm: 24px;
}

/* === Width/Height Utility Classes === */
.gh-w-xs { width: var(--gh-width-xs); }
.gh-h-xs { height: var(--gh-height-xs); }
.gh-w-sm { width: var(--gh-width-sm); }
.gh-h-sm { height: var(--gh-height-sm); }

/* === Missing Flex/Utility Classes === */
.gh-justify-space-between { justify-content: space-between; }
.gh-justify-flex-end { justify-content: flex-end; }
.gh-items-stretch { align-items: stretch; }
.gh-bg-link { background-color: var(--gh-link); }

/* === Missing Button State Classes === */
.color-win { /* Win option style - can be customized */ }
.color-draw { /* Draw option style */ }
.color-loss { /* Loss option style */ }

/*
    /* Spacing */
    --gh-spacing-xs: 4px;
    --gh-spacing-sm: 8px;
    --gh-spacing-md: 16px;
    --gh-spacing-lg: 24px;
    --gh-spacing-xl: 32px;
    
    /* Border Radius */
    --gh-radius-sm: 4px;
    --gh-radius-md: 6px;
    --gh-radius-lg: 8px;
    --gh-radius-xl: 12px;
    
    /* Shadows */
    --gh-shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
    --gh-shadow-md: 0 1px 3px rgba(0,0,0,0.08);
    --gh-shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
}

/* === Typography === */
.gh-text-xs { font-size: 11px; }
.gh-text-sm { font-size: 12px; }
.gh-text-base { font-size: 13px; }
.gh-text-md { font-size: 14px; }
.gh-text-lg { font-size: 16px; }
.gh-text-xl { font-size: 18px; }
.gh-text-2xl { font-size: 20px; }

.gh-font-normal { font-weight: 400; }
.gh-font-medium { font-weight: 500; }
.gh-font-semibold { font-weight: 600; }
.gh-font-bold { font-weight: 700; }

/* === Color Utilities === */
.gh-text-primary { color: var(--gh-text-primary); }
.gh-text-secondary { color: var(--gh-text-secondary); }
.gh-text-tertiary { color: var(--gh-text-tertiary); }
.gh-text-link { color: var(--gh-link); }
.gh-text-success { color: var(--gh-success); }
.gh-text-warning { color: var(--gh-warning); }
.gh-text-danger { color: var(--gh-danger); }
.gh-text-purple { color: var(--gh-purple); }

/* === Background Utilities === */
.gh-bg-white { background-color: var(--gh-bg); }
.gh-bg-secondary { background-color: var(--gh-bg-secondary); }
.gh-bg-success { background-color: var(--gh-success-bg); }
.gh-bg-warning { background-color: var(--gh-warning-bg); }
.gh-bg-danger { background-color: var(--gh-danger-bg); }

/* === Layout Containers === */
.gh-container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: var(--gh-spacing-md);
}

.gh-container-sm {
    width: 100%;
    max-width: 960px;
    margin: 0 auto;
    padding: var(--gh-spacing-md);
}

.gh-container-lg {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: var(--gh-spacing-md);
}

/* === Card Component === */
.gh-card {
    background: var(--gh-bg);
    border: 1px solid var(--gh-border);
    border-radius: var(--gh-radius-md);
    overflow: hidden;
}

.gh-card-header {
    background: var(--gh-bg-secondary);
    padding: 12px 16px;
    border-bottom: 1px solid var(--gh-border);
    font-weight: 600;
    font-size: 14px;
    color: var(--gh-text-primary);
}

.gh-card-body {
    padding: 16px;
}

.gh-card-footer {
    background: var(--gh-bg-secondary);
    padding: 8px 16px;
    border-top: 1px solid var(--gh-border);
}

/* === Controls Bar === */
.gh-controls-bar {
    display: flex;
    align-items: center;
    gap: var(--gh-spacing-md);
    padding: 12px 16px;
    background: var(--gh-bg-secondary);
    border: 1px solid var(--gh-border);
    border-radius: var(--gh-radius-md);
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.gh-controls-bar .gh-controls-left {
    display: flex;
    align-items: center;
    gap: var(--gh-spacing-sm);
}

.gh-controls-bar .gh-controls-right {
    display: flex;
    align-items: center;
    gap: var(--gh-spacing-sm);
    margin-left: auto;
}

/* === Buttons === */
.gh-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    font-size: 12px;
    font-weight: 600;
    color: var(--gh-text-primary);
    background: var(--gh-bg);
    border: 1px solid var(--gh-border);
    border-radius: var(--gh-radius-md);
    cursor: pointer;
    text-decoration: none;
    transition: all 0.1s ease;
    white-space: nowrap;
}

.gh-btn:hover {
    background: var(--gh-bg-secondary);
    border-color: #bbc0c5;
}

.gh-btn:active {
    background: #ebeef1;
}

.gh-btn-primary {
    background: var(--gh-link);
    color: #ffffff;
    border-color: var(--gh-link);
}

.gh-btn-primary:hover {
    background: #0860c4;
    border-color: #0860c4;
}



.gh-btn-danger {
    background: var(--gh-danger);
    color: #ffffff;
    border-color: var(--gh-danger);
}

.gh-btn-danger:hover {
    background: #a9151f;
    border-color: #a9151f;
}

.gh-btn-sm {
    padding: 4px 8px;
    font-size: 11px;
}

.gh-btn-lg {
    padding: 8px 16px;
    font-size: 14px;
}

.gh-btn-icon {
    padding: 6px;
    min-width: 32px;
    justify-content: center;
}

.gh-btn:disabled,
.gh-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* === Form Elements === */
.gh-input,
.gh-select {
    height: 28px;
    padding: 0 8px;
    font-size: 12px;
    font-family: inherit;
    color: var(--gh-text-primary);
    background: var(--gh-bg);
    border: 1px solid var(--gh-border);
    border-radius: var(--gh-radius-md);
    transition: border-color 0.15s ease;
}

.gh-input:focus,
.gh-select:focus {
    outline: none;
    border-color: var(--gh-link);
    box-shadow: 0 0 0 3px rgba(9,105,218,0.1);
}

.gh-input[type="date"] {
    min-width: 140px;
    cursor: pointer;
}

.gh-select {
    cursor: pointer;
    padding-right: 24px;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2357606a' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
}

/* === Table Component === */
.gh-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    background: var(--gh-bg);
}

.gh-table th {
    background: var(--gh-bg-secondary);
    color: var(--gh-text-secondary);
    font-size: 12px;
    font-weight: 600;
    padding: 8px 12px;
    border-bottom: 1px solid var(--gh-border);
    text-align: left;
    white-space: nowrap;
    vertical-align: middle;
}

.gh-table th.text-center { text-align: center; }
.gh-table th.text-right { text-align: right; }

.gh-table td {
    padding: 8px 12px;
    border-bottom: 1px solid var(--gh-border-light);
    color: var(--gh-text-primary);
    vertical-align: middle;
}

.gh-table tr:hover td {
    background-color: #f6f8fa80;
}

.gh-table tr:last-child td {
    border-bottom: none;
}

.gh-table.sticky-header th {
    position: sticky;
    top: 0;
    z-index: 30;
}

/* === Match Row Styles === */
.gh-match-row {
    transition: background-color 0.1s ease;
}

.gh-match-row:hover {
    background-color: var(--gh-bg-secondary);
}

.gh-match-league {
    display: inline-block;
    padding: 2px 6px;
    border-radius: var(--gh-radius-sm);
    font-size: 11px;
    font-weight: 600;
    color: #ffffff;
    white-space: nowrap;
}

.gh-match-teams {
    display: flex;
    align-items: center;
    gap: var(--gh-spacing-sm);
}

.gh-match-team-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--gh-text-primary);
}

.gh-match-vs {
    font-size: 11px;
    color: var(--gh-text-tertiary);
    font-weight: 500;
}

.gh-match-time {
    font-size: 11px;
    color: var(--gh-text-secondary);
}

/* === Odds Display === */
.gh-odds-btn {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--gh-bg-secondary);
    border: 1px solid var(--gh-border);
    border-radius: var(--gh-radius-md);
    padding: 4px 12px;
    min-width: 60px;
    cursor: pointer;
    transition: all 0.1s ease;
    line-height: 1.2;
}

.gh-odds-btn:hover {
    background: #ebeef1;
    border-color: #bbc0c5;
}

.gh-odds-btn.selected {
    background: #eaffea;
    border-color: var(--gh-success);
    border-width: 2px;
    box-shadow: 0 0 0 1px rgba(26,127,55,0.2);
}

.gh-odds-label {
    font-size: 11px;
    font-weight: 500;
    color: var(--gh-text-secondary);
}

.gh-odds-value {
    font-size: 13px;
    font-weight: 600;
    color: var(--gh-text-primary);
    margin-top: 1px;
}

.gh-odds-btn.selected .gh-odds-label,
.gh-odds-btn.selected .gh-odds-value {
    color: var(--gh-success) !important;
}

/* === Status Badges === */
.gh-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

.gh-badge-success {
    background: var(--gh-success-bg);
    color: var(--gh-success);
    border: 1px solid rgba(26,127,55,0.25);
}

.gh-badge-warning {
    background: var(--gh-warning-bg);
    color: var(--gh-warning);
    border: 1px solid rgba(154,103,0,0.25);
}

.gh-badge-danger {
    background: var(--gh-danger-bg);
    color: var(--gh-danger);
    border: 1px solid rgba(207,34,46,0.25);
}

.gh-badge-info {
    background: #ddf4ff;
    color: var(--gh-link);
    border: 1px solid rgba(9,105,218,0.25);
}

.gh-badge-purple {
    background: var(--gh-purple-bg);
    color: var(--gh-purple);
    border: 1px solid rgba(130,80,223,0.25);
}

/* === Modal/Dialog === */
.gh-modal {
    border: none;
    padding: 0;
    border-radius: var(--gh-radius-xl);
    box-shadow: var(--gh-shadow-lg);
    max-width: 90vw;
}

.gh-modal::backdrop {
    background: rgba(0,0,0,0.4);
}

.gh-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    border-bottom: 1px solid var(--gh-border);
    background: var(--gh-bg-secondary);
}

.gh-modal-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--gh-text-primary);
    margin: 0;
}

.gh-modal-body {
    padding: 20px;
    overflow-y: auto;
    max-height: 70vh;
}

.gh-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: var(--gh-spacing-sm);
    padding: 10px 20px;
    border-top: 1px solid var(--gh-border);
}

/* === Loading States === */
.gh-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: var(--gh-text-tertiary);
}

.gh-loading-spinner {
    width: 32px;
    height: 32px;
    border: 2px solid var(--gh-border);
    border-top-color: var(--gh-link);
    border-radius: 50%;
    animation: gh-spin 0.8s linear infinite;
}

@keyframes gh-spin {
    to { transform: rotate(360deg); }
}

.gh-loading-text {
    margin-top: 12px;
    font-size: 13px;
}

/* === Empty State === */
.gh-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: var(--gh-text-tertiary);
}

.gh-empty-icon {
    font-size: 48px;
    display: block;
    margin-bottom: 12px;
    color: var(--gh-border);
}

.gh-empty-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--gh-text-secondary);
    margin-bottom: 4px;
}

.gh-empty-desc {
    font-size: 13px;
}

/* === Filter Bar === */
.gh-filter-bar {
    display: flex;
    align-items: center;
    gap: var(--gh-spacing-sm);
    padding: 8px 12px;
    background: var(--gh-bg-secondary);
    border: 1px solid var(--gh-border);
    border-radius: var(--gh-radius-md);
    margin-bottom: var(--gh-spacing-md);
    flex-wrap: wrap;
}

.gh-filter-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--gh-text-secondary);
    white-space: nowrap;
}

.gh-filter-group {
    display: flex;
    gap: 2px;
    background: var(--gh-bg);
    border: 1px solid var(--gh-border);
    border-radius: var(--gh-radius-md);
    overflow: hidden;
}

.gh-filter-btn {
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 600;
    color: var(--gh-text-secondary);
    background: transparent;
    border: none;
    border-right: 1px solid var(--gh-border);
    cursor: pointer;
    transition: all 0.15s ease;
}

.gh-filter-btn:last-child {
    border-right: none;
}

.gh-filter-btn:hover {
    background: var(--gh-bg-secondary);
    color: var(--gh-link);
}

.gh-filter-btn.active {
    background: var(--gh-link);
    color: #ffffff;
}

/* === Date Picker === */
.gh-date-picker {
    display: inline-flex;
    align-items: center;
    gap: var(--gh-spacing-sm);
    padding: 4px 8px;
    background: var(--gh-bg);
    border: 1px solid var(--gh-border);
    border-radius: var(--gh-radius-md);
    cursor: pointer;
    transition: all 0.15s ease;
}

.gh-date-picker:hover {
    border-color: var(--gh-link);
}

.gh-date-picker input[type="date"] {
    border: none;
    padding: 0;
    font-size: 12px;
    color: var(--gh-text-primary);
    cursor: pointer;
}

.gh-date-picker input[type="date"]:focus {
    outline: none;
}

/* === Tooltip === */
.gh-tooltip {
    position: relative;
    display: inline-block;
}

.gh-tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 4px 8px;
    background: var(--gh-text-primary);
    color: var(--gh-bg);
    font-size: 11px;
    font-weight: 500;
    border-radius: var(--gh-radius-sm);
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease;
}

.gh-tooltip:hover::after {
    opacity: 1;
}

/* === Grid Layouts === */
.gh-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--gh-spacing-md);
}

.gh-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--gh-spacing-md);
}

.gh-grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--gh-spacing-md);
}

.gh-grid-auto {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--gh-spacing-md);
}

/* === Flex Utilities === */
.gh-flex { display: flex; }
.gh-inline-flex { display: inline-flex; }
.gh-grid { display: grid; }
.gh-hidden { display: none; }
.gh-block { display: block; }
.gh-flex-col { flex-direction: column; }
.gh-flex-wrap { flex-wrap: wrap; }
.gh-items-center { align-items: center; }
.gh-items-start { align-items: flex-start; }
.gh-items-end { align-items: flex-end; }
.gh-justify-center { justify-content: center; }
.gh-justify-between { justify-content: space-between; }
.gh-justify-end { justify-content: flex-end; }
.gh-flex-1 { flex: 1; }

/* === Spacing Utilities === */
.gh-m-0 { margin: 0; }
.gh-mt-sm { margin-top: var(--gh-spacing-sm); }
.gh-mt-md { margin-top: var(--gh-spacing-md); }
.gh-mt-lg { margin-top: var(--gh-spacing-lg); }
.gh-mb-sm { margin-bottom: var(--gh-spacing-sm); }
.gh-mb-md { margin-bottom: var(--gh-spacing-md); }
.gh-mb-lg { margin-bottom: var(--gh-spacing-lg); }
.gh-ml-auto { margin-left: auto; }
.gh-ml-sm { margin-left: var(--gh-spacing-sm); }
.gh-mr-sm { margin-right: var(--gh-spacing-sm); }

.gh-p-0 { padding: 0; }
.gh-p-sm { padding: var(--gh-spacing-sm); }
.gh-p-md { padding: var(--gh-spacing-md); }
.gh-p-lg { padding: var(--gh-spacing-lg); }
.gh-px-xs { padding-left: var(--gh-spacing-xs); padding-right: var(--gh-spacing-xs); }
.gh-px-sm { padding-left: var(--gh-spacing-sm); padding-right: var(--gh-spacing-sm); }
.gh-px-md { padding-left: var(--gh-spacing-md); padding-right: var(--gh-spacing-md); }
.gh-px-lg { padding-left: var(--gh-spacing-lg); padding-right: var(--gh-spacing-lg); }
.gh-py-xs { padding-top: var(--gh-spacing-xs); padding-bottom: var(--gh-spacing-xs); }
.gh-py-sm { padding-top: var(--gh-spacing-sm); padding-bottom: var(--gh-spacing-sm); }
.gh-py-md { padding-top: var(--gh-spacing-md); padding-bottom: var(--gh-spacing-md); }
.gh-py-lg { padding-top: var(--gh-spacing-lg); padding-bottom: var(--gh-spacing-lg); }

/* === Gap Utilities === */
.gh-gap-xs { gap: var(--gh-spacing-xs); }
.gh-gap-sm { gap: var(--gh-spacing-sm); }
.gh-gap-md { gap: var(--gh-spacing-md); }
.gh-gap-lg { gap: var(--gh-spacing-lg); }
.gh-gap-xl { gap: var(--gh-spacing-xl); }

/* === Position Utilities === */
.gh-relative { position: relative; }
.gh-absolute { position: absolute; }
.gh-fixed { position: fixed; }

/* === Width/Height Utilities === */
.gh-w-full { width: 100%; }
.gh-h-full { height: 100%; }

/* === Border Radius Utilities === */
.gh-radius-sm { border-radius: var(--gh-radius-sm); }
.gh-radius-md { border-radius: var(--gh-radius-md); }
.gh-radius-lg { border-radius: var(--gh-radius-lg); }
.gh-radius-xl { border-radius: var(--gh-radius-xl); }

/* === Shadow Utilities === */
.gh-shadow-sm { box-shadow: var(--gh-shadow-sm); }
.gh-shadow-md { box-shadow: var(--gh-shadow-md); }
.gh-shadow-lg { box-shadow: var(--gh-shadow-lg); }

/* === Transition Utilities === */
.gh-transition { transition: all 0.15s ease; }

/* === Overflow Utilities === */
.gh-overflow-hidden { overflow: hidden; }
.gh-overflow-auto { overflow: auto; }
.gh-overflow-y-auto { overflow-y: auto; }
.gh-overflow-x-auto { overflow-x: auto; }

/* === Cursor Utilities === */
.gh-cursor-pointer { cursor: pointer; }
.gh-cursor-default { cursor: default; }
.gh-cursor-not-allowed { cursor: not-allowed; }

/* === Opacity Utilities === */
.gh-opacity-50 { opacity: 0.5; }
.gh-opacity-100 { opacity: 1; }

/* === White Space === */
.gh-whitespace-nowrap { white-space: nowrap; }

/* === Border Utilities === */
.gh-border { border: 1px solid var(--gh-border); }
.gh-border-top { border-top: 1px solid var(--gh-border); }
.gh-border-bottom { border-bottom: 1px solid var(--gh-border); }

/* === Divider === */
.gh-divider {
    height: 1px;
    background: var(--gh-border);
    margin: var(--gh-spacing-md) 0;
}

/* === Scrollbar === */
.gh-scrollbar {
    scrollbar-width: thin;
    scrollbar-color: var(--gh-border) transparent;
}

.gh-scrollbar::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.gh-scrollbar::-webkit-scrollbar-track {
    background: transparent;
}

.gh-scrollbar::-webkit-scrollbar-thumb {
    background: var(--gh-border);
    border-radius: 4px;
}

.gh-scrollbar::-webkit-scrollbar-thumb:hover {
    background: var(--gh-text-tertiary);
}

/* === Responsive Helpers === */
.gh-hide-sm {
    display: none;
}

@media (min-width: 768px) {
    .gh-hide-sm {
        display: initial;
    }
}

.gh-hide-md {
    display: initial;
}

@media (max-width: 767px) {
    .gh-hide-md {
        display: none;
    }
}

/* === Animation === */
@keyframes gh-fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes gh-slideDown {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.gh-animate-fade-in {
    animation: gh-fadeIn 0.15s ease-out;
}

.gh-animate-slide-down {
    animation: gh-slideDown 0.15s ease-out;
}

/* === Print Styles === */
@media print {
    .gh-no-print {
        display: none !important;
    }
}


/* === Community List & Feedback Detail Styles === */
.gh-container {
    max-width: 1216px;
    margin: 0 auto;
    padding: 24px 0;
}

/* List Header (Community/My Feedback) */
.gh-list-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--gh-border);
}

/* List Box (like GitHub issue list) */
.gh-list-box {
    border: 1px solid var(--gh-border);
    border-radius: var(--gh-radius-md);
    background: var(--gh-bg);
    overflow: hidden;
}

/* List Top Bar */
.gh-list-top-bar {
    background-color: var(--gh-bg-secondary);
    padding: 12px 16px;
    border-bottom: 1px solid var(--gh-border);
    display: flex;
    align-items: center;
    gap: 16px;
}

/* List Row */
.gh-row {
    padding: 12px 16px;
    border-bottom: 1px solid var(--gh-border);
    display: flex;
    align-items: flex-start;
    gap: 8px;
    transition: background-color 0.1s;
}
.gh-row:hover {
    background-color: var(--gh-bg-secondary);
}
.gh-row:last-child {
    border-bottom: none;
}

/* Title Link */
.gh-title-link {
    font-size: 16px;
    font-weight: 600;
    color: var(--gh-text-primary);
    text-decoration: none;
    word-break: break-all;
}
.gh-title-link:hover {
    color: var(--gh-link);
}

/* Meta Text */
.gh-meta {
    font-size: 12px;
    color: var(--gh-text-secondary);
    margin-top: 4px;
}

/* === Issue/Detail Styles === */
.gh-issue-container {
    max-width: 1216px;
    margin: 0 auto;
    padding: 32px 16px;
}

.gh-issue-header {
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--gh-border);
}

.gh-issue-title {
    font-size: 32px;
    font-weight: 400;
    color: var(--gh-text-primary);
    line-height: 1.25;
    margin-bottom: 8px;
}

.gh-issue-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 14px;
    color: var(--gh-text-secondary);
}

/* Issue Layout Grid */
.gh-issue-layout {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 32px;
}
@media (max-width: 900px) {
    .gh-issue-layout { grid-template-columns: 1fr; }
}

/* Comment Box */
.gh-comment-box {
    border: 1px solid var(--gh-border);
    border-radius: var(--gh-radius-md);
    margin-bottom: 32px;
    position: relative;
}

.gh-comment-header {
    background-color: var(--gh-bg-secondary);
    padding: 8px 16px;
    border-bottom: 1px solid var(--gh-border);
    border-radius: 6px 6px 0 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    color: var(--gh-text-secondary);
}

.gh-comment-body {
    padding: 16px;
    font-size: 14px;
    line-height: 1.6;
    color: var(--gh-text-primary);
    background: var(--gh-bg);
    border-radius: 0 0 6px 6px;
}

/* Sidebar */
.gh-sidebar-section {
    padding: 8px 0;
    border-bottom: 1px solid var(--gh-border);
    margin-bottom: 16px;
}

.gh-sidebar-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--gh-text-primary);
    margin-bottom: 8px;
    display: block;
}

.gh-sidebar-label {
    font-size: 12px;
    font-weight: 500;
    padding: 0 7px;
    line-height: 18px;
    border: 1px solid transparent;
    border-radius: 2em;
    display: inline-block;
}

/* Timeline */
.gh-timeline {
    position: relative;
    padding-left: 32px;
}
.gh-timeline::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 15px;
    width: 2px;
    background-color: var(--gh-border);
    z-index: 1;
}

/* Edit Styles */
.gh-edit-container {
    max-width: 1216px;
    margin: 0 auto;
    padding: 32px 16px;
}

.gh-edit-header {
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--gh-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.gh-edit-title {
    font-size: 24px;
    font-weight: 400;
    color: var(--gh-text-primary);
}

.gh-edit-layout {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 32px;
}
@media (max-width: 900px) {
    .gh-edit-layout { grid-template-columns: 1fr; }
}

/* Input Group */
.gh-input-group {
    border: 1px solid var(--gh-border);
    border-radius: var(--gh-radius-md);
    background-color: var(--gh-bg);
    margin-bottom: 16px;
    overflow: hidden;
}

.gh-input-title {
    width: 100%;
    padding: 8px 12px;
    font-size: 16px;
    background-color: var(--gh-bg-secondary);
    border: none;
    border-bottom: 1px solid var(--gh-border);
    outline: none;
    color: var(--gh-text-primary);
}
.gh-input-title:focus {
    background-color: var(--gh-bg);
    box-shadow: inset 0 0 0 1px var(--gh-link);
}

/* Select Styling */
.gh-select {
    width: 100%;
    padding: 5px 12px;
    font-size: 13px;
    border: 1px solid var(--gh-border);
    border-radius: var(--gh-radius-md);
    background-color: var(--gh-bg-secondary);
    color: var(--gh-text-primary);
    outline: none;
    cursor: pointer;
}
.gh-select:focus {
    border-color: var(--gh-link);
    box-shadow: 0 0 0 2px rgba(9,105,218,0.2);
}

/* Submit Button (Success) */
.gh-btn-success {
    background-color: var(--gh-success);
    color: #ffffff;
    border: 1px solid rgba(27,31,36,0.15);
    padding: 5px 16px;
    font-size: 14px;
    font-weight: 600;
    border-radius: var(--gh-radius-md);
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: background-color 0.2s;
}
.gh-btn-success:hover {
    background-color: var(--gh-success-dark, #2c974b);
}

/* Submit Button (Outline) */
.gh-btn-outline {
    background-color: var(--gh-bg-secondary);
    color: var(--gh-text-primary);
    border: 1px solid var(--gh-border);
    padding: 5px 16px;
    font-size: 14px;
    font-weight: 600;
    border-radius: var(--gh-radius-md);
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}
.gh-btn-outline:hover {
    background-color: var(--gh-bg-tertiary, #f3f4f6);
    border-color: var(--gh-text-primary);
}

/* Filter Select */
.gh-filter-select {
    background: none;
    border: 1px solid transparent;
    color: var(--gh-text-secondary);
    font-size: 13px;
    cursor: pointer;
    padding: 2px 4px;
    border-radius: var(--gh-radius-sm);
    transition: border-color 0.1s;
}
.gh-filter-select:hover {
    border-color: var(--gh-border);
}

/* Misc Utilities */
.gh-text-warning { color: var(--gh-warning); }
.gh-text-success { color: var(--gh-success); }
.gh-bg-success { background-color: var(--gh-success-bg); }

.gh-cursor-pointer { cursor: pointer; }
.gh-cursor-default { cursor: default; }
.gh-cursor-not-allowed { cursor: not-allowed; }

.gh-transition-all { transition: all 0.15s ease; }
.gh-transition-bg { transition: background-color 0.1s; }

.gh-border-bottom { border-bottom: 1px solid var(--gh-border); }
.gh-border-top { border-top: 1px solid var(--gh-border); }

.gh-overflow-y-auto { overflow-y: auto; }
.gh-overflow-hidden { overflow: hidden; }

.gh-whitespace-nowrap { white-space: nowrap; }
.gh-word-break-all { word-break: break-all; }

.gh-opacity-50 { opacity: 0.5; }
.gh-opacity-100 { opacity: 1; }


/* === Text Alignment === */
.gh-text-left { text-align: left; }
.gh-text-center { text-align: center; }
.gh-text-right { text-align: right; }

/* === Opacity Utilities === */
.gh-opacity-0 { opacity: 0; }
.gh-opacity-50 { opacity: 0.5; }
.gh-opacity-100 { opacity: 1; }

/* === White-space === */
.gh-whitespace-nowrap { white-space: nowrap; }

/* === Cursor (already defined, but ensure) === */
/* .gh-cursor-pointer, .gh-cursor-default, .gh-cursor-not-allowed already in previous script */

/* === Padding X Utilities === */
.gh-px-xs { padding-left: var(--gh-spacing-xs); padding-right: var(--gh-spacing-xs); }
.gh-px-sm { padding-left: var(--gh-spacing-sm); padding-right: var(--gh-spacing-sm); }
.gh-px-md { padding-left: var(--gh-spacing-md); padding-right: var(--gh-spacing-md); }
.gh-px-lg { padding-left: var(--gh-spacing-lg); padding-right: var(--gh-spacing-lg); }

/* === Dark Mode Support (Future) === */
[data-theme="dark"] {
    --gh-bg: #0d1117;
    --gh-bg-secondary: #161b22;
    --gh-border: #30363d;
    --gh-border-light: #21262d;
    --gh-text-primary: #c9d1d9;
    --gh-text-secondary: #8b949e;
    --gh-text-tertiary: #484f58;
    --gh-link: #58a6ff;
    --gh-success: #3fb950;
    --gh-success-bg: rgba(63,185,80,0.1);
    --gh-warning: #d29922;
    --gh-warning-bg: rgba(210,153,34,0.1);
    --gh-danger: #f85149;
    --gh-danger-bg: rgba(248,81,73,0.1);
    --gh-purple: #bc8cff;
    --gh-purple-bg: rgba(188,140,255,0.1);
}

/* === GitHub Header === */
.gh-header {
    background-color: var(--gh-bg-secondary);
    border-bottom: 1px solid var(--gh-border);
    height: 48px;
    position: sticky;
    top: 0;
    z-index: 9999;
}
.gh-header-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 16px;
    height: 100%;
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Logo */
.gh-logo {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--gh-text-primary);
    text-decoration: none;
    font-weight: 700;
    font-size: 15px;
    flex-shrink: 0;
}
.gh-logo:hover { color: var(--gh-link); }
.gh-logo-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--gh-text-primary);
}

/* Search Box */
.gh-search {
    flex: 0 1 280px;
    position: relative;
}
.gh-search input {
    width: 100%;
    height: 28px;
    background: var(--gh-bg);
    border: 1px solid var(--gh-border);
    border-radius: var(--gh-radius-md);
    color: var(--gh-text-primary);
    font-size: 12px;
    padding: 0 8px 0 28px;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.1s, width 0.2s;
    font-family: inherit;
}
.gh-search input::placeholder { color: var(--gh-text-tertiary); }
.gh-search input:focus {
    border-color: var(--gh-link);
    box-shadow: inset 0 0 0 1px var(--gh-link);
    width: 340px;
}
.gh-search-icon {
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gh-text-tertiary);
    font-size: 13px;
    pointer-events: none;
}

/* Nav menu links */
.gh-nav-links {
    display: flex;
    align-items: center;
    gap: 0;
    flex: 1;
}
.gh-nav-item {
    position: relative;
    height: 48px;
    display: flex;
    align-items: center;
}
.gh-nav-link {
    color: var(--gh-text-primary);
    font-size: 13px;
    font-weight: 500;
    padding: 0 10px;
    height: 48px;
    display: flex;
    align-items: center;
    gap: 4px;
    border: none;
    background: none;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.1s;
}
.gh-nav-link:hover { color: var(--gh-link); }
.gh-nav-link i { font-size: 14px; color: var(--gh-text-tertiary); }
.gh-nav-link svg { width: 10px; height: 10px; color: var(--gh-text-tertiary); margin-left: 2px; }

/* Dropdown */
.gh-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    min-width: 220px;
    background: var(--gh-bg);
    border: 1px solid var(--gh-border);
    border-radius: var(--gh-radius-lg);
    box-shadow: var(--gh-shadow-lg);
    display: none;
    z-index: 10001;
    padding: 4px 0;
}
.gh-nav-item:hover .gh-dropdown { display: block; }
.gh-dropdown a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    font-size: 13px;
    color: var(--gh-text-primary);
    text-decoration: none;
    transition: background 0.1s;
}
.gh-dropdown a:hover { background: var(--gh-bg-secondary); }
.gh-dropdown a i { font-size: 14px; color: var(--gh-text-tertiary); width: 16px; text-align: center; }
.gh-dropdown-divider {
    height: 1px;
    background: var(--gh-border);
    margin: 4px 0;
}
.gh-dropdown-header {
    padding: 4px 16px 4px;
    font-size: 11px;
    font-weight: 600;
    color: var(--gh-text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* User section */
.gh-user-section {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
}
.gh-icon-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--gh-radius-md);
    color: var(--gh-text-primary);
    font-size: 16px;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s;
    background: none;
    border: none;
    position: relative;
}
.gh-icon-btn:hover { background: var(--gh-bg-secondary); }
.gh-badge {
    position: absolute;
    top: 3px;
    right: 2px;
    width: 14px;
    height: 14px;
    background: var(--gh-danger);
    border: 2px solid var(--gh-bg);
    border-radius: 50%;
    font-size: 9px;
    font-weight: 700;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}
.gh-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--gh-text-tertiary);
    color: var(--gh-bg);
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.15s;
}
.gh-avatar:hover { border-color: var(--gh-link); }

/* Avatar Dropdown */
.gh-user-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 200px;
    background: var(--gh-bg);
    border: 1px solid var(--gh-border);
    border-radius: var(--gh-radius-lg);
    box-shadow: var(--gh-shadow-lg);
    display: none;
    z-index: 10001;
    padding: 4px 0;
}
.gh-user-wrap {
    position: relative;
}
.gh-user-wrap:hover .gh-user-dropdown { display: block; }
.gh-user-dropdown a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    font-size: 13px;
    color: var(--gh-text-primary);
    text-decoration: none;
    transition: background 0.1s;
}
.gh-user-dropdown a:hover { background: var(--gh-bg-secondary); }
.gh-user-dropdown a i { font-size: 13px; color: var(--gh-text-tertiary); }
.gh-user-info {
    padding: 8px 16px 6px;
    font-size: 12px;
    color: var(--gh-text-secondary);
    border-bottom: 1px solid var(--gh-border);
    margin-bottom: 4px;
}
.gh-user-info strong { display: block; color: var(--gh-text-primary); font-size: 13px; margin-bottom: 1px; }

/* Main Content */
.gh-main {
    max-width: 1280px;
    margin: 0 auto;
    padding: 24px 16px 64px;
}

/* Flash Messages */
.gh-flash {
    margin-bottom: 16px;
    padding: 12px 16px;
    border-radius: var(--gh-radius-md);
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid;
}
.gh-flash-success { background: var(--gh-success-bg); border-color: var(--gh-success); color: var(--gh-success); }
.gh-flash-error   { background: var(--gh-danger-bg); border-color: var(--gh-danger); color: var(--gh-danger); }

/* Mobile menu */
.gh-mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--gh-text-primary);
    font-size: 20px;
    cursor: pointer;
    padding: 4px;
}
@media (max-width: 768px) {
    .gh-mobile-toggle { display: flex; align-items: center; }
    .gh-nav-links { display: none; }
    .gh-search { display: none; }
}

/* ── Login Required Modal ── */
.login-modal-overlay {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(27, 31, 36, 0.6);
    backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
    z-index: 99999; display: none; align-items: center; justify-content: center;
}
.login-modal-overlay.active { display: flex; }
.login-modal-card {
    width: 380px; max-width: 90vw; background: var(--gh-bg);
    border: 1px solid var(--gh-border); border-radius: var(--gh-radius-xl);
    box-shadow: 0 16px 48px rgba(0,0,0,0.18), 0 4px 16px rgba(0,0,0,0.08);
    overflow: hidden; animation: lmSlideIn 0.25s ease-out;
}
@keyframes lmSlideIn {
    from { opacity: 0; transform: translateY(-20px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
.login-modal-header {
    padding: 24px 28px 16px; text-align: center;
    background: linear-gradient(135deg, var(--gh-bg-secondary) 0%, #eaeef2 100%);
    border-bottom: 1px solid #eaeef2;
}
.login-modal-icon {
    width: 56px; height: 56px; margin: 0 auto 14px;
    border-radius: 50%; background: linear-gradient(135deg, var(--gh-link) 0%, #0550ae 100%);
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 12px rgba(9,105,218,0.3);
}
.login-modal-icon i { font-size: 26px; color: #fff; }
.login-modal-title { font-size: 17px; font-weight: 700; color: var(--gh-text-primary); margin-bottom: 4px; }
.login-modal-subtitle { font-size: 13px; color: var(--gh-text-secondary); line-height: 1.5; }
.login-modal-body {
    padding: 28px; text-align: center;
}
.login-modal-body p {
    font-size: 14px; color: var(--gh-text-secondary); line-height: 1.7; margin-bottom: 24px;
}
.login-modal-btn-primary {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    width: 100%; padding: 11px 24px; font-size: 14px; font-weight: 600;
    color: #fff; background: var(--gh-link); border: none; border-radius: var(--gh-radius-lg);
    cursor: pointer; transition: all 0.15s ease;
    box-shadow: 0 1px 3px rgba(9,105,218,0.3);
}
.login-modal-btn-primary:hover { background: #0550ae; box-shadow: 0 4px 10px rgba(9,105,218,0.35); transform: translateY(-1px); }
.login-modal-btn-secondary {
    display: inline-flex; align-items: center; justify-content: center;
    width: 100%; padding: 10px 24px; font-size: 13px; font-weight: 500;
    color: var(--gh-text-secondary); background: transparent; border: 1px solid var(--gh-border); border-radius: var(--gh-radius-lg);
    cursor: pointer; transition: all 0.15s ease; margin-top: 10px;
}
.login-modal-btn-secondary:hover { background: var(--gh-bg-secondary); color: var(--gh-text-primary); }
