/**
 * RSVP Reader Pro - Centered Minimalist Design
 * Version: 3.0.0
 * Centered player, large text, compact controls
 */

/* ========================================
   Main Container - Fullscreen Overlay
   ======================================== */
.rsvp-floating-player {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    pointer-events: none;
    display: none;
}

.rsvp-floating-player.active {
    display: flex;
    pointer-events: auto;
}

/* Backdrop */
.rsvp-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
}

/* ========================================
   Trigger Button - Pill Tab on Right Center
   ======================================== */
.rsvp-trigger {
    position: fixed;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    height: 40px;
    padding: 0 14px 0 12px;
    border-radius: 20px 0 0 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: -4px 0 20px rgba(102, 126, 234, 0.4);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: auto;
    z-index: 1000000;
}

.rsvp-trigger:hover {
    padding-right: 16px;
    box-shadow: -6px 0 28px rgba(102, 126, 234, 0.5);
}

.rsvp-trigger svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.rsvp-trigger span {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* ========================================
   Main Player - Centered
   ======================================== */
.rsvp-player {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 40px;
}

/* Close Button */
.rsvp-close {
    position: absolute;
    top: 24px;
    right: 24px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
}

.rsvp-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.rsvp-close svg {
    width: 20px;
    height: 20px;
}

/* ========================================
   Text Display - Large & Centered
   ======================================== */
.rsvp-display {
    width: 100%;
    max-width: 1200px;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 40px;
}

.rsvp-word {
    font-size: var(--rsvp-font, 72px);
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    color: var(--rsvp-text, #ffffff);
    user-select: none;
    transition: opacity 0.05s ease;
}

.rsvp-word.empty {
    opacity: 0.5;
    font-size: 24px;
    font-weight: 500;
}

.rsvp-word .highlight {
    color: var(--rsvp-highlight, #00ff88);
}

/* ========================================
   Controls - Compact & Centered
   ======================================== */
.rsvp-controls-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

/* Progress */
.rsvp-progress-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    width: 500px;
    max-width: 90vw;
}

.rsvp-progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    overflow: visible;
    position: relative;
    cursor: pointer;
    transition: height 0.2s ease;
}

.rsvp-progress-bar:hover {
    height: 12px;
}

.rsvp-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 4px;
    transition: width 0.1s ease;
    position: relative;
}

.rsvp-progress-fill::after {
    content: '';
    position: absolute;
    right: -6px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.rsvp-progress-bar:hover .rsvp-progress-fill::after {
    opacity: 1;
}

.rsvp-progress-bar.dragging .rsvp-progress-fill::after {
    opacity: 1;
    transform: translateY(-50%) scale(1.2);
}

.rsvp-stats {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    font-variant-numeric: tabular-nums;
}

/* Buttons */
.rsvp-controls {
    display: flex;
    gap: 12px;
    align-items: center;
}

.rsvp-btn {
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
}

.rsvp-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.05);
}

.rsvp-btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    width: 72px;
    height: 72px;
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.4);
}

.rsvp-btn-primary:hover {
    box-shadow: 0 12px 32px rgba(102, 126, 234, 0.5);
}

.rsvp-btn svg {
    width: 20px;
    height: 20px;
}

.rsvp-btn-primary svg {
    width: 28px;
    height: 28px;
}

/* ========================================
   Settings - Compact Bottom Panel
   ======================================== */
.rsvp-settings {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 32px;
    align-items: center;
    padding: 16px 28px;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
}

.rsvp-setting {
    display: flex;
    align-items: center;
    gap: 12px;
}

.rsvp-setting label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 600;
    white-space: nowrap;
    min-width: 60px;
}

.rsvp-value {
    font-size: 14px;
    color: #667eea;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    min-width: 40px;
    text-align: right;
}

.rsvp-unit {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 600;
}

/* Range Slider */
input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 140px;
    height: 4px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.2);
    outline: none;
    cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    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.2s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.15);
    box-shadow: 0 3px 12px rgba(102, 126, 234, 0.5);
}

input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    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);
}

/* ========================================
   Mobile Responsive
   ======================================== */
@media (max-width: 768px) {
    .rsvp-trigger {
        height: 36px;
        padding: 0 12px 0 10px;
    }
    
    .rsvp-trigger svg {
        width: 16px;
        height: 16px;
    }
    
    .rsvp-trigger span {
        font-size: 11px;
    }
    
    .rsvp-player {
        padding: 24px;
    }
    
    .rsvp-word {
        font-size: var(--rsvp-font-mobile, 48px);
    }
    
    .rsvp-display {
        min-height: 200px;
        margin-bottom: 32px;
    }
    
    .rsvp-btn {
        width: 48px;
        height: 48px;
    }
    
    .rsvp-btn-primary {
        width: 64px;
        height: 64px;
    }
    
    .rsvp-settings {
        flex-direction: column;
        gap: 16px;
        bottom: 16px;
        padding: 16px 20px;
        max-width: calc(100% - 32px);
    }
    
    .rsvp-setting {
        width: 100%;
        justify-content: space-between;
    }
    
    input[type="range"] {
        width: 120px;
    }
}

/* ========================================
   Animations
   ======================================== */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.rsvp-floating-player.active {
    animation: fadeIn 0.3s ease;
}
