/* ===== Reset & Base ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e9f0 100%);
    min-height: 100vh;
    color: #2c3e50;
    line-height: 1.6;
    padding: 20px;
}

/* ===== Container ===== */
.container {
    max-width: 900px;
    margin: 0 auto;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    padding: 40px;
    transition: box-shadow 0.3s ease;
}

/* ===== Header ===== */
.header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 2px solid #f0f0f0;
}

.header .icon {
    font-size: 48px;
    margin-bottom: 10px;
}

.header h1 {
    font-size: 32px;
    font-weight: 700;
    color: #c0392b;
    letter-spacing: -0.5px;
}

.header p {
    color: #7f8c8d;
    font-size: 16px;
    margin-top: 8px;
}

@media (max-width: 600px) {
    .container { padding: 24px 16px; }
    .header h1 { font-size: 24px; }
}

/* ===== Typography ===== */
h1, h2, h3 {
    font-weight: 600;
    letter-spacing: -0.3px;
}

h2 {
    font-size: 22px;
    color: #2c3e50;
    margin: 30px 0 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e74c3c;
    display: inline-block;
}

h3 {
    font-size: 18px;
    color: #34495e;
    margin: 20px 0 10px;
}

/* ===== Forms ===== */
form {
    margin: 20px 0;
}

label {
    display: block;
    font-weight: 500;
    margin-bottom: 6px;
    color: #34495e;
}

textarea, input[type="text"], select {
    width: 100%;
    padding: 14px 16px;
    font-size: 16px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    background: #fafafa;
    color: #2c3e50;
    transition: border-color 0.3s, box-shadow 0.3s;
    font-family: inherit;
    resize: vertical;
}

textarea:focus, input[type="text"]:focus {
    outline: none;
    border-color: #e74c3c;
    box-shadow: 0 0 0 4px rgba(231, 76, 60, 0.1);
    background: #fff;
}

textarea {
    min-height: 120px;
}

/* ===== Buttons ===== */
.button, button, input[type="submit"] {
    display: inline-block;
    padding: 14px 32px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    font-family: inherit;
}

.button-primary, input[type="submit"] {
    background: #c0392b;
    color: #fff;
}

.button-primary:hover, input[type="submit"]:hover {
    background: #e74c3c;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(231, 76, 60, 0.3);
}

.button-primary:active {
    transform: translateY(0);
}

.button-secondary {
    background: #ecf0f1;
    color: #2c3e50;
}

.button-secondary:hover {
    background: #dfe6e9;
}

.button-green {
    background: #27ae60;
    color: #fff;
}

.button-green:hover {
    background: #2ecc71;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(39, 174, 96, 0.3);
}

.button-red {
    background: #c0392b;
    color: #fff;
}

.button-red:hover {
    background: #e74c3c;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(192, 57, 43, 0.3);
}

/* ===== Checkbox Grid ===== */
.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
    margin: 12px 0 20px;
}

.checkbox-grid label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
    font-weight: 400;
}

.checkbox-grid label:hover {
    background: #e8f0fe;
}

.checkbox-grid input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #c0392b;
    cursor: pointer;
}

/* ===== Participant Card ===== */
.participant-card {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
    border: 1px solid #eef0f2;
}

.participant-card h3 {
    color: #c0392b;
    margin-top: 0;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 8px;
}

/* ===== Stats ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin: 16px 0;
}

.stat-card {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    border: 1px solid #eef0f2;
}

.stat-card .stat-value {
    font-size: 32px;
    font-weight: 700;
    color: #c0392b;
    display: block;
}

.stat-card .stat-label {
    font-size: 14px;
    color: #7f8c8d;
    margin-top: 4px;
}

/* ===== List Styling ===== */
ul.result-list {
    list-style: none;
    padding: 0;
}

ul.result-list li {
    padding: 14px 18px;
    background: #f8f9fa;
    border-radius: 10px;
    margin-bottom: 10px;
    border: 1px solid #eef0f2;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

ul.result-list li strong {
    color: #c0392b;
}

/* ===== Blockquote ===== */
blockquote {
    border-left: 4px solid #c0392b;
    background: #fdf2f2;
    padding: 16px 20px;
    margin: 16px 0;
    border-radius: 0 10px 10px 0;
    font-style: italic;
    color: #555;
}

/* ===== Link ===== */
a {
    color: #c0392b;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

a:hover {
    color: #e74c3c;
    text-decoration: underline;
}

/* ===== Hidden / Reveal ===== */
.hidden {
    display: none;
}

/* ===== Char counter ===== */
.char-counter {
    font-size: 14px;
    color: #95a5a6;
    margin-top: 4px;
    text-align: right;
}

/* ===== Alert / Message ===== */
.alert {
    padding: 16px 20px;
    border-radius: 10px;
    margin: 16px 0;
    font-weight: 500;
}

.alert-info {
    background: #eaf2f8;
    color: #2980b9;
    border: 1px solid #d4e6f1;
}

.alert-success {
    background: #eafaf1;
    color: #27ae60;
    border: 1px solid #d5f5e3;
}

.alert-warning {
    background: #fef9e7;
    color: #f39c12;
    border: 1px solid #fdebd0;
}

/* ===== Reactions ===== */
.reactions {
    margin: 20px 0;
    text-align: center;
}

.reactions-label {
    font-size: 15px;
    color: #7f8c8d;
    margin-bottom: 10px;
    font-weight: 500;
}

.reactions-form {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 0;
}

.reaction-form-item {
    margin: 0;
    display: inline-block;
}

.reaction-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    font-size: 24px;
    background: #f8f9fa;
    border: 2px solid #e0e0e0;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
}

.reaction-btn:hover {
    background: #fff;
    border-color: #c0392b;
    transform: scale(1.15);
}

.reaction-btn.active {
    background: #fff;
    border-color: #c0392b;
    box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.2);
    transform: scale(1.1);
}

.reaction-display {
    text-align: center;
    margin: 16px 0;
    padding: 12px;
    background: #fdf2f2;
    border-radius: 12px;
    border: 1px solid #f5d6d6;
}

.reaction-display p {
    font-size: 16px;
    color: #555;
    margin: 0;
}

.reaction-emoji {
    font-size: 36px;
    display: inline-block;
    vertical-align: middle;
    margin-left: 4px;
}

/* ===== Footer ===== */
.footer {
    text-align: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #f0f0f0;
    color: #95a5a6;
    font-size: 14px;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    body { padding: 12px; }
    .container { padding: 20px 14px; border-radius: 12px; }
    .header h1 { font-size: 22px; }
    .header .icon { font-size: 36px; }
    h2 { font-size: 18px; }
    .stats-grid { grid-template-columns: 1fr; }
    .checkbox-grid { grid-template-columns: 1fr; }
    ul.result-list li { flex-direction: column; align-items: flex-start; }
    .button, button, input[type="submit"] { width: 100%; text-align: center; }
}