:root {
    --bg-color: #0f111a;
    --primary: #4a00e0;
    --secondary: #8e2de2;
    --text: #ffffff;
    --text-muted: #a0a5ba;
    --card-bg: rgba(255, 255, 255, 0.05);
    --border: rgba(255, 255, 255, 0.1);
}

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

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    background-image: 
        radial-gradient(at 0% 0%, rgba(74, 0, 224, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(142, 45, 226, 0.15) 0px, transparent 50%);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
}

.app-container {
    width: 100%;
    max-width: 500px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
}

header {
    text-align: center;
    margin-bottom: 4rem;
    margin-top: 2rem;
}

h1 {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(to right, #8e2de2, #4a00e0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}

header p {
    color: var(--text-muted);
    font-size: 1.1rem;
    font-weight: 300;
}

main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

/* Listen Button Section */
.listen-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 2rem;
    transition: opacity 0.3s ease;
}

.listen-section.hidden {
    display: none;
    opacity: 0;
}

.wave-container {
    position: relative;
    width: 200px;
    height: 200px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 2rem;
}

.wave {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--secondary), var(--primary));
    opacity: 0;
    transform: scale(0.5);
}

.wave-container.recording .wave {
    animation: pulsate 2s infinite cubic-bezier(0.25, 0.8, 0.5, 1);
}

.wave-container.recording .wave1 { animation-delay: 0s; }
.wave-container.recording .wave2 { animation-delay: 0.6s; }
.wave-container.recording .wave3 { animation-delay: 1.2s; }

@keyframes pulsate {
    0% { transform: scale(0.5); opacity: 0.8; }
    100% { transform: scale(1.5); opacity: 0; }
}

.listen-btn {
    position: relative;
    z-index: 10;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(74, 0, 224, 0.4);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    justify-content: center;
    align-items: center;
}

.listen-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 15px 40px rgba(74, 0, 224, 0.6);
}

.listen-btn:active {
    transform: scale(0.95);
}

.listen-btn svg {
    transition: transform 0.3s ease;
}

.wave-container.recording .listen-btn svg {
    animation: float 2s ease-in-out infinite;
}

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

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

/* Results Section */
.results-panel {
    width: 100%;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.5s ease;
}

.results-panel.hidden {
    display: none;
}

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

.results-panel h2 {
    text-align: center;
    margin-bottom: 2rem;
    font-weight: 600;
}

.result-cards {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    backdrop-filter: blur(10px);
    transition: transform 0.2s ease;
}

.card:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.08);
}

.card-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: rgba(142, 45, 226, 0.2);
    color: #b388ff;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-right: 1.5rem;
}

.card-content h3 {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 400;
    margin-bottom: 0.25rem;
}

.card-content .value {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text);
    text-transform: capitalize;
}

.card-content .detail-text {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 300;
    margin-top: 0.3rem;
    letter-spacing: 0.5px;
}

.reset-btn {
    padding: 1rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Outfit', sans-serif;
}

.reset-btn:hover {
    background: rgba(255, 255, 255, 0.05);
}
