* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: #0a0e27;
    color: white;
    overflow-x: hidden;
    min-height: 100vh;
}

::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.5);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #667eea, #764ba2);
    border-radius: 10px;
    border: 2px solid rgba(15, 23, 42, 0.5);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #764ba2, #a855f7);
}

::-webkit-scrollbar-corner {
    background: rgba(15, 23, 42, 0.5);
}

.background-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at top, #1a1f3a 0%, #0a0e27 100%);
    z-index: -2;
}

.grid-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(99, 102, 241, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(99, 102, 241, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: -1;
    animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
    0% { transform: translateY(0); }
    100% { transform: translateY(50px); }
}

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(10, 14, 39, 0);
    border-bottom: 1px solid rgba(99, 102, 241, 0);
    padding: 20px 0;
    box-shadow: 0 0 0 rgba(0, 0, 0, 0);
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
}

.navbar.scrolled {
    background: rgba(10, 14, 39, 0.98);
    border-bottom: 1px solid rgba(99, 102, 241, 0.4);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.6);
    padding: 15px 0;
}

.nav-links {
    display: inline-flex;
    gap: 10px;
    align-items: center;
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 15px;
    padding: 10px 20px;
    transition: all 0.3s ease;
}

.navbar.scrolled .nav-links {
    gap: 8px;
    padding: 8px 15px;
    background: rgba(15, 23, 42, 0.95);
    border-color: rgba(99, 102, 241, 0.4);
}

.nav-link {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-weight: 500;
    padding: 12px 24px;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    font-size: 15px;
    white-space: nowrap;
}

.navbar.scrolled .nav-link {
    padding: 10px 20px;
    font-size: 14px;
}

.nav-link:hover,
.nav-link.active {
    color: #fff;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    transform: translateY(-2px);
}

.container {
    display: flex;
    margin-top: 80px;
    min-height: calc(100vh - 80px);
}

.sidebar {
    width: 320px;
    min-width: 320px;
    background: rgba(15, 23, 42, 0.8);
    border-right: 1px solid rgba(99, 102, 241, 0.3);
    position: fixed;
    left: 0;
    top: 80px;
    bottom: 0;
    overflow-y: auto;
    z-index: 100;
    transition: all 0.3s ease;
}

.sidebar-header {
    padding: 2rem;
    text-align: center;
    border-bottom: 1px solid rgba(99, 102, 241, 0.2);
}

.sidebar .rules-icon {
    font-size: 3rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1rem;
    animation: bounce 2s infinite;
    display: inline-block;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-15px); }
    60% { transform: translateY(-8px); }
}

.sidebar-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1.5rem;
}

.search-container {
    margin-top: 1.5rem;
}

.search-input-wrapper {
    position: relative;
    margin-bottom: 1rem;
}

.search-input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 25px;
    color: white;
    font-size: 0.9rem;
    font-family: inherit;
    transition: all 0.3s ease;
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.search-input:focus {
    outline: none;
    border-color: #667eea;
    background: rgba(30, 41, 59, 0.8);
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.3);
    transform: scale(1.02);
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
    pointer-events: none;
    transition: all 0.3s ease;
}

.search-input:focus + .search-icon {
    color: #667eea;
}

.clear-search {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(102, 126, 234, 0.3);
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    transition: all 0.3s ease;
}

.clear-search:hover {
    background: rgba(102, 126, 234, 0.5);
    transform: translateY(-50%) scale(1.1);
}

.search-results {
    max-height: 200px;
    overflow-y: auto;
    background: rgba(15, 23, 42, 0.9);
    border-radius: 10px;
    border: 1px solid rgba(99, 102, 241, 0.2);
    display: none;
}

.search-results.active {
    display: block;
}

.search-result-item {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(99, 102, 241, 0.2);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.85rem;
}

.search-result-item:hover {
    background: rgba(102, 126, 234, 0.2);
    transform: translateX(5px);
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-section {
    color: #8b5cf6;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.search-result-text {
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.4;
    margin-top: 0.25rem;
}

.search-highlight {
    background: rgba(245, 158, 11, 0.4);
    color: #ffffff;
    padding: 0.1rem 0.2rem;
    border-radius: 3px;
    font-weight: 600;
}

.sidebar-nav {
    padding: 1rem 0;
}

.nav-list {
    list-style: none;
}

.nav-list li {
    margin: 0;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 2rem;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
    position: relative;
    overflow: hidden;
}

.sidebar-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.1), transparent);
    transition: left 0.5s ease;
}

.sidebar-link:hover::before {
    left: 100%;
}

.sidebar-link:hover,
.sidebar-link.active {
    color: white;
    background: rgba(102, 126, 234, 0.2);
    border-left-color: #667eea;
    transform: translateX(5px);
}

.sidebar-link i {
    width: 20px;
    text-align: center;
    color: #667eea;
    transition: all 0.3s ease;
}

.sidebar-link:hover i,
.sidebar-link.active i {
    color: #8b5cf6;
    transform: scale(1.1);
}

.main-content {
    flex: 1;
    margin-left: 320px;
    padding: 2rem;
    max-width: calc(100vw - 320px);
}

.content-section {
    display: none;
    animation: fadeInUp 0.8s ease-out;
}

.content-section.active {
    display: block;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid rgba(102, 126, 234, 0.3);
}

.section-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.rules-content {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.8) 0%, rgba(30, 41, 59, 0.6) 100%);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 20px;
    padding: 2rem;
    transition: all 0.3s ease;
}

.rules-content:hover {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.9) 0%, rgba(30, 41, 59, 0.7) 100%);
    box-shadow: 0 20px 40px rgba(102, 126, 234, 0.2);
}

.important-note {
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.4);
    border-radius: 15px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

.important-note::before {
    content: '⚠️';
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.5rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.8; }
    100% { transform: scale(1); opacity: 1; }
}

.important-note p {
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
    line-height: 1.6;
}

.general-rules h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #8b5cf6;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.rules-content ul {
    list-style: none;
    padding: 0;
}

.rules-content li {
    margin-bottom: 1rem;
    padding: 1rem;
    background: rgba(30, 41, 59, 0.4);
    border-radius: 10px;
    border-left: 4px solid #667eea;
    transition: all 0.3s ease;
    position: relative;
}

.rules-content li:hover {
    background: rgba(30, 41, 59, 0.6);
    transform: translateX(5px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.rules-content li strong {
    color: #ffffff;
    font-weight: 600;
    line-height: 1.6;
}

.rules-content ul ul {
    margin-top: 0.5rem;
    margin-left: 1rem;
}

.rules-content ul ul li {
    background: rgba(30, 41, 59, 0.3);
    border-left-color: #8b5cf6;
    margin-bottom: 0.5rem;
    padding: 0.5rem 1rem;
}

.rules-content li.animated {
    animation-fill-mode: forwards;
}

.highlighted-rule {
    background: rgba(245, 158, 11, 0.2) !important;
    border-left-color: #f59e0b !important;
    animation: highlightPulse 2s ease-in-out;
}

@keyframes highlightPulse {
    0% { 
        background: rgba(245, 158, 11, 0.4) !important;
        transform: scale(1.02);
    }
    50% { 
        background: rgba(245, 158, 11, 0.3) !important;
        transform: scale(1.01);
    }
    100% { 
        background: rgba(245, 158, 11, 0.2) !important;
        transform: scale(1);
    }
}

.floating-particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

@media (max-width: 1200px) {
    .sidebar {
        width: 280px;
        min-width: 280px;
    }
    
    .main-content {
        margin-left: 280px;
        max-width: calc(100vw - 280px);
    }
}

@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }
    
    .sidebar {
        position: relative;
        width: 100%;
        min-width: auto;
        top: 0;
        bottom: auto;
        height: auto;
        border-right: none;
        border-bottom: 1px solid rgba(99, 102, 241, 0.3);
    }
    
    .main-content {
        margin-left: 0;
        max-width: 100%;
        padding: 1rem;
    }
    
    .section-header h1 {
        font-size: 2rem;
    }
    
    .nav-links {
        gap: 5px;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .nav-link {
        padding: 8px 15px;
        font-size: 12px;
    }
    
    .sidebar-header {
        padding: 1rem;
    }
    
    .sidebar .rules-icon {
        font-size: 2rem;
    }
    
    .sidebar-header h2 {
        font-size: 1.2rem;
        margin-bottom: 1rem;
    }
    
    .sidebar-link {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
    
    .search-input {
        font-size: 16px;
    }
    
    .search-results {
        max-height: 150px;
    }
    
    .search-result-item {
        font-size: 0.8rem;
        padding: 0.5rem;
    }
}