/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Colors - Clan ZAK Orange/Red Theme */
    --primary: #ff6b35;
    --primary-dark: #e55a27;
    --secondary: #f7931e;
    --success: #48bb78;
    --warning: #ed8936;
    --error: #f56565;
    --info: #4299e1;
    
    /* Neutral Colors */
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    
    /* Layout */
    --header-height: 64px;
    --sidebar-width: 280px;
    
    /* Typography */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    
    /* Transitions */
    --transition: all 0.3s ease;
}

body {
    font-family: var(--font-family);
    font-size: 16px;
    line-height: 1.6;
    color: var(--gray-800);
    background-color: var(--gray-50);
    padding-top: var(--header-height);
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: white;
    border-bottom: 1px solid var(--gray-200);
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}

.header-container {
    max-width: 100%;
    height: 100%;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-text {
    font-size: 1.25rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.mobile-menu-toggle span {
    width: 24px;
    height: 2px;
    background: var(--gray-700);
    transition: var(--transition);
    border-radius: 2px;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: var(--sidebar-width);
    height: calc(100vh - var(--header-height));
    background: white;
    border-right: 1px solid var(--gray-200);
    overflow-y: auto;
    z-index: 999;
    transition: var(--transition);
}

.sidebar-nav {
    padding: 1.5rem 0;
}

.nav-section {
    margin-bottom: 1.5rem;
}

.nav-section-title {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--gray-500);
    padding: 0 1.5rem;
    margin-bottom: 0.5rem;
}

.nav-list {
    list-style: none;
}

.nav-link {
    display: block;
    padding: 0.5rem 1.5rem;
    color: var(--gray-700);
    text-decoration: none;
    transition: var(--transition);
    border-left: 3px solid transparent;
}

.nav-link:hover {
    background-color: var(--gray-50);
    color: var(--primary);
}

.nav-link.active {
    background-color: rgba(102, 126, 234, 0.1);
    color: var(--primary);
    border-left-color: var(--primary);
    font-weight: 500;
}

/* Main Content */
.main-content {
    margin-left: var(--sidebar-width);
    padding: 2rem;
    min-height: calc(100vh - var(--header-height));
}

.content-wrapper {
    max-width: 900px;
    margin: 0 auto;
}

.content-section {
    margin-bottom: 4rem;
    scroll-margin-top: calc(var(--header-height) + 2rem);
}

/* Typography */
h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 1rem;
    line-height: 1.2;
}

h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 1rem;
    margin-top: 2rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--gray-200);
}

h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 0.75rem;
    margin-top: 1.5rem;
}

h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 0.5rem;
}

p {
    margin-bottom: 1rem;
    color: var(--gray-700);
}

.lead {
    font-size: 1.25rem;
    color: var(--gray-600);
    margin-bottom: 2rem;
}

/* Lists */
ul, ol {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

li {
    margin-bottom: 0.5rem;
    color: var(--gray-700);
}

/* Info Boxes */
.info-box {
    display: flex;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-radius: 8px;
    margin: 1.5rem 0;
    border-left: 4px solid;
}

.info-box-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.info-box.info {
    background-color: rgba(66, 153, 225, 0.1);
    border-left-color: var(--info);
    color: #2c5282;
}

.info-box.warning {
    background-color: rgba(237, 137, 54, 0.1);
    border-left-color: var(--warning);
    color: #7c2d12;
}

.info-box.error {
    background-color: rgba(245, 101, 101, 0.1);
    border-left-color: var(--error);
    color: #7f1d1d;
}

/* Feature List */
.feature-list {
    list-style: none;
    margin-left: 0;
}

.feature-list li {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    align-items: flex-start;
}

.feature-list .icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 600;
}

/* Rule Cards */
.rule-card {
    padding: 1.5rem;
    border-radius: 8px;
    margin: 1.5rem 0;
    border: 2px solid;
}

.rule-card.allowed {
    background-color: rgba(72, 187, 120, 0.05);
    border-color: var(--success);
}

.rule-card.forbidden {
    background-color: rgba(245, 101, 101, 0.05);
    border-color: var(--error);
}

.rule-card h4 {
    margin-top: 0;
}

.rule-card ul {
    margin-bottom: 0;
}

/* Grid Layout */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 1.5rem 0;
}

/* Cards */
.card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-200);
    transition: var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.card h4 {
    margin-top: 0;
    margin-bottom: 1rem;
}

.card ul {
    margin-bottom: 0;
}

/* Code Blocks */
.code-block {
    background: var(--gray-900);
    color: var(--gray-100);
    padding: 1.25rem;
    border-radius: 8px;
    margin: 1.5rem 0;
    overflow-x: auto;
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 0.875rem;
    line-height: 1.6;
}

.code-block.error {
    background: rgba(245, 101, 101, 0.1);
    color: var(--error);
    border: 2px solid var(--error);
}

.code-block pre {
    margin: 0;
    white-space: pre-wrap;
}

/* Tables */
.rules-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.rules-table thead {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
}

.rules-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
}

.rules-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--gray-200);
}

.rules-table tbody tr:last-child td {
    border-bottom: none;
}

.rules-table tbody tr:hover {
    background-color: var(--gray-50);
}

.rules-table .level-1 { background-color: rgba(72, 187, 120, 0.05); }
.rules-table .level-2 { background-color: rgba(66, 153, 225, 0.05); }
.rules-table .level-3 { background-color: rgba(237, 137, 54, 0.05); }
.rules-table .level-4 { background-color: rgba(245, 101, 101, 0.05); }
.rules-table .level-5 { background-color: rgba(245, 101, 101, 0.1); }

/* Badges */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
}

.badge.allowed {
    background-color: rgba(72, 187, 120, 0.2);
    color: #22543d;
}

.badge.forbidden {
    background-color: rgba(245, 101, 101, 0.2);
    color: #7f1d1d;
}

/* Stat Cards */
.stat-card {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
    box-shadow: var(--shadow-md);
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.875rem;
    opacity: 0.9;
}

/* Steps */
.steps {
    list-style: none;
    margin-left: 0;
    counter-reset: step-counter;
}

.steps li {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
    align-items: flex-start;
}

.step-number {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 700;
}

.step-content h4 {
    margin-top: 0;
    margin-bottom: 0.5rem;
}

.step-content p {
    margin-bottom: 0;
}

/* Footer */
.content-footer {
    margin-top: 4rem;
    padding: 2rem 0;
    border-top: 2px solid var(--gray-200);
}

.footer-content {
    text-align: center;
}

.footer-links {
    margin-top: 1rem;
}

.footer-links a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

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

/* Responsive Design */
@media (max-width: 1024px) {
    .sidebar {
        width: 250px;
    }
    
    .main-content {
        margin-left: 250px;
    }
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }
    
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.active {
        transform: translateX(0);
        box-shadow: var(--shadow-lg);
    }
    
    .main-content {
        margin-left: 0;
        padding: 1.5rem;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    h3 {
        font-size: 1.25rem;
    }
    
    .grid-2 {
        grid-template-columns: 1fr;
    }
    
    .rules-table {
        font-size: 0.875rem;
    }
    
    .rules-table th,
    .rules-table td {
        padding: 0.75rem 0.5rem;
    }
}

@media (max-width: 480px) {
    .header-container {
        padding: 0 1rem;
    }
    
    .logo-text {
        font-size: 1rem;
    }
    
    .main-content {
        padding: 1rem;
    }
    
    h1 {
        font-size: 1.75rem;
    }
    
    .lead {
        font-size: 1.125rem;
    }
    
    .info-box,
    .rule-card,
    .card {
        padding: 1rem;
    }
    
    .stat-card {
        padding: 1rem;
    }
    
    .stat-value {
        font-size: 1.5rem;
    }
    
    .rules-table {
        display: block;
        overflow-x: auto;
    }
}

/* Scrollbar Styling */
.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: var(--gray-100);
}

.sidebar::-webkit-scrollbar-thumb {
    background: var(--gray-400);
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: var(--gray-500);
}

/* Reward Card */
.reward-card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
    border: 2px solid var(--success);
    margin: 1.5rem 0;
    background: linear-gradient(135deg, rgba(72, 187, 120, 0.05), rgba(72, 187, 120, 0.02));
}

.reward-card h4 {
    color: var(--success);
    margin-top: 0;
}

/* Punishment Card */
.punishment-card {
    background: linear-gradient(135deg, rgba(245, 101, 101, 0.05), rgba(245, 101, 101, 0.02));
    padding: 1.5rem;
    border-radius: 8px;
    border: 2px solid var(--error);
    margin: 1.5rem 0;
}

.punishment-card ul {
    margin-bottom: 0;
}

/* Danger Card */
.danger-card {
    border: 2px solid var(--error) !important;
    background: linear-gradient(135deg, rgba(245, 101, 101, 0.05), rgba(245, 101, 101, 0.02)) !important;
}

.danger-card h4 {
    color: var(--error);
}

/* Contact Card */
.contact-card {
    background: white;
    padding: 1.25rem;
    border-radius: 8px;
    border-left: 4px solid var(--primary);
    box-shadow: var(--shadow);
    margin: 1rem 0;
}

.contact-card h4 {
    margin-top: 0;
    color: var(--primary);
}

.contact-card p {
    margin-bottom: 0.5rem;
    color: var(--gray-700);
    font-size: 0.95rem;
}

.contact-card.email-card {
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.05), rgba(247, 147, 30, 0.05));
    border-left-color: var(--secondary);
    text-align: center;
}

.contact-card.email-card h4 {
    color: var(--secondary);
    font-size: 1.1rem;
}

/* Rank Colors */
.rank-leader {
    background-color: rgba(255, 107, 53, 0.1);
}

.rank-officer {
    background-color: rgba(247, 147, 30, 0.1);
}

.rank-elder {
    background-color: rgba(72, 187, 120, 0.05);
}

.rank-member {
    background-color: rgba(66, 153, 225, 0.05);
}

.rank-recruit {
    background-color: rgba(200, 200, 200, 0.1);
}

/* Success Box */
.info-box.success {
    background-color: rgba(72, 187, 120, 0.1);
    border-left-color: var(--success);
    color: #22543d;
}
@media print {
    .header,
    .sidebar,
    .mobile-menu-toggle {
        display: none !important;
    }
    
    .main-content {
        margin-left: 0;
        padding: 0;
    }
    
    .content-section {
        page-break-inside: avoid;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.content-section {
    animation: fadeIn 0.5s ease-out;
}

/* Dark mode support (optional) */
@media (prefers-color-scheme: dark) {
    /* Uncomment to enable dark mode */
    /*
    :root {
        --gray-50: #111827;
        --gray-100: #1f2937;
        --gray-200: #374151;
        --gray-300: #4b5563;
        --gray-400: #6b7280;
        --gray-500: #9ca3af;
        --gray-600: #d1d5db;
        --gray-700: #e5e7eb;
        --gray-800: #f3f4f6;
        --gray-900: #f9fafb;
    }
    */
}
