/* Interactive Audio Demo Styles */

.interactive-demo {
    padding: 2.1rem 1.3rem 3rem;
    background: #ffffff;
}

.demo-interactive-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.06rem;
    max-width: 595px;
    margin: 0 auto 1.7rem;
}

.demo-state-card {
    display: flex;
    flex-direction: column;
    gap: 0.64rem;
}

.demo-state-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.77rem;
}

.demo-step-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 51px;
    padding: 3px 8px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 14px;
    font-weight: 700;
    font-size: 0.68rem;
}

.demo-phone-frame {
    position: relative;
    background: #fff;
    border-radius: 15px;
    padding: 8px;
    box-shadow: 0 13px 38px rgba(0, 0, 0, 0.12);
    overflow: hidden;
}

.demo-phone-img {
    width: 100%;
    display: block;
    border-radius: 10px;
}

.demo-overlay-hint {
    position: absolute;
    bottom: 30%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(102, 126, 234, 0.95);
    color: white;
    padding: 8px 14px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 7px;
    font-weight: 600;
    font-size: 0.72rem;
    animation: bounce 2s infinite;
    box-shadow: 0 3px 14px rgba(102, 126, 234, 0.4);
}

@keyframes bounce {

    0%,
    100% {
        transform: translateX(-50%) translateY(0);
    }

    50% {
        transform: translateX(-50%) translateY(-10px);
    }
}

/* Audio Hotspots */
.audio-hotspots-container {
    position: absolute;
    top: 12px;
    left: 12px;
    right: 12px;
    bottom: 12px;
    pointer-events: none;
}

.audio-hotspot {
    position: absolute;
    background: rgba(102, 126, 234, 0.15);
    border: 2px solid rgba(102, 126, 234, 0.4);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    pointer-events: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.audio-hotspot:hover {
    background: rgba(102, 126, 234, 0.25);
    border-color: rgba(102, 126, 234, 0.7);
    transform: scale(1.02);
}

.audio-hotspot.playing {
    background: rgba(76, 175, 80, 0.3);
    border-color: #4CAF50;
    animation: pulse-hotspot 1s infinite;
}

@keyframes pulse-hotspot {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.7);
    }

    50% {
        box-shadow: 0 0 0 10px rgba(76, 175, 80, 0);
    }
}

.hotspot-pulse {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    background: rgba(102, 126, 234, 0.6);
    border-radius: 50%;
    animation: pulse-ring 2s infinite;
}

@keyframes pulse-ring {
    0% {
        transform: translate(-50%, -50%) scale(0.8);
        opacity: 1;
    }

    100% {
        transform: translate(-50%, -50%) scale(2.5);
        opacity: 0;
    }
}

.hotspot-label {
    position: relative;
    z-index: 1;
    background: rgba(255, 255, 255, 0.95);
    padding: 4px 8px;
    border-radius: 14px;
    font-size: 0.64rem;
    font-weight: 600;
    color: #667eea;
    display: flex;
    align-items: center;
    gap: 4px;
    opacity: 0;
    transition: opacity 0.3s;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.audio-hotspot:hover .hotspot-label {
    opacity: 1;
}

.audio-hotspot.playing .hotspot-label {
    opacity: 1;
    background: #4CAF50;
    color: white;
}

/* Audio Playing Indicator */
.audio-playing-indicator {
    position: absolute;
    bottom: 13px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(76, 175, 80, 0.95);
    color: white;
    padding: 7px 12px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 0.68rem;
    box-shadow: 0 3px 14px rgba(76, 175, 80, 0.4);
    z-index: 10;
}

.audio-waveform {
    display: flex;
    align-items: center;
    gap: 2px;
    height: 16px;
}

.audio-waveform span {
    display: inline-block;
    width: 3px;
    background: white;
    border-radius: 2px;
    animation: waveform 1.2s ease-in-out infinite;
}

.audio-waveform span:nth-child(1) {
    height: 8px;
    animation-delay: 0s;
}

.audio-waveform span:nth-child(2) {
    height: 16px;
    animation-delay: 0.1s;
}

.audio-waveform span:nth-child(3) {
    height: 20px;
    animation-delay: 0.2s;
}

.audio-waveform span:nth-child(4) {
    height: 14px;
    animation-delay: 0.3s;
}

.audio-waveform span:nth-child(5) {
    height: 10px;
    animation-delay: 0.4s;
}

@keyframes waveform {

    0%,
    100% {
        transform: scaleY(0.5);
        opacity: 0.5;
    }

    50% {
        transform: scaleY(1);
        opacity: 1;
    }
}

.demo-hint {
    margin-top: 0.64rem;
    padding: 7px 10px;
    background: rgba(102, 126, 234, 0.1);
    border-left: 2px solid #667eea;
    border-radius: 5px;
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 0.68rem;
    color: #555;
}

/* Audio Playground Section - Separate panel */
.audio-playground-section {
    padding: 3rem 1.3rem 2.1rem;
    background: linear-gradient(135deg, #f5f7fa 0%, #eef2f7 100%);
}

/* Audio Playground Card */
.audio-playground {
    max-width: 680px;
    margin: 0 auto;
    padding: 1.3rem;
    padding-bottom: 2.1rem;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 27px rgba(0, 0, 0, 0.08);
}

.playground-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
    margin-bottom: 1.06rem;
}

.playground-header h3 {
    font-size: 0.94rem;
    color: #333;
    margin: 0;
}

.playground-header p {
    font-size: 0.72rem;
    color: #666;
    margin: 0;
}

.playground-header i {
    color: #667eea;
    font-size: 1.02rem;
}

/* Age Control Row (Top) */
.age-control-row {
    margin-bottom: 1.06rem;
    padding-bottom: 0.85rem;
    border-bottom: 2px solid #f0f0f0;
}

.age-control-row label {
    display: block;
    margin-bottom: 0.64rem;
    font-weight: 600;
    color: #333;
    font-size: 0.77rem;
}

.age-control-row #age-display {
    color: #667eea;
    font-size: 0.94rem;
}

/* Gender + Speed Row */
.gender-speed-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.06rem;
    margin-bottom: 1.06rem;
    padding-bottom: 0.85rem;
    border-bottom: 2px solid #f0f0f0;
}

.speed-control label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #555;
    font-size: 0.72rem;
}



.speed-slider-container {
    padding: 10px 0;
}

.speed-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    background: #e0e0e0;
    border-radius: 5px;
    outline: none;
    margin-bottom: 8px;
}

.speed-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #667eea;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(102, 126, 234, 0.4);
    transition: transform 0.2s;
}

.speed-slider::-webkit-slider-thumb:hover {
    transform: scale(1.12);
}

.speed-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #667eea;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 5px rgba(102, 126, 234, 0.4);
}

.speed-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: #888;
}

.speed-value-display {
    margin-top: 6px;
    font-size: 0.85rem;
    color: #667eea;
    font-weight: 600;
    text-align: center;
    background: #f8f9fa;
    padding: 6px 10px;
    border-radius: 6px;
}

/* Language Control Row (Middle) */
.language-control-row {
    margin-bottom: 1.06rem;
}

.language-control-row label {
    display: block;
    margin-bottom: 0.64rem;
    font-weight: 600;
    color: #333;
    font-size: 0.72rem;
}

.language-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 7px;
    margin-bottom: 0.85rem;
}

.lang-toggle-btn {
    padding: 7px 10px;
    border: 2px solid #e0e0e0;
    background: white;
    border-radius: 7px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.68rem;
    color: #555;
    transition: all 0.2s;
    text-align: center;
}

.lang-toggle-btn:hover {
    border-color: #667eea;
    background: #f8f9fa;
}

.lang-toggle-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #667eea;
    color: white;
    box-shadow: 0 3px 10px rgba(102, 126, 234, 0.3);
}

/* Sample Text Display */
.sample-text-display {
    position: relative;
    background: #f8f9fa;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 0.85rem 0.85rem 0.85rem 3.4rem;
    line-height: 1.6;
    color: #444;
    font-size: 0.72rem;
}

.sample-text-display::before {
    content: '';
    position: absolute;
    top: 0.64rem;
    left: 0.64rem;
    width: 38px;
    height: 38px;
    background-image: url('../images/Owl-Chat.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.sample-text-display p {
    margin-bottom: 0.64rem;
}

.sample-text-display p:last-child {
    margin-bottom: 0;
}

.sample-text-display strong {
    color: #667eea;
}

/* Play Action Row (Centered) */
.play-action-row {
    text-align: center;
    padding-top: 1.06rem;
    border-top: 2px solid #f0f0f0;
    margin-top: 1.06rem;
}

.gender-control label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #555;
    font-size: 0.72rem;
}

.toggle-group {
    display: flex;
    gap: 5px;
    background: #f5f7fa;
    padding: 4px;
    border-radius: 8px;
}

.toggle-btn {
    flex: 1;
    padding: 7px;
    border: none;
    background: transparent;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    color: #666;
    transition: all 0.2s;
    font-size: 0.72rem;
}

.toggle-btn.active {
    background: white;
    color: #667eea;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.play-control {
    text-align: center;
}

.btn-huge {
    padding: 12px 34px;
    font-size: 0.94rem;
    border-radius: 99px;
    box-shadow: 0 4px 14px rgba(102, 126, 234, 0.3);
}

.btn-huge:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 17px rgba(102, 126, 234, 0.4);
}

.modern-select {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 0.85rem;
    color: #444;
    background: white;
    cursor: pointer;
    transition: all 0.3s;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23667eea' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
}

.modern-select:hover {
    border-color: #667eea;
}

.playground-action {
    text-align: center;
    border-top: 1px solid #f0f0f0;
    padding-top: 1.7rem;
}

.btn-large {
    padding: 14px 41px;
    font-size: 1.02rem;
    border-radius: 99px;
}

/* Slider Styles */
.slider-container {
    padding: 8px 0;
}

.age-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 5px;
    background: #e0e0e0;
    border-radius: 4px;
    outline: none;
    margin-bottom: 7px;
}

.age-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #667eea;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(102, 126, 234, 0.4);
    transition: transform 0.2s;
}

.age-slider::-webkit-slider-thumb:hover {
    transform: scale(1.12);
}

.age-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #667eea;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 5px rgba(102, 126, 234, 0.4);
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.68rem;
    color: #888;
}

.speed-indicator {
    margin-top: 7px;
    font-size: 0.77rem;
    color: #666;
    background: #f8f9fa;
    padding: 5px 10px;
    border-radius: 7px;
    display: inline-block;
}

.now-playing-text {
    margin-top: 0.85rem;
    color: #888;
    font-size: 0.81rem;
    min-height: 20px;
}

/* Responsive */
@media (max-width: 980px) {
    .demo-interactive-grid {
        grid-template-columns: 1fr;
        gap: 1.7rem;
    }

    .gender-speed-row {
        grid-template-columns: 1fr;
        gap: 1.3rem;
    }

    .language-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .demo-overlay-hint {
        font-size: 0.77rem;
        padding: 8px 14px;
    }
}

@media (max-width: 640px) {
    .interactive-demo {
        padding: 2.55rem 0.85rem;
    }

    .audio-playground {
        padding: 1.3rem;
    }

    .btn-huge {
        width: 100%;
        padding: 14px 34px;
        font-size: 1.02rem;
    }

    .language-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 7px;
    }

    .lang-toggle-btn {
        padding: 8px 10px;
        font-size: 0.72rem;
    }
}

/* Audio Playground Header Update */
.playground-header h3 {
    margin: 0 0 0.42rem 0;
    font-size: 1.27rem;
    color: #333;
}

.playground-header p {
    margin: 0;
    font-size: 0.81rem;
    color: #666;
    font-weight: normal;
}