@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --primary: #c8102e;
    --primary-hover: #a50d25;
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --input-bg: #ffffff;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --nav-bg: rgba(255, 255, 255, 0.8);
    --header-gradient: linear-gradient(135deg, #c8102e 0%, #7b0a1c 100%);
}

[data-theme="dark"] {
    --bg-color: #0f172a;
    --card-bg: #1e293b;
    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    --border-color: #334155;
    --input-bg: #0f172a;
    --nav-bg: rgba(30, 41, 59, 0.8);
    --header-gradient: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
}

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

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    transition: background 0.3s, color 0.3s;
}

header {
    background: var(--header-gradient);
    color: white;
    padding: 60px 20px;
    text-align: center;
    position: relative;
    clip-path: polygon(0 0, 100% 0, 100% 85%, 0% 100%);
}

header h1 {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -0.025em;
    margin-bottom: 10px;
}

nav {
    background: var(--nav-bg);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    justify-content: center;
    gap: 30px;
    transition: background 0.3s;
}

nav a {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 600;
    font-size: 0.9rem;
    transition: color 0.2s;
}

nav a:hover {
    color: var(--primary);
}

.theme-toggle {
    position: absolute;
    right: 30px;
    top: 30px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 8px 16px;
    cursor: pointer;
    border-radius: 9999px;
    font-size: 0.85rem;
    font-weight: 500;
    width: auto;
}

.container {
    max-width: 1000px;
    margin: -40px auto 0;
    padding: 0 20px 60px;
    position: relative;
    z-index: 10;
}

.card {
    background: var(--card-bg);
    padding: 40px;
    margin-bottom: 30px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    box-shadow: var(--shadow-lg);
}

h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 10px;
}

h2::before {
    content: '';
    display: block;
    width: 4px;
    height: 24px;
    background: var(--primary);
    border-radius: 2px;
}

p {
    color: var(--text-muted);
    margin-bottom: 20px;
    font-size: 1.05rem;
}

ul {
    list-style: none;
    margin-bottom: 25px;
}

li {
    position: relative;
    padding-left: 25px;
    margin-bottom: 12px;
    color: var(--text-muted);
}

li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: bold;
}

label {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 8px;
    color: var(--text-main);
}

input, select, textarea {
    width: 100%;
    padding: 14px;
    margin-bottom: 25px;
    border-radius: 12px;
    border: 2px solid var(--border-color);
    background: var(--input-bg);
    color: var(--text-main);
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(200, 16, 46, 0.1);
}

button {
    background: var(--primary);
    color: white;
    padding: 16px 24px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 700;
    transition: all 0.2s;
    box-shadow: 0 4px 6px -1px rgba(200, 16, 46, 0.2);
}

button:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(200, 16, 46, 0.3);
}

button:active {
    transform: translateY(0);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease-out;
}

.modal-content {
    background-color: var(--card-bg);
    margin: 5% auto;
    padding: 40px;
    border: 1px solid var(--border-color);
    width: 90%;
    max-width: 800px;
    border-radius: 24px;
    box-shadow: var(--shadow-lg);
    position: relative;
    animation: slideUp 0.3s ease-out;
}

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

.close-modal {
    position: absolute;
    right: 25px;
    top: 20px;
    color: var(--text-muted);
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s;
}

.close-modal:hover {
    color: var(--primary);
}

.modal-body h2 {
    margin-top: 10px;
}

.modal-body .article-meta {
    margin-bottom: 25px;
}

.modal-body .full-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-main);
}

.read-more-btn {
    margin-top: 20px;
    padding: 10px 20px;
    background: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
    font-size: 0.9rem;
    width: auto;
    box-shadow: none;
}

.read-more-btn:hover {
    background: var(--primary);
    color: white;
}

/* Table Styles */
.table-container {
    overflow-x: auto;
    margin: 20px 0;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    background: var(--card-bg);
}

th, td {
    padding: 12px 15px;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}

th {
    background: rgba(200, 16, 46, 0.05);
    color: var(--primary);
    font-weight: 700;
}

tr:last-child td {
    border-bottom: none;
}

.clb-highlight {
    font-weight: 700;
    color: var(--primary);
}

footer {
    background: var(--card-bg);
    padding: 80px 20px;
    text-align: center;
    border-top: 1px solid var(--border-color);
}

.footer-links {
    margin: 20px 0;
}

.footer-links a {
    margin: 0 15px;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
}

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

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 10px;
}
::-webkit-scrollbar-track {
    background: var(--bg-color);
}
::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}
