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

:root {
    --primary-color: #4f46e5;
    --primary-hover: #4338ca;
    --secondary-color: #64748b;
    --danger-color: #ef4444;
    --success-color: #10b981;
    --background: #f8fafc;
    --card-background: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    --radius: 12px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: var(--text-primary);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.95);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
}

.title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.icon {
    font-size: 3rem;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.language-selector {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
}

.lang-btn {
    padding: 0.5rem 1rem;
    border: 2px solid var(--border-color);
    background: var(--card-background);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.lang-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.lang-btn:hover:not(.active) {
    border-color: var(--primary-color);
    background: #f0f4ff;
}

main {
    display: grid;
    gap: 2rem;
}

.card {
    background: var(--card-background);
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.card h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.participants-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.participant-item {
    display: grid;
    grid-template-columns: 2fr 2fr 1fr auto;
    gap: 1rem;
    padding: 1rem;
    background: var(--background);
    border-radius: 8px;
    align-items: end;
}

.participant-field {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.participant-field label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.participant-field select,
.participant-field input {
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
    background: white;
    transition: border-color 0.3s ease;
}

.participant-field select:focus,
.participant-field input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

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

.btn-primary:hover:not(:disabled) {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--secondary-color);
    color: white;
}

.btn-secondary:hover:not(:disabled) {
    background: #475569;
    transform: translateY(-2px);
}

.btn-danger {
    background: var(--danger-color);
    color: white;
}

.btn-danger:hover:not(:disabled) {
    background: #dc2626;
    transform: translateY(-2px);
}

.btn-remove {
    padding: 0.5rem 1rem;
    background: var(--danger-color);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-remove:hover {
    background: #dc2626;
}

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

.timer-display {
    font-size: 4rem;
    font-weight: 700;
    color: var(--primary-color);
    font-variant-numeric: tabular-nums;
    margin-bottom: 1rem;
    letter-spacing: 0.05em;
}

.cost-display {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.cost-value {
    font-weight: 700;
    color: var(--danger-color);
    font-size: 2rem;
}

.timer-controls {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
}

.report-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.stat-item {
    text-align: center;
    padding: 1.5rem;
    background: var(--background);
    border-radius: 8px;
}

.stat-label {
    display: block;
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary-color);
}

.report-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.tips-card {
    background: linear-gradient(135deg, #f0f4ff 0%, #e0e7ff 100%);
}

.tips-list {
    list-style: none;
    display: grid;
    gap: 1rem;
}

.tips-list li {
    padding: 1rem;
    background: white;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
    display: flex;
    align-items: center;
    transition: transform 0.3s ease;
}

.tips-list li:hover {
    transform: translateX(5px);
}

.tips-list li::before {
    content: '💡';
    margin-right: 1rem;
    font-size: 1.25rem;
}

footer {
    text-align: center;
    margin-top: 3rem;
    padding: 2rem;
    color: white;
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--radius);
}

@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    .title {
        font-size: 2rem;
    }
    
    .timer-display {
        font-size: 3rem;
    }
    
    .participant-item {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .report-stats {
        grid-template-columns: 1fr;
    }
    
    .language-selector {
        flex-wrap: wrap;
    }
}

@media (max-width: 480px) {
    .title {
        font-size: 1.5rem;
    }
    
    .timer-display {
        font-size: 2.5rem;
    }
    
    .cost-value {
        font-size: 1.5rem;
    }
    
    .card {
        padding: 1rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}