* {
    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, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    color: #333;
}

.container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 600px;
    width: 100%;
    padding: 40px;
    animation: fadeIn 0.5s ease-in;
}

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

header {
    text-align: center;
    margin-bottom: 40px;
}

h1 {
    font-size: 3em;
    color: #667eea;
    margin-bottom: 10px;
}

.tagline {
    font-size: 1.1em;
    color: #666;
    margin-bottom: 10px;
}

.disclaimer {
    background: #fff3cd;
    border: 2px solid #ffc107;
    border-radius: 8px;
    padding: 10px;
    font-size: 0.9em;
    color: #856404;
    margin-top: 15px;
}

.step {
    display: none;
    animation: slideIn 0.4s ease-out;
}

.step.active {
    display: block;
}

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

.step-number {
    display: inline-block;
    background: #667eea;
    color: white;
    width: 100px;
    height: 40px;
    border-radius: 8px;
    text-align: center;
    line-height: 40px;
    font-weight: bold;
    margin-bottom: 20px;
}

h2 {
    font-size: 2em;
    margin-bottom: 15px;
    color: #333;
}

p {
    font-size: 1.1em;
    color: #666;
    margin-bottom: 20px;
    line-height: 1.6;
}

.image-placeholder {
    background: #f5f5f5;
    border: 2px dashed #ccc;
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    margin: 30px 0;
}

.image-placeholder img {
    max-width: 250px;
    height: auto;
    border-radius: 8px;
}

.placeholder-text {
    font-size: 3em;
    color: #999;
}

.placeholder-text small {
    display: block;
    font-size: 0.4em;
    margin-top: 10px;
}

.primary-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 1.1em;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    display: block;
    margin: 20px auto;
}

.primary-btn:hover {
    background: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.primary-btn:active {
    transform: translateY(0);
}

.primary-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    box-shadow: none;
}

.secondary-btn {
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
    padding: 12px 30px;
    font-size: 1em;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: block;
    margin: 20px auto;
}

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

.status-text {
    text-align: center;
    font-style: italic;
    color: #888;
    min-height: 24px;
}

.progress-container {
    background: #f0f0f0;
    border-radius: 20px;
    height: 30px;
    margin: 30px 0;
    overflow: hidden;
}

.progress-bar {
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    height: 100%;
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 20px;
}

.heart-rate-display {
    text-align: center;
    margin: 40px 0;
}

#bpmValue {
    font-size: 5em;
    font-weight: bold;
    color: #667eea;
    display: block;
}

.bpm-label {
    font-size: 1.5em;
    color: #999;
    display: block;
    margin-top: 10px;
}

#waveformCanvas {
    width: 100%;
    height: 150px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    margin: 20px 0;
    background: #fafafa;
    display: block;
}

.result-message {
    text-align: center;
    font-size: 1em;
    padding: 15px;
    border-radius: 8px;
    background: #e7f3ff;
    color: #0066cc;
}

footer {
    text-align: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    color: #999;
    font-size: 0.9em;
}

@media (max-width: 600px) {
    .container {
        padding: 20px;
    }
    
    h1 {
        font-size: 2em;
    }
    
    h2 {
        font-size: 1.5em;
    }
    
    #bpmValue {
        font-size: 3.5em;
    }
}
