* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.header {
    text-align: center;
    margin-bottom: 40px;
    color: white;
}

.header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

.main-content {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

section {
    margin-bottom: 40px;
}

section:last-child {
    margin-bottom: 0;
}

h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: #2d3748;
}

/* Секция цели */
.goal-input {
    display: flex;
    gap: 15px;
    align-items: center;
}

#goalInput {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

#goalInput:focus {
    outline: none;
    border-color: #667eea;
}

/* Кнопки */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-success {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    color: white;
}

.btn-danger {
    background: linear-gradient(135deg, #f56565 0%, #e53e3e 100%);
    color: white;
}

.btn-secondary {
    background: #718096;
    color: white;
}

.btn-icon {
    font-size: 1.2rem;
    font-weight: bold;
}

/* Прогресс */
.progress-container {
    display: flex;
    align-items: center;
    gap: 40px;
    flex-wrap: wrap;
}

.progress-bar-container {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    min-width: 300px;
}

.progress-bar {
    width: 100%;
    height: 40px;
    background: #e2e8f0;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    transition: width 0.8s ease;
    width: 0%;
}

.progress-text {
    text-align: center;
    font-weight: 600;
}

#currentScore {
    font-size: 2.5rem;
    color: #2d3748;
    display: block;
}

.progress-label {
    font-size: 1rem;
    color: #718096;
}

#goalScore {
    font-weight: 600;
    color: #667eea;
}

.progress-percentage {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.2rem;
    font-weight: 700;
    color: white;
    text-shadow: 0 2px 4px rgba(0,0,0,0.7);
    z-index: 2;
    pointer-events: none;
    background: rgba(0,0,0,0.3);
    padding: 4px 8px;
    border-radius: 6px;
    backdrop-filter: blur(2px);
}

.progress-stats {
    flex: 1;
    min-width: 250px;
}

.stat {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #e2e8f0;
}

.stat:last-child {
    border-bottom: none;
}

.stat-label {
    color: #718096;
    font-weight: 500;
}

.stat span:last-child {
    font-weight: 600;
    color: #2d3748;
}

.wins-counter {
    color: #38a169 !important;
}

.losses-counter {
    color: #e53e3e !important;
}

/* Кнопки действий */
.action-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.action-buttons .btn {
    min-width: 120px;
    justify-content: center;
}

/* История */
.history-list {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 20px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 10px;
}

.history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    margin-bottom: 8px;
    border-radius: 8px;
    background: #f7fafc;
    transition: background-color 0.3s ease;
}

.history-item:hover {
    background: #edf2f7;
}

.history-item:last-child {
    margin-bottom: 0;
}

.history-score {
    font-weight: 600;
    font-size: 1.1rem;
}

.history-score.positive {
    color: #38a169;
}

.history-score.negative {
    color: #e53e3e;
}

.history-time {
    color: #718096;
    font-size: 0.9rem;
}

.history-empty {
    text-align: center;
    color: #a0aec0;
    padding: 40px 20px;
    font-style: italic;
}

/* Адаптивность */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .main-content {
        padding: 20px;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .progress-container {
        flex-direction: column;
        text-align: center;
    }
    
    .goal-input {
        flex-direction: column;
        align-items: stretch;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .action-buttons .btn {
        min-width: auto;
    }
}

/* Анимации */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.history-item {
    animation: fadeIn 0.3s ease;
}

/* Цвета прогресс-бара в зависимости от прогресса */
.progress-bar-fill.progress-low {
    background: linear-gradient(135deg, #e53e3e 0%, #c53030 100%);
}

.progress-bar-fill.progress-medium {
    background: linear-gradient(135deg, #ed8936 0%, #dd6b20 100%);
}

.progress-bar-fill.progress-high {
    background: linear-gradient(135deg, #38a169 0%, #2f855a 100%);
}

.progress-bar-fill.progress-complete {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
} 