/* tempo-trainer-styles.css - Styling for the Tempo Trainer Demo */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;700&family=Crimson+Pro:wght@300;400;600&display=swap');

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

:root {
    --primary: #1a1a2e;
    --secondary: #16213e;
    --accent: #c9a961;
    --accent-light: #e8d7b1;
    --text: #e8e8e8;
    --text-muted: #a8a8b8;
    --success: #4ecca3;
    --error: #e84545;
    --metronome: #ffd700;
}

body {
    font-family: 'Crimson Pro', serif;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.6;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 30%, rgba(201, 169, 97, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(201, 169, 97, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem;
    position: relative;
    z-index: 1;
}

header {
    text-align: center;
    padding: 3rem 0;
    border-bottom: 2px solid var(--accent);
    margin-bottom: 3rem;
    animation: fadeInDown 0.8s ease-out;
}

h1 {
    font-family: 'Cinzel', serif;
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 0.5rem;
    letter-spacing: 2px;
    text-shadow: 0 2px 10px rgba(201, 169, 97, 0.3);
}

.subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
    font-weight: 300;
    letter-spacing: 1px;
}

.author {
    margin-top: 1rem;
    font-size: 1rem;
    color: var(--accent-light);
    font-style: italic;
}

.intro {
    background: rgba(255, 255, 255, 0.03);
    border-left: 4px solid var(--accent);
    padding: 2rem;
    margin-bottom: 3rem;
    border-radius: 0 8px 8px 0;
    backdrop-filter: blur(10px);
    animation: fadeIn 1s ease-out 0.3s both;
}

.intro p {
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.intro p:last-child {
    margin-bottom: 0;
}

.mode-selector {
    display: flex;
    gap: 1rem;
    margin-bottom: 3rem;
    animation: fadeIn 1s ease-out 0.5s both;
}

.mode-btn {
    flex: 1;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid var(--accent);
    color: var(--text);
    font-family: 'Cinzel', serif;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 8px;
    position: relative;
    overflow: hidden;
}

.mode-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(201, 169, 97, 0.2), transparent);
    transition: left 0.5s ease;
}

.mode-btn:hover::before {
    left: 100%;
}

.mode-btn:hover {
    background: rgba(201, 169, 97, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(201, 169, 97, 0.2);
}

.mode-btn.active {
    background: var(--accent);
    color: var(--primary);
    font-weight: 600;
    box-shadow: 0 4px 20px rgba(201, 169, 97, 0.3);
}

.mode-subtitle {
    font-size: 0.85em;
    font-weight: normal;
    margin-top: 5px;
    opacity: 0.9;
}

.card {
    background: rgba(255, 255, 255, 0.05);
    padding: 2rem;
    border-radius: 12px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(201, 169, 97, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    margin-bottom: 2rem;
}

.section-title {
    font-family: 'Cinzel', serif;
    font-size: 1.4rem;
    color: var(--accent);
    margin-bottom: 1.5rem;
    letter-spacing: 1px;
    border-bottom: 1px solid rgba(201, 169, 97, 0.3);
    padding-bottom: 0.5rem;
}

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

label {
    display: block;
    font-family: 'Cinzel', serif;
    color: var(--accent-light);
    font-size: 1rem;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

input[type="number"],
input[type="text"] {
    width: 100%;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(201, 169, 97, 0.3);
    color: var(--text);
    font-size: 1.1rem;
    font-family: 'Crimson Pro', serif;
    border-radius: 6px;
    transition: all 0.3s ease;
}

input[type="number"]::placeholder,
input[type="text"]::placeholder {
    color: var(--text-muted);
    opacity: 0.6;
}

input:focus {
    outline: none;
    border-color: var(--accent);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 20px rgba(201, 169, 97, 0.2);
}

.step-display {
    background: rgba(201, 169, 97, 0.1);
    padding: 2rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    border: 1px solid rgba(201, 169, 97, 0.3);
}

.tempo-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.tempo-stat {
    background: rgba(255, 255, 255, 0.05);
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid rgba(201, 169, 97, 0.2);
    text-align: center;
}

.tempo-stat-label {
    font-size: 0.75em;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

.tempo-stat-value {
    font-family: 'Cinzel', serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--text);
}

.tempo-stat-value.highlight {
    color: var(--accent);
    text-shadow: 0 2px 10px rgba(201, 169, 97, 0.3);
}

.button-group {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.btn {
    flex: 1;
    padding: 1.2rem;
    font-family: 'Cinzel', serif;
    font-size: 1.1rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:active::after {
    width: 300px;
    height: 300px;
}

.btn-success {
    background: var(--success);
    color: var(--primary);
    font-weight: 600;
}

.btn-success:hover {
    background: #5fd6b3;
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(78, 204, 163, 0.3);
}

.btn-error {
    background: var(--error);
    color: white;
    font-weight: 600;
}

.btn-error:hover {
    background: #ff5555;
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(232, 69, 69, 0.3);
}

.btn-primary {
    background: var(--accent);
    color: var(--primary);
    font-weight: 600;
}

.btn-primary:hover {
    background: var(--accent-light);
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(201, 169, 97, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text);
    border: 2px solid var(--accent);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

.history {
    margin-top: 2rem;
}

.history-item {
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border-left: 4px solid var(--text-muted);
    margin-bottom: 0.75rem;
    border-radius: 0 6px 6px 0;
    font-size: 1rem;
    transition: all 0.3s ease;
    animation: slideIn 0.3s ease-out;
}

.history-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.history-item.success {
    border-left-color: var(--success);
    background: rgba(78, 204, 163, 0.05);
}

.history-item.error {
    border-left-color: var(--error);
    background: rgba(232, 69, 69, 0.05);
}

.result-card {
    background: linear-gradient(135deg, rgba(201, 169, 97, 0.3), rgba(201, 169, 97, 0.1));
    border: 2px solid var(--accent);
    color: var(--text);
    padding: 3rem;
    border-radius: 12px;
    margin-top: 2rem;
    animation: fadeIn 0.5s ease-out;
}

.result-card h3 {
    font-family: 'Cinzel', serif;
    font-size: 2rem;
    color: var(--accent);
    margin-bottom: 1rem;
    letter-spacing: 1px;
}

.result-info {
    font-size: 1.2rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.result-info strong {
    color: var(--accent);
}

.warning-card {
    background: rgba(255, 193, 7, 0.1);
    border: 2px solid #ffc107;
    color: #ffecb3;
    padding: 2rem;
    border-radius: 8px;
    margin-top: 2rem;
    animation: fadeIn 0.5s ease-out;
}

.warning-card h4 {
    font-family: 'Cinzel', serif;
    margin-bottom: 1rem;
    color: #ffd54f;
    font-size: 1.3rem;
}

.warning-card p {
    margin-bottom: 1rem;
    line-height: 1.6;
}

.warning-card p:last-child {
    margin-bottom: 0;
}

.measure-input-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.hidden {
    display: none;
}

footer {
    text-align: center;
    padding: 3rem 0 2rem;
    margin-top: 4rem;
    border-top: 1px solid rgba(201, 169, 97, 0.3);
    color: var(--text-muted);
}

footer a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.3s ease;
}

footer a:hover {
    color: var(--accent-light);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

.pulse {
    animation: pulse 2s ease-in-out infinite;
}

/* Responsive Design */
@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }

    .card {
        padding: 1.5rem;
    }

    .button-group {
        flex-direction: column;
    }

    .mode-selector {
        flex-direction: column;
    }

    .tempo-info {
        grid-template-columns: 1fr;
    }

    .measure-input-group {
        grid-template-columns: 1fr;
    }

    .tempo-stat-value {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 1rem;
    }

    h1 {
        font-size: 2rem;
    }

    .intro {
        padding: 1.5rem;
    }

    .result-card {
        padding: 2rem;
    }

    .result-card h3 {
        font-size: 1.5rem;
    }
}
