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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.container {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    max-width: 500px;
    width: 90%;
}

/* Logo Styling */
.logo-container {
    text-align: center;
    margin-bottom: 1.5rem;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.logo-icon {
    position: relative;
}

.dumbbell {
    display: flex;
    align-items: center;
    justify-content: center;
}

.weight {
    width: 20px;
    height: 35px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 4px;
    position: relative;
}

.weight::before {
    content: '';
    position: absolute;
    top: 5px;
    left: 2px;
    right: 2px;
    bottom: 5px;
    background: linear-gradient(135deg, #5a6fd8, #6a4c93);
    border-radius: 2px;
}

.bar {
    width: 30px;
    height: 6px;
    background: linear-gradient(135deg, #495057, #343a40);
    margin: 0 2px;
    border-radius: 3px;
}

.logo-text h1 {
    margin: 0;
    font-size: 1.8rem;
    font-weight: 800;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-text span {
    font-size: 0.9rem;
    color: #6c757d;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

h2 {
    text-align: center;
    color: #333;
    margin-bottom: 2rem;
    font-size: 1.5rem;
    font-weight: 600;
}

/* AI Assistant Styling */
.ai-panel {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    border: 2px solid #dee2e6;
}

.ai-panel h3 {
    margin-bottom: 0.5rem;
    color: #495057;
    font-size: 1.2rem;
}

.ai-panel p {
    color: #6c757d;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.ai-input-container {
    position: relative;
}

#ai-input {
    width: 100%;
    min-height: 80px;
    padding: 0.75rem;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
    margin-bottom: 1rem;
}

#ai-input:focus {
    outline: none;
    border-color: #667eea;
}

.ai-controls {
    display: flex;
    gap: 0.5rem;
}

.btn-voice {
    background: #28a745;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s;
    flex: 0 0 auto;
}

.btn-voice:hover {
    background: #218838;
    transform: scale(1.05);
}

.btn-voice.listening {
    background: #dc3545;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.btn-ai {
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    flex: 1;
}

.btn-ai:hover {
    background: #5a6fd8;
    transform: translateY(-2px);
}

.ai-result {
    margin-top: 1rem;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    border: 2px solid #28a745;
}

.ai-result h4 {
    color: #28a745;
    margin-bottom: 0.5rem;
}

#ai-suggestion {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.4;
}

.ai-actions {
    display: flex;
    gap: 0.5rem;
}

.ai-actions button {
    flex: 1;
}

.settings-panel, .workout-panel {
    width: 100%;
}

.input-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #555;
}

input, select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

input:focus, select:focus {
    outline: none;
    border-color: #667eea;
}

.input-group:has(select) {
    display: flex;
    gap: 0.5rem;
    align-items: end;
}

.input-group input {
    flex: 2;
}

.input-group select {
    flex: 1;
}

.btn-primary, .btn-secondary, .btn-danger {
    width: 100%;
    padding: 1rem;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5a6fd8;
    transform: translateY(-2px);
}

.btn-secondary {
    background: #6c757d;
    color: white;
    margin-right: 0.5rem;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-danger {
    background: #dc3545;
    color: white;
    margin-left: 0.5rem;
}

.btn-danger:hover {
    background: #c82333;
}

.timer-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 2rem;
}

.progress-section {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 12px;
    border: 2px solid #e9ecef;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    font-weight: 600;
    color: #495057;
}

.progress-bar-container {
    width: 100%;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    margin-bottom: 1rem;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #28a745, #20c997);
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 0%;
}

.interval-indicators {
    display: flex;
    gap: 4px;
    justify-content: center;
    flex-wrap: wrap;
}

.interval-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #dee2e6;
    border: 2px solid #adb5bd;
    transition: all 0.3s ease;
}

.interval-dot.completed {
    background: #28a745;
    border-color: #1e7e34;
}

.interval-dot.current {
    background: #667eea;
    border-color: #5a6fd8;
    transform: scale(1.3);
    box-shadow: 0 0 8px rgba(102, 126, 234, 0.5);
}

.interval-dot.warmup {
    background: #ffc107;
    border-color: #e0a800;
}

.interval-dot.cooldown {
    background: #17a2b8;
    border-color: #138496;
}

.interval-dot.cooldown.current {
    transform: scale(1.3);
    box-shadow: 0 0 8px rgba(23, 162, 184, 0.5);
}

.timer {
    text-align: center;
    padding: 1.5rem;
    border-radius: 12px;
    background: #f8f9fa;
}

.current-timer {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.timer h3 {
    margin-bottom: 0.5rem;
    font-size: 1rem;
    opacity: 0.9;
}

.time-display {
    font-size: 2rem;
    font-weight: bold;
    font-family: 'Courier New', monospace;
}

.progress-info {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 1.1rem;
    color: #666;
}

.controls {
    display: flex;
    gap: 0.5rem;
}

.controls button {
    flex: 1;
}

.hidden {
    display: none;
}

/* Responsiv design */
@media (max-width: 600px) {
    .timer-container {
        grid-template-columns: 1fr;
    }
    
    .time-display {
        font-size: 1.5rem;
    }
    
    .controls {
        flex-direction: column;
    }
    
    .controls button {
        margin: 0.25rem 0;
    }
    
    .progress-header {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
    
    .interval-indicators {
        gap: 3px;
    }
    
    .interval-dot {
        width: 10px;
        height: 10px;
    }
    
    .ai-controls {
        flex-direction: column;
    }
    
    .ai-actions {
        flex-direction: column;
    }
    
    .logo {
        flex-direction: column;
        gap: 0.5rem;
    }
}