:root {
    --primary: #5D4037; /* CodeChef Brown */
    --accent: #D84315;  /* CodeChef Orange */
    --dark: #2c3e50;
    --bg: #f5f5f5;
    --white: #ffffff;
    --gray: #95a5a6;
}

* { box-sizing: border-box; }

body { font-family: 'Inter', sans-serif; background: var(--bg); margin: 0; color: var(--dark); }
.container { max-width: 900px; margin: 0 auto; padding: 20px; }

header {
    background: var(--white);
    padding: 20px 30px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    margin-bottom: 20px;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.profile-info h1 { font-size: 1.6rem; margin: 0; color: var(--primary); }
.subtitle { font-size: 0.9rem; color: var(--gray); margin: 5px 0; }
.social-mini a { color: var(--dark); margin-right: 10px; font-size: 1.2rem; text-decoration: none; transition: color 0.2s; }
.social-mini a:hover { color: var(--accent); }

.stats-wrapper { display: flex; gap: 30px; }
.stat-box { text-align: center; }
.stat-label { display: block; font-size: 0.75rem; text-transform: uppercase; color: var(--gray); letter-spacing: 0.5px; }
.stat-val { font-size: 1.5rem; font-weight: 700; color: var(--accent); }

.sticky-wrapper { position: sticky; top: 15px; z-index: 100; margin-bottom: 20px; }
.controls-area {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 12px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    border: 1px solid rgba(0,0,0,0.05);
}
.search-box { position: relative; width: 100%; }
input {
    width: 100%;
    padding: 12px 15px 12px 40px;
    border: 1px solid #ddd;
    border-radius: 8px;
    outline: none;
    font-size: 1rem;
    transition: 0.2s;
}
input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(216, 67, 21, 0.1);
}
.search-box i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #aaa;
}

.table-container {
    background: var(--white);
    border-radius: 10px;
    overflow-x: auto;
    box-shadow: 0 2px 5px rgba(0,0,0,0.03);
}
table { width: 100%; border-collapse: collapse; min-width: 600px; }
th {
    background: #f8f9fa;
    padding: 15px;
    text-align: left;
    font-size: 0.9rem;
    color: #666;
    font-weight: 600;
    cursor: pointer;
    user-select: none;
    border-bottom: 2px solid #eee;
}
th:hover { background: #f0f0f0; color: var(--primary); }
td {
    padding: 15px;
    border-bottom: 1px solid #f1f1f1;
    font-size: 0.95rem;
    vertical-align: middle;
}
tr:hover { background: #fff8f5; }

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

.action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: 0.2s;
}
.btn-problem {
    background: #fff;
    border: 1px solid #ddd;
    color: #555;
    margin-right: 8px;
}
.btn-problem:hover {
    border-color: var(--primary);
    color: var(--primary);
}
.btn-sol {
    background: var(--primary);
    color: white;
    border: 1px solid var(--primary);
}
.btn-sol:hover {
    background: var(--accent);
    border-color: var(--accent);
}

footer {
    text-align: center;
    margin-top: 40px;
    padding: 20px;
    color: #888;
    font-size: 0.9rem;
}
.footer-links a {
    color: var(--primary);
    text-decoration: none;
    margin: 0 8px;
    font-weight: 500;
}
.footer-links a:hover {
    text-decoration: underline;
    color: var(--accent);
}

@media (max-width: 600px) {
    .header-content { justify-content: center; text-align: center; }
    .stats-wrapper { width: 100%; justify-content: space-around; margin-top: 10px; border-top: 1px solid #eee; padding-top: 15px; }
}