:root {
    --primary-color: #3d74bd;
    --primary-dark: #2c5691;
    --primary-light: #e6effa;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --text-color: #2d3748;
    --bg-color: #f4f7fa;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
}

/* --- CONTAINER --- */
.fix-my-speaker-container {
    text-align: center;
    background: #ffffff;
    border-radius: 24px;
    width: 100%;
    max-width: 400px;
    margin: 20px auto;
    padding: 40px 30px;
    box-shadow: 0 20px 40px rgba(61, 116, 189, 0.15); /* Tinted shadow */
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease;
    font-family: 'Inter', sans-serif;
}

.fix-my-speaker-container h1 {
    margin: 0 0 10px 0;
    color: var(--text-color);
    font-size: 24px;
    font-weight: 700;
}

.fix-my-speaker-container p {
    margin-bottom: 30px;
    color: #718096;
    font-size: 15px;
    line-height: 1.5;
}

/* --- PROGRESS CIRCLE --- */
.progress-circle {
    margin: 10px auto 30px auto;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 32px;
    color: var(--primary-color);
    font-weight: 700;
    position: relative;
    /* Default to 0%, changed via JS */
    background: conic-gradient(var(--primary-color) var(--progress, 0%), var(--primary-light) 0deg);
    box-shadow: 0 10px 20px rgba(61, 116, 189, 0.1);
    transition: --progress 0.1s linear; 
}

/* Inner white circle to create the ring effect */
.progress-circle::after {
    content: '';
    position: absolute;
    top: 12px;
    left: 12px;
    right: 12px;
    bottom: 12px;
    background: #ffffff;
    border-radius: 50%;
    box-shadow: inset 0 4px 10px rgba(0,0,0,0.05);
}

#progress-percentage {
    position: relative;
    z-index: 2;
}

/* --- MODE BUTTONS --- */
.mode-buttons {
    margin: 0 0 30px 0;
    display: flex;
    justify-content: center;
    background: var(--primary-light);
    padding: 5px;
    border-radius: 12px;
    width: 100%;
    max-width: 300px;
}

.mode-button {
    flex: 1;
    padding: 12px 15px;
    margin: 0;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    background: transparent;
    color: #64748b;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mode-button:hover {
    color: var(--primary-color);
}

.mode-button.active {
    background: #ffffff;
    color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(61, 116, 189, 0.15);
}

/* --- EJECT BUTTON --- */
.eject-button {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    border: none;
    border-radius: 50%;
    width: 90px;
    height: 90px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: transform 0.2s, box-shadow 0.3s;
    outline: none;
    box-shadow: 0 10px 25px rgba(61, 116, 189, 0.4);
    position: relative;
    z-index: 10;
}

.eject-button i {
    font-size: 24px;
    margin-bottom: 4px;
}

.eject-button:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 15px 30px rgba(61, 116, 189, 0.5);
}

.eject-button:active {
    transform: translateY(1px) scale(0.95);
}

/* State: Playing (Stop button style) */
.eject-button.playing {
    background: var(--bg-color);
    color: var(--danger-color);
    border: 2px solid var(--danger-color);
    box-shadow: 0 5px 15px rgba(220, 53, 69, 0.15);
    animation: pulse-red 2s infinite;
}

/* State: Paused/Default */
.eject-button.paused {
    /* Inherits default style */
}

/* Animation for the playing state */
@keyframes pulse-red {
    0% { box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.4); }
    70% { box-shadow: 0 0 0 15px rgba(220, 53, 69, 0); }
    100% { box-shadow: 0 0 0 0 rgba(220, 53, 69, 0); }
}

/* --- RIPPLE ANIMATION --- */
.ripple-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    opacity: 0;
    transition: opacity 0.3s;
}

.ripple-container.active {
    opacity: 1;
}

.ripple {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    border: 1px solid var(--primary-color);
    opacity: 0;
}

.ripple.animate {
    animation: ripple-effect 2s linear infinite;
}

.ripple:nth-child(2) { animation-delay: 0.5s; }
.ripple:nth-child(3) { animation-delay: 1s; }
.ripple:nth-child(4) { animation-delay: 1.5s; }

@keyframes ripple-effect {
    0% { width: 90px; height: 90px; opacity: 0.8; border-width: 4px; }
    100% { width: 350px; height: 350px; opacity: 0; border-width: 0px; }
}