/* ==========================================================================
   BONE Server Portal Design System (White/Silver Dark Aesthetic)
   ========================================================================== */

/* Variables & Base Reset */
:root {
    --bg-primary: #040406;
    --bg-secondary: #0a0a0e;
    --card-bg: rgba(14, 14, 18, 0.65);
    --card-border: rgba(255, 255, 255, 0.04);
    --card-border-hover: rgba(255, 255, 255, 0.2);
    
    --text-primary: #ffffff;
    --text-secondary: #9ea2b0;
    --text-muted: #5e6270;
    
    --accent-white: #ffffff;
    --accent-white-glow: rgba(255, 255, 255, 0.25);
    --accent-red: #ff3e6c;
    --accent-red-glow: rgba(255, 62, 108, 0.35);
    --discord-blurple: #5865F2;
    --discord-glow: rgba(88, 101, 242, 0.35);

    --font-heading: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-secondary);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Scrollbar Customization */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
    background: #181822;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--accent-white);
}

/* Background Atmosphere Elements */
.bg-glow {
    position: fixed;
    top: -20%;
    left: 20%;
    width: 60vw;
    height: 60vh;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.03) 0%, rgba(255, 62, 108, 0.01) 50%, rgba(0,0,0,0) 100%);
    pointer-events: none;
    z-index: -1;
    filter: blur(80px);
    animation: pulseGlow 12s infinite alternate;
}

@keyframes pulseGlow {
    0% { transform: translateY(0) scale(1); }
    100% { transform: translateY(50px) scale(1.1); }
}

.bg-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: 40px 40px;
    background-image: 
        linear-gradient(to right, rgba(255, 255, 255, 0.01) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.01) 1px, transparent 1px);
    pointer-events: none;
    z-index: -2;
}

/* ==========================================================================
   Welcome Overlay for Game Selection
   ========================================================================== */
.welcome-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(3, 3, 5, 0.85);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.welcome-overlay.fade-out {
    opacity: 0;
    pointer-events: none;
    transform: scale(1.02);
}

.welcome-content {
    text-align: center;
    max-width: 900px;
    width: 100%;
    padding: 2rem;
}

.welcome-title {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 800;
    letter-spacing: 4px;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.15);
}

.welcome-subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 3.5rem;
    letter-spacing: 0.5px;
}

/* Spheres Grid and Buttons */
.spheres-grid {
    display: grid;
    grid-template-columns: repeat(4, 180px);
    gap: 2rem;
    justify-content: center;
}

.sphere-btn {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: #08080c;
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    outline: none;
}

.sphere-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    filter: brightness(0.32) contrast(0.85) grayscale(0.15);
    transition: filter 0.5s cubic-bezier(0.16, 1, 0.3, 1), transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.sphere-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(0,0,0,0.05) 0%, rgba(3,3,5,0.85) 90%);
    z-index: 1;
    transition: background 0.5s ease;
}

.sphere-glow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.08) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
    z-index: 2;
}

.sphere-label {
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--text-muted);
    position: relative;
    z-index: 3;
    transition: color 0.5s ease;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.95);
    margin-bottom: 0.1rem;
}

.sphere-status {
    position: relative;
    margin-top: 0.4rem;
    font-family: var(--font-heading);
    font-size: 0.6rem;
    font-weight: 800;
    letter-spacing: 1px;
    padding: 0.2rem 0.6rem;
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.03);
    color: rgba(255, 255, 255, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.03);
    transition: all 0.5s ease;
    z-index: 3;
}

/* Active Sphere State */
.sphere-btn.active:hover {
    transform: translateY(-8px) scale(1.05);
    border-color: rgba(255, 255, 255, 0.8);
    box-shadow: 
        0 10px 30px rgba(255, 255, 255, 0.15),
        inset 0 0 20px rgba(255, 255, 255, 0.05);
}

.sphere-btn.active:hover .sphere-image {
    filter: brightness(0.55) contrast(1.05) grayscale(0);
    transform: scale(1.1);
}

.sphere-btn.active:hover .sphere-overlay {
    background: radial-gradient(circle, rgba(0,0,0,0.01) 0%, rgba(3,3,5,0.7) 90%);
}

.sphere-btn.active:hover .sphere-glow {
    opacity: 1;
}

.sphere-btn.active:hover .sphere-label {
    color: var(--text-primary);
}

.sphere-btn.active .sphere-status.active {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
}

/* Inactive Sphere State */
.sphere-btn.inactive {
    opacity: 0.35;
    cursor: not-allowed;
}

.sphere-btn.inactive:hover {
    opacity: 0.6;
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.12);
}

.sphere-btn.inactive:hover .sphere-image {
    transform: scale(1.04);
}

/* Main Wrapper Blur effect */
.main-wrapper {
    transition: filter 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    min-height: 100vh;
}

.main-wrapper.blurred {
    filter: blur(25px);
    pointer-events: none;
}

/* ==========================================================================
   Layout Container
   ========================================================================== */
.container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 2rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* ==========================================================================
   Header Styles
   ========================================================================== */
.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    position: relative;
    overflow: hidden;
}

.header-logo-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
}

.logo-accent {
    position: absolute;
    top: -5px;
    left: 0;
    width: 30px;
    height: 3px;
    background: var(--accent-white);
    box-shadow: 0 0 10px var(--accent-white-glow);
}

.logo-title {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 800;
    letter-spacing: 2px;
    color: var(--text-primary);
    line-height: 1;
}

.logo-subtitle {
    font-family: var(--font-heading);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 4px;
    color: var(--text-primary);
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
}

.server-badge {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 1.2rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 30px;
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-primary);
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background: var(--accent-white);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--accent-white);
    animation: pulse 1.8s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.9); opacity: 0.6; }
    50% { transform: scale(1.2); opacity: 1; box-shadow: 0 0 14px var(--accent-white); }
    100% { transform: scale(0.9); opacity: 0.6; }
}

/* ==========================================================================
   Dashboard Grid Layout
   ========================================================================== */
.dashboard {
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: 2rem;
    align-items: start;
    flex-grow: 1;
}

.sidebar {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* ==========================================================================
   Card Component Design
   ========================================================================== */
.card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 1.8rem;
    position: relative;
    overflow: hidden;
    transition: transform var(--transition-normal), border-color var(--transition-normal);
}

.card:hover {
    border-color: var(--card-border-hover);
    transform: translateY(-2px);
}

.card-glow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.02) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.card-header {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 1.2rem;
    position: relative;
    z-index: 1;
}

.card-icon {
    font-size: 1.2rem;
    color: var(--text-primary);
    text-shadow: 0 0 8px var(--accent-white-glow);
}

.card-header h3 {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
}

.card-body {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Server Status Card Sub-Elements */
.status-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.95rem;
}

.status-label {
    color: var(--text-muted);
}

.status-value {
    color: var(--text-primary);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.status-pulse-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--text-muted);
    display: inline-block;
    transition: background-color var(--transition-fast), box-shadow var(--transition-fast);
}

.status-pulse-dot.online {
    background: var(--accent-white);
    box-shadow: 0 0 8px var(--accent-white-glow);
    animation: pulse 1.8s infinite;
}

.status-pulse-dot.offline {
    background: var(--accent-red);
    box-shadow: 0 0 8px var(--accent-red-glow);
}

.status-bar-container {
    width: 100%;
    height: 6px;
    background: #141418;
    border-radius: 10px;
    overflow: hidden;
    margin-top: 0.2rem;
}

.status-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #ffffff, #888888);
    box-shadow: 0 0 8px var(--accent-white-glow);
    border-radius: 10px;
    position: relative;
    transition: width 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.server-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-top: 0.4rem;
    transition: color var(--transition-fast);
}

/* Quick Connect Card Copy Fields */
.copy-field {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    padding: 0.8rem 1rem;
    cursor: pointer;
    transition: background var(--transition-fast), border-color var(--transition-fast);
}

.copy-field:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.08);
}

.copy-label {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--text-muted);
}

.copy-input-group {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.copy-value {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    color: var(--text-primary);
    font-weight: 500;
}

.btn-copy {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1rem;
    padding: 0.2rem;
    transition: color var(--transition-fast), transform var(--transition-fast);
}

.copy-field:hover .btn-copy {
    color: var(--text-primary);
}

.btn-copy:active {
    transform: scale(0.9);
}

/* Discord Custom Widget Styling */
.discord-card {
    transition: transform var(--transition-normal), border-color var(--transition-normal);
}

.discord-card:hover {
    border-color: rgba(88, 101, 242, 0.4);
}

.discord-card .card-icon {
    color: var(--discord-blurple);
    text-shadow: 0 0 8px var(--discord-glow);
}

.discord-custom-widget {
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid rgba(255, 255, 255, 0.03);
    border-radius: 14px;
    padding: 1.1rem;
    margin-bottom: 0.5rem;
    width: 100%;
}

.discord-guild-row {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 1rem;
}

.discord-guild-avatar-wrap {
    position: relative;
}

.discord-guild-avatar {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: var(--discord-blurple);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: #ffffff;
    box-shadow: 0 2px 10px rgba(88, 101, 242, 0.3);
}

.discord-guild-details h4 {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.15rem;
    line-height: 1.2;
}

.discord-status-badge {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.discord-online-dot {
    width: 6px;
    height: 6px;
    background: #23a55a;
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(35, 165, 90, 0.6);
}

#discord-online-count {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-secondary);
}

.discord-members-preview-title {
    font-family: var(--font-heading);
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 0.6rem;
    letter-spacing: 0.5px;
}

.discord-members-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    min-height: 32px;
    margin-bottom: 0.2rem;
}

.discord-member-avatar-wrap {
    position: relative;
    width: 32px;
    height: 32px;
    cursor: pointer;
}

.discord-member-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    background: #181822;
    border: 1.5px solid rgba(255, 255, 255, 0.08);
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s;
}

.discord-member-avatar-wrap:hover .discord-member-avatar {
    transform: translateY(-3px) scale(1.1);
    border-color: #ffffff;
    box-shadow: 0 4px 10px rgba(255,255,255,0.15);
    z-index: 10;
}

.discord-member-status-dot {
    position: absolute;
    bottom: -1px;
    right: -1px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    border: 1.8px solid #0d0d12;
}

.discord-member-status-dot.online { background: #23a55a; }
.discord-member-status-dot.idle { background: #f0b232; }
.discord-member-status-dot.dnd { background: #f23f43; }

/* Discord Shimmer Loading Animation */
.discord-loading-shimmer {
    display: flex;
    gap: 0.45rem;
    width: 100%;
}

.discord-loading-shimmer span {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.03);
    animation: pulseShimmer 1.5s infinite ease-in-out;
}

.discord-loading-shimmer span:nth-child(2) { animation-delay: 0.2s; }
.discord-loading-shimmer span:nth-child(3) { animation-delay: 0.4s; }
.discord-loading-shimmer span:nth-child(4) { animation-delay: 0.6s; }
.discord-loading-shimmer span:nth-child(5) { animation-delay: 0.8s; }

@keyframes pulseShimmer {
    0%, 100% { opacity: 0.35; background: rgba(255, 255, 255, 0.02); }
    50% { opacity: 0.9; background: rgba(255, 255, 255, 0.08); }
}

.discord-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.btn-discord {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.6rem;
    background: var(--discord-blurple);
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 700;
    font-family: var(--font-heading);
    font-size: 0.95rem;
    padding: 0.9rem;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px var(--discord-glow);
    transition: filter var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
}

.btn-discord:hover {
    filter: brightness(1.1);
    box-shadow: 0 6px 20px rgba(88, 101, 242, 0.5);
    transform: translateY(-1px);
}

.btn-discord:active {
    transform: translateY(0);
}

/* ==========================================================================
   Rules Container and Main Rules Card
   ========================================================================== */
.rules-container {
    display: flex;
    flex-direction: column;
}

.rules-card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 2.2rem;
    position: relative;
    overflow: hidden;
    width: 100%;
}

.rules-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1.5rem;
    margin-bottom: 2rem;
    position: relative;
    z-index: 1;
}

.header-text h2 {
    font-family: var(--font-heading);
    font-size: 1.7rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.4rem;
}

.header-text p {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Live Rules Search Bar */
.search-wrapper {
    position: relative;
    width: 320px;
}

.search-icon {
    position: absolute;
    left: 1.1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.95rem;
    pointer-events: none;
    transition: color var(--transition-fast);
}

#rule-search {
    width: 100%;
    background: rgba(20, 20, 26, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 14px;
    padding: 0.85rem 1rem 0.85rem 2.8rem;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.9rem;
    outline: none;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

#rule-search:focus {
    border-color: var(--accent-white);
    background: rgba(20, 20, 26, 0.8);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.08);
}

#rule-search:focus + .search-icon {
    color: var(--text-primary);
}

/* Rules Navigation Tabs */
.rules-tabs {
    display: flex;
    gap: 0.6rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    padding-bottom: 1rem;
    margin-bottom: 2rem;
    position: relative;
    z-index: 1;
}

.tab-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.95rem;
    padding: 0.8rem 1.4rem;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    transition: color var(--transition-fast), background var(--transition-fast);
}

.tab-btn i {
    font-size: 1rem;
}

.tab-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.02);
}

.tab-btn.active {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

/* Rules Tab Content Panels */
.rules-content {
    position: relative;
    z-index: 1;
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
    animation: fadeIn var(--transition-normal);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Specific Section Headers for exact rules text */
.rules-section-title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    letter-spacing: 0.5px;
}

.rules-section-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 1.8rem;
    line-height: 1.6;
    border-left: 2px solid rgba(255, 255, 255, 0.1);
    padding-left: 1rem;
}

.rules-category-header {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 2.2rem 0 1rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    letter-spacing: 1px;
}

.important-note-box {
    margin-top: 2rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 1.2rem;
}

.important-note-box h5 {
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.important-note-box p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
}

/* ==========================================================================
   Accordion Rule Item Design
   ========================================================================== */
.accordion-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.accordion-item {
    background: rgba(20, 20, 26, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.03);
    border-radius: 14px;
    overflow: hidden;
    transition: border-color var(--transition-fast), background var(--transition-fast), box-shadow var(--transition-fast);
}

.accordion-item:hover {
    border-color: rgba(255, 255, 255, 0.08);
    background: rgba(20, 20, 26, 0.65);
}

.accordion-item.active {
    border-color: rgba(255, 255, 255, 0.15);
    background: rgba(20, 20, 26, 0.8);
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.accordion-header {
    display: flex;
    align-items: center;
    padding: 1.2rem 1.5rem;
    cursor: pointer;
    user-select: none;
    gap: 1.2rem;
}

.rule-num {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-primary);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.8rem;
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
    min-width: 32px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.03);
    transition: background var(--transition-fast), color var(--transition-fast);
}

.accordion-item.active .rule-num {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.2);
}

.accordion-header h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    flex-grow: 1;
}

.arrow-icon {
    font-size: 0.85rem;
    color: var(--text-muted);
    transition: transform var(--transition-normal), color var(--transition-normal);
}

.accordion-item.active .arrow-icon {
    transform: rotate(180deg);
    color: var(--text-primary);
}

/* Accordion Expansion Body */
.accordion-body {
    max-height: 0;
    overflow: hidden;
    padding: 0 1.5rem;
    opacity: 0;
    transition: max-height var(--transition-normal) ease-out, padding var(--transition-normal) ease-out, opacity var(--transition-normal) ease-out;
}

.accordion-item.active .accordion-body {
    max-height: 500px;
    padding: 0 1.5rem 1.5rem 1.5rem;
    opacity: 1;
}

.accordion-body p {
    font-size: 0.92rem;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 0.6rem;
}

.accordion-body p:last-child {
    margin-bottom: 0;
}

/* Search Fail State Banner */
#no-results {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 4rem 2rem;
    text-align: center;
    position: relative;
    z-index: 1;
}

#no-results i {
    font-size: 2.5rem;
    color: var(--text-muted);
}

#no-results p {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.hidden {
    display: none !important;
}

/* ==========================================================================
   Footer Component
   ========================================================================== */
.main-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: color var(--transition-fast);
}

.footer-links a:hover {
    color: var(--text-primary);
}

/* ==========================================================================
   Toast Notification Message
   ========================================================================== */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    background: #111115;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 0.9rem 1.4rem;
    color: var(--text-primary);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.9rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    z-index: 9999;
    transform: translateY(0);
    animation: slideInUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.toast-icon {
    font-size: 1.1rem;
}

/* ==========================================================================
   Responsive Viewports Configuration (Media Queries)
   ========================================================================== */
@media (max-width: 1024px) {
    .dashboard {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 1.5rem;
    }
}

@media (max-width: 800px) {
    .spheres-grid {
        grid-template-columns: repeat(2, 160px);
        gap: 1.5rem;
    }
    
    .sphere-btn {
        width: 160px;
        height: 160px;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 1rem;
        gap: 1.5rem;
    }
    
    .main-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
        align-items: center;
        padding: 1.2rem;
    }
    
    .rules-card {
        padding: 1.5rem;
    }
    
    .rules-card-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-wrapper {
        width: 100%;
    }
    
    .rules-tabs {
        flex-direction: column;
        gap: 0.4rem;
        border-bottom: none;
    }
    
    .tab-btn {
        width: 100%;
        justify-content: center;
    }
    
    .main-footer {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
        padding: 1.2rem;
    }
    
    .footer-links {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .welcome-title {
        font-size: 2.2rem;
    }
    
    .spheres-grid {
        grid-template-columns: 140px;
        gap: 1.2rem;
    }
    
    .sphere-btn {
        width: 140px;
        height: 140px;
    }
}
