:root {
    --primary-color: #2c3e50;
    --secondary-color: #34495e;
    --text-color: #333;
    --bg-color: #f5f5f5;
    --card-bg: #fff;
    --hover-color: #3498db;
    --border-color: #ddd;
    --header-height: 60px;
    --section-padding: 15px;
    --section-spacing: 15px;
    --section-border-radius: 8px;
    --transition-speed: 0.3s;
}

[data-theme="dark"] {
    --primary-color: #2980b9;
    --secondary-color: #3498db;
    --text-color: #f5f5f5;
    --bg-color: #1a1a1a;
    --card-bg: #2c2c2c;
    --hover-color: #3498db;
    --border-color: #444;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    transition: background-color var(--transition-speed), color var(--transition-speed);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

header {
    background-color: var(--primary-color);
    color: white;
    height: var(--header-height);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.header-title {
    display: flex;
    align-items: center;
}

.header-title h1 {
    font-size: 1.5rem;
    margin-left: 10px;
}

.theme-toggle {
    display: flex;
    align-items: center;
}

.toggle-label {
    margin-right: 10px;
    font-size: 0.9rem;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 24px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .toggle-slider {
    background-color: #2196F3;
}

input:checked + .toggle-slider:before {
    transform: translateX(24px);
}

.content {
    margin-top: var(--header-height);
    padding: 20px;
}

.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 300px;
    font-size: 1.2rem;
    color: var(--text-color);
}

.spinner {
    border: 4px solid rgba(0, 0, 0, 0.1);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border-left-color: var(--primary-color);
    animation: spin 1s linear infinite;
    margin-right: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

[data-theme="dark"] .spinner {
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-left-color: var(--primary-color);
}

.error-message {
    text-align: center;
    padding: 20px;
    color: #e74c3c;
    background-color: rgba(231, 76, 60, 0.1);
    border-radius: 5px;
    margin: 20px 0;
}

.bylaw-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.bylaw-title {
    font-size: 1.8rem;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.bylaw-subtitle {
    font-size: 1.2rem;
    color: var(--secondary-color);
    font-weight: normal;
}

.bylaw-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.bylaw-section {
    background-color: var(--card-bg);
    padding: var(--section-padding);
    margin-bottom: var(--section-spacing);
    border-radius: var(--section-border-radius);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.section-title {
    font-size: 1.2rem;
    margin-bottom: 10px;
    padding-bottom: 5px;
    border-bottom: 1px solid var(--border-color);
    color: var(--primary-color);
}

.section-content {
    font-size: 0.95rem;
}

.section-content p {
    margin-bottom: 10px;
}

.section-content ul {
    margin-left: 20px;
    margin-bottom: 10px;
}

.full-width {
    grid-column: 1 / -1;
}

.bylaw-text {
    white-space: pre-wrap;
    font-family: 'Courier New', Courier, monospace;
    max-height: 400px;
    overflow-y: auto;
    padding: 10px;
    background-color: var(--bg-color);
    border-radius: 5px;
    border: 1px solid var(--border-color);
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 15px;
    font-size: 0.9rem;
}

th, td {
    border: 1px solid var(--border-color);
    padding: 8px;
    text-align: left;
}

th {
    background-color: var(--primary-color);
    color: white;
}

tr:nth-child(even) {
    background-color: var(--bg-color);
}

/* Responsive styles */
@media (max-width: 992px) {
    .bylaw-container {
        grid-template-columns: 1fr;
    }
}

.close-button {
    position: fixed;
    top: 70px;
    right: 20px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    z-index: 101;
}

.close-button:hover {
    background-color: var(--hover-color);
} 