/**
 * Focus Music Player - Modern UI/UX Styles
 */

/* Hide visible CSS code blocks - CSS-only solution */
/* Target code blocks containing CSS patterns */
pre:has(code:contains('.tool-page-container')),
pre:has(code:contains('Tool Page Styles')),
.wp-block-code:has(code:contains('.tool-page-container')),
.wp-block-code:has(code:contains('Tool Page Styles')),
code:contains('.tool-page-container'),
pre code:contains('Tool Page Styles') {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Fallback: Hide pre/code blocks that come after focus music player */
.focus-music-player-container ~ pre,
.focus-music-player-container ~ .wp-block-code {
    /* Check with JavaScript, but hide suspicious ones */
}

.focus-music-player-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 1rem;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.focus-music-player-container h3 {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Unified Focus Tool */
.unified-focus-tool {
    background: white;
    border-radius: 24px;
    padding: 3rem;
    box-shadow: 0 8px 30px rgba(0,0,0,0.1);
    border: 2px solid #f0f0f0;
    margin-bottom: 2rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    transition: all 0.3s ease;
}

.unified-focus-tool:hover {
    box-shadow: 0 12px 40px rgba(102, 126, 234, 0.15);
}

@media (max-width: 768px) {
    .unified-focus-tool {
        padding: 2rem 1.5rem;
    }
}

/* Section Divider */
.section-divider {
    margin: 2.5rem 0 1.5rem;
    text-align: center;
    position: relative;
}

.section-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e0e0e0;
}

.section-divider span {
    background: white;
    padding: 0 1.5rem;
    color: #666;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    z-index: 1;
}

.timer-display {
    text-align: center;
    margin-bottom: 2rem;
    padding: 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    position: relative;
    overflow: hidden;
}

.timer-display::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.timer-time {
    font-size: 4rem;
    font-weight: 800;
    color: white;
    text-shadow: 0 4px 20px rgba(0,0,0,0.3);
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 1;
    font-variant-numeric: tabular-nums;
    letter-spacing: -2px;
}

.timer-status {
    font-size: 1rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    text-transform: uppercase;
    letter-spacing: 2px;
    position: relative;
    z-index: 1;
}

.timer-status.running {
    color: #4ade80;
    animation: pulse-glow 2s ease-in-out infinite;
}

.timer-status.complete {
    color: #fbbf24;
    animation: celebration-bounce 1s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { 
        opacity: 1;
        text-shadow: 0 0 10px rgba(74, 222, 128, 0.5);
    }
    50% { 
        opacity: 0.8;
        text-shadow: 0 0 20px rgba(74, 222, 128, 0.8);
    }
}

@keyframes celebration-bounce {
    0%, 100% { transform: translateY(0) scale(1); }
    25% { transform: translateY(-5px) scale(1.05); }
    75% { transform: translateY(-3px) scale(1.02); }
}

.timer-controls {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.timer-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

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

.timer-btn:active::before {
    width: 300px;
    height: 300px;
}

.timer-btn.primary {
    background: linear-gradient(135deg, #4ade80 0%, #22c55e 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(74, 222, 128, 0.4);
}

.timer-btn.primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(74, 222, 128, 0.5);
}

.timer-btn.secondary {
    background: #f0f0f0;
    color: #666;
}

.timer-btn.secondary:hover {
    background: #e0e0e0;
    transform: translateY(-2px);
}

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

.timer-presets {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
}

.preset-btn {
    padding: 0.75rem 1.5rem;
    border: 2px solid #e0e0e0;
    background: white;
    color: #666;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-weight: 600;
    position: relative;
}

.preset-btn:hover {
    border-color: #667eea;
    color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.preset-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #667eea;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

/* Sound Selector */
.sound-selector {
    margin-bottom: 1.5rem;
}

.sound-selector label {
    display: block;
    margin-bottom: 0.75rem;
    color: #333;
    font-weight: 600;
    font-size: 1rem;
}

.sound-select-wrapper {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.sound-select-wrapper .playlist-dropdown {
    flex: 1;
}

.preview-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 2px solid #667eea;
    background: white;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.preview-btn:hover {
    background: #667eea;
    transform: scale(1.05);
}

.preview-btn:hover .preview-icon {
    filter: brightness(0) invert(1);
}

.preview-btn.playing {
    background: #667eea;
    animation: pulse-preview 1.5s ease-in-out infinite;
}

.preview-btn.playing .preview-icon {
    filter: brightness(0) invert(1);
}

@keyframes pulse-preview {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(102, 126, 234, 0.7);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(102, 126, 234, 0);
    }
}

.preview-icon {
    font-size: 1.2rem;
    display: block;
    transition: filter 0.3s ease;
}

.playlist-selector {
    margin-bottom: 2rem;
}

.playlist-selector label {
    display: block;
    margin-bottom: 0.75rem;
    color: #333;
    font-weight: 600;
    font-size: 1rem;
}


.playlist-dropdown {
    width: 100%;
    padding: 1rem 1.25rem;
    border: 2px solid #e0e0e0;
    background: white;
    color: #333;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23667eea' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 3rem;
}

.playlist-dropdown:hover {
    border-color: #667eea;
}

.playlist-dropdown:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.playlist-dropdown option {
    background: white;
    color: #333;
    padding: 0.5rem;
}

.sound-note {
    text-align: center;
    color: #666;
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
    padding: 0.75rem;
    background: #f8f9fa;
    border-radius: 12px;
    width: 100%;
}

.sound-note small {
    display: block;
}

.sound-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    min-width: 150px;
}

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

.sound-btn:active::before {
    width: 300px;
    height: 300px;
}

.sound-btn.primary {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4);
}

.sound-btn.primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(245, 158, 11, 0.5);
}

.sound-btn.secondary {
    background: #f0f0f0;
    color: #666;
}

.sound-btn.secondary:hover {
    background: #e0e0e0;
    transform: translateY(-2px);
}

.music-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1.25rem 2rem;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

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

.music-btn:active::before {
    width: 300px;
    height: 300px;
}

.music-btn.primary {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4);
}

.music-btn.primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(245, 158, 11, 0.5);
}

.music-btn.secondary {
    background: #f0f0f0;
    color: #666;
}

.music-btn.secondary:hover {
    background: #e0e0e0;
    transform: translateY(-2px);
}

.btn-icon {
    font-size: 1.3rem;
    display: inline-block;
}

.timer-btn .btn-icon {
    font-size: 1.1rem;
}

.volume-control {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

.volume-control label {
    color: #666;
    font-size: 0.9rem;
    font-weight: 600;
    min-width: 70px;
}

.volume-range {
    flex: 1;
    height: 8px;
    border-radius: 4px;
    background: #e0e0e0;
    outline: none;
    -webkit-appearance: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.volume-range:hover {
    background: #d0d0d0;
}

.volume-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4);
    transition: all 0.3s ease;
}

.volume-range::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.6);
}

.volume-range::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4);
    transition: all 0.3s ease;
}

.volume-range::-moz-range-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.6);
}

#volume-value {
    color: #667eea;
    font-size: 1rem;
    font-weight: 700;
    min-width: 50px;
    text-align: right;
}

/* Current Sound Display */
.current-sound {
    padding: 1.5rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 16px;
    border: 2px solid #e0e0e0;
    text-align: center;
}

.sound-title {
    color: #333;
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
}

.sound-title.playing {
    color: #667eea;
    animation: text-glow 2s ease-in-out infinite;
}

.sound-title.playing::before {
    content: '🎵 ';
    display: inline-block;
    animation: music-note 1s ease-in-out infinite;
}

.sound-description {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 0;
}

@keyframes text-glow {
    0%, 100% { text-shadow: 0 0 10px rgba(102, 126, 234, 0.3); }
    50% { text-shadow: 0 0 20px rgba(102, 126, 234, 0.6); }
}

@keyframes music-note {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-5px) rotate(10deg); }
}


/* Session Stats */
.session-stats {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    border: 2px solid #f0f0f0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

@media (max-width: 768px) {
    .session-stats {
        grid-template-columns: 1fr;
    }
}

.stat-item {
    text-align: center;
    padding: 1.5rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 16px;
    border: 2px solid #e0e0e0;
    transition: all 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    border-color: #667eea;
}

.stat-label {
    display: block;
    color: #666;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-value {
    display: block;
    color: #667eea;
    font-size: 2.5rem;
    font-weight: 800;
    text-shadow: 0 2px 10px rgba(102, 126, 234, 0.2);
}

/* Focus Status */
.focus-status {
    margin-top: 2rem;
    padding: 1.5rem;
    border-radius: 16px;
    font-weight: 600;
    text-align: center;
    display: none;
    animation: slideIn 0.3s ease-out;
}

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

@keyframes celebration-pulse {
    0%, 100% {
        box-shadow: 0 8px 30px rgba(0,0,0,0.1);
    }
    50% {
        box-shadow: 0 8px 40px rgba(251, 191, 36, 0.5);
    }
}

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

.focus-status.success {
    background: linear-gradient(135deg, rgba(74, 222, 128, 0.1) 0%, rgba(34, 197, 94, 0.1) 100%);
    border: 2px solid #4ade80;
    color: #22c55e;
    display: block;
}

.focus-status.error {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(220, 38, 38, 0.1) 100%);
    border: 2px solid #ef4444;
    color: #dc2626;
    display: block;
}

.focus-status.info {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(37, 99, 235, 0.1) 100%);
    border: 2px solid #3b82f6;
    color: #2563eb;
    display: block;
}

/* Responsive Design */
@media (max-width: 768px) {
    .focus-music-player-container {
        padding: 1rem;
    }
    
    .focus-music-player-container h3 {
        font-size: 2rem;
    }
    
    .timer-time {
        font-size: 3rem;
    }
    
    .timer-controls {
        flex-direction: column;
    }
    
    .timer-btn {
        width: 100%;
    }
    
    .music-btn {
        width: 100%;
    }
    
    .volume-control {
        flex-direction: column;
        align-items: stretch;
    }
    
    .volume-control label {
        text-align: center;
    }
    
    #volume-value {
        text-align: center;
    }
    
    .stat-value {
        font-size: 2rem;
    }
}

/* Loading States */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

.loading {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 1000px 100%;
    animation: shimmer 2s infinite;
}

/* Smooth transitions */
* {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}
