/* ═══════════════════════════════════════════════════════════════════════════
   SANCTUM PAGE STYLES
   Deep Healing Space - DSP-05 Safety Integration
   ═══════════════════════════════════════════════════════════════════════════ */

/* Enable scrolling for this page */
body.sanctum-page {
    overflow-y: auto !important;
    overflow-x: hidden;
    height: auto;
    min-height: 100vh;
}

body.sanctum-page #app {
    height: auto;
    min-height: 100vh;
}

/* Page Layout */
.sanctum-page {
    background: linear-gradient(135deg, #08080d 0%, #0d0d15 50%, #080810 100%);
    min-height: 100vh;
}

.sanctum-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 1rem;
    padding-top: calc(60px + 1rem);
}

/* ═══════════════════════════════════════════════════════════════════════════
   SAFETY INDICATOR
   ═══════════════════════════════════════════════════════════════════════════ */

.safety-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.75rem;
    background: rgba(100, 180, 160, 0.1);
    border-radius: 20px;
    margin-right: 1rem;
}

.safety-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    animation: pulse-dot 2s ease-in-out infinite;
}

.safety-dot.ctc-0 { background: #64b4a0; }
.safety-dot.ctc-1 { background: #b4c864; }
.safety-dot.ctc-2 { background: #c8b464; }
.safety-dot.ctc-3 { background: #c89664; }
.safety-dot.ctc-4 { background: #c87864; }
.safety-dot.ctc-5 { background: #c86464; }

@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.safety-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* ═══════════════════════════════════════════════════════════════════════════
   WELCOME SECTION
   ═══════════════════════════════════════════════════════════════════════════ */

.sanctum-welcome {
    text-align: center;
    padding: 3rem 1rem;
    position: relative;
    overflow: hidden;
}

.welcome-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(100, 140, 180, 0.1) 0%, transparent 70%);
    pointer-events: none;
    animation: gentle-pulse 6s ease-in-out infinite;
}

@keyframes gentle-pulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.5; }
    50% { transform: translate(-50%, -50%) scale(1.1); opacity: 0.8; }
}

.welcome-title {
    font-family: 'Crimson Pro', serif;
    font-size: 2rem;
    font-weight: 400;
    color: #e8e8e8;
    margin: 0 0 0.5rem 0;
    position: relative;
    z-index: 1;
}

.welcome-subtitle {
    font-size: 1rem;
    color: var(--text-muted);
    margin: 0;
    position: relative;
    z-index: 1;
}

/* ═══════════════════════════════════════════════════════════════════════════
   CARDS
   ═══════════════════════════════════════════════════════════════════════════ */

.card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.card-title {
    font-size: 1.1rem;
    font-weight: 500;
    color: #e8e8e8;
    margin: 0 0 1rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.title-icon {
    font-size: 1.2rem;
}

/* ═══════════════════════════════════════════════════════════════════════════
   SAFETY CHECK
   ═══════════════════════════════════════════════════════════════════════════ */

.safety-card {
    background: linear-gradient(135deg, rgba(100, 140, 180, 0.08) 0%, rgba(80, 120, 160, 0.04) 100%);
    border-color: rgba(100, 140, 180, 0.2);
}

.safety-text {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.safety-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.safety-option {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
}

.safety-option:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(100, 180, 160, 0.3);
}

.safety-option.selected {
    background: rgba(100, 180, 160, 0.1);
    border-color: rgba(100, 180, 160, 0.4);
}

.option-icon {
    font-size: 1.5rem;
}

.option-text {
    font-size: 0.95rem;
    color: #e8e8e8;
}

/* ═══════════════════════════════════════════════════════════════════════════
   DOMAIN SELECTION
   ═══════════════════════════════════════════════════════════════════════════ */

.domain-section {
    padding: 1rem 0;
}

.section-title {
    font-size: 1.1rem;
    font-weight: 500;
    color: #e8e8e8;
    margin: 0 0 1rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.domain-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.domain-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 1.25rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

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

.domain-card.locked {
    opacity: 0.5;
    pointer-events: none;
}

.domain-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.domain-name {
    font-size: 0.9rem;
    font-weight: 500;
    color: #e8e8e8;
    margin-bottom: 0.25rem;
}

.domain-desc {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.domain-card[data-domain="emotional"] { border-left: 3px solid #6b9bc3; }
.domain-card[data-domain="somatic"] { border-left: 3px solid #9bc36b; }
.domain-card[data-domain="trauma"] { border-left: 3px solid #c39b6b; }
.domain-card[data-domain="attachment"] { border-left: 3px solid #c36b9b; }
.domain-card[data-domain="inner-child"] { border-left: 3px solid #9b6bc3; }
.domain-card[data-domain="identity"] { border-left: 3px solid #6bc3b9; }

/* ═══════════════════════════════════════════════════════════════════════════
   PROTOCOL SELECTION
   ═══════════════════════════════════════════════════════════════════════════ */

.protocol-section {
    padding: 1rem 0;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.back-btn {
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.back-btn:hover {
    background: rgba(255, 255, 255, 0.08);
}

.protocol-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.protocol-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.protocol-card:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(100, 180, 160, 0.3);
}

.protocol-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(100, 180, 160, 0.1);
    border-radius: 12px;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.protocol-info {
    flex: 1;
}

.protocol-name {
    font-size: 1rem;
    font-weight: 500;
    color: #e8e8e8;
    margin-bottom: 0.25rem;
}

.protocol-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.protocol-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.protocol-arrow {
    font-size: 1.2rem;
    color: var(--text-muted);
}

/* ═══════════════════════════════════════════════════════════════════════════
   ACTIVE SESSION
   ═══════════════════════════════════════════════════════════════════════════ */

.session-section {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #08080d 0%, #0d0d15 50%, #080810 100%);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.session-container {
    width: 100%;
    max-width: 600px;
}

.session-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.session-companion {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(100, 180, 160, 0.15);
    border-radius: 50%;
}

.session-companion .companion-emoji {
    font-size: 1.5rem;
}

.session-info {
    flex: 1;
}

.session-title {
    font-size: 1.2rem;
    font-weight: 500;
    color: #e8e8e8;
    margin: 0 0 0.25rem 0;
}

.session-domain {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0;
}

.session-close-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: none;
    border-radius: 50%;
    color: var(--text-muted);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.session-close-btn:hover {
    background: rgba(255, 100, 100, 0.1);
    color: #ff6b6b;
}

/* Session Progress */
.session-progress {
    margin-bottom: 2rem;
}

.progress-bar {
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #64b4a0, #508cb4);
    border-radius: 2px;
    transition: width 0.3s ease;
    width: 0%;
}

.progress-text {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-align: center;
    display: block;
}

/* Session Content */
.session-content {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 20px;
    padding: 2rem;
    min-height: 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    margin-bottom: 1.5rem;
}

.session-step {
    max-width: 400px;
}

.step-title {
    font-size: 1.5rem;
    font-weight: 500;
    color: #64b4a0;
    margin: 0 0 1rem 0;
}

.step-instruction {
    font-family: 'Crimson Pro', serif;
    font-size: 1.15rem;
    line-height: 1.7;
    color: var(--text-secondary);
    margin: 0 0 2rem 0;
}

.step-timer {
    background: rgba(100, 180, 160, 0.1);
    border-radius: 50%;
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.timer-value {
    font-size: 1.75rem;
    font-weight: 300;
    color: #64b4a0;
    font-variant-numeric: tabular-nums;
}

/* Session Controls */
.session-controls {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.session-controls button {
    flex: 1;
}

/* Emergency Exit */
.emergency-exit {
    text-align: center;
}

.emergency-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: rgba(200, 100, 100, 0.1);
    border: 1px solid rgba(200, 100, 100, 0.2);
    border-radius: 25px;
    color: rgba(200, 150, 150, 0.8);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.emergency-btn:hover {
    background: rgba(200, 100, 100, 0.15);
    border-color: rgba(200, 100, 100, 0.3);
}

.emergency-icon {
    font-size: 1rem;
}

/* ═══════════════════════════════════════════════════════════════════════════
   GROUNDING SECTION
   ═══════════════════════════════════════════════════════════════════════════ */

.grounding-card {
    text-align: center;
    max-width: 500px;
    margin: 0 auto;
}

.grounding-text {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 2rem;
}

.grounding-exercise {
    padding: 2rem 0;
}

.breath-guide {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.breath-circle {
    width: 150px;
    height: 150px;
    border: 2px solid rgba(100, 180, 160, 0.5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    animation: breathe 8s ease-in-out infinite;
}

@keyframes breathe {
    0%, 100% { transform: scale(1); border-color: rgba(100, 180, 160, 0.3); }
    25% { transform: scale(1.15); border-color: rgba(100, 180, 160, 0.7); }
    50% { transform: scale(1.15); border-color: rgba(100, 180, 160, 0.7); }
    75% { transform: scale(1); border-color: rgba(100, 180, 160, 0.3); }
}

.breath-text {
    font-size: 1.25rem;
    color: #64b4a0;
    font-weight: 500;
}

.breath-instruction {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: 0;
}

.grounding-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

/* ═══════════════════════════════════════════════════════════════════════════
   HISTORY SECTION
   ═══════════════════════════════════════════════════════════════════════════ */

.history-section {
    padding: 1.5rem 0;
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.history-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
}

.history-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(100, 180, 160, 0.1);
    border-radius: 10px;
    font-size: 1.2rem;
}

.history-info {
    flex: 1;
}

.history-protocol {
    font-size: 0.95rem;
    font-weight: 500;
    color: #e8e8e8;
    margin-bottom: 0.25rem;
}

.history-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.history-feeling {
    font-size: 1.2rem;
}

.empty-state {
    text-align: center;
    color: var(--text-muted);
    padding: 2rem;
    font-style: italic;
}

/* ═══════════════════════════════════════════════════════════════════════════
   COMPLETION MODAL
   ═══════════════════════════════════════════════════════════════════════════ */

.completion-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(8, 8, 13, 0.95);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.completion-modal.hidden {
    display: none;
}

.modal-content {
    background: linear-gradient(135deg, rgba(100, 140, 180, 0.1) 0%, rgba(80, 120, 160, 0.05) 100%);
    border: 1px solid rgba(100, 140, 180, 0.2);
    border-radius: 24px;
    padding: 2.5rem;
    max-width: 450px;
    width: 100%;
    text-align: center;
}

.completion-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.completion-title {
    font-size: 1.5rem;
    font-weight: 500;
    color: #64b4a0;
    margin: 0 0 0.5rem 0;
}

.completion-message {
    font-size: 1rem;
    color: var(--text-secondary);
    margin: 0 0 1.5rem 0;
}

.completion-reflection {
    margin-bottom: 1.5rem;
}

.reflection-prompt {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

.feeling-options {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
}

.feeling-btn {
    width: 48px;
    height: 48px;
    font-size: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid transparent;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
}

.feeling-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.1);
}

.feeling-btn.selected {
    border-color: #64b4a0;
    background: rgba(100, 180, 160, 0.2);
}

.completion-notes {
    width: 100%;
    min-height: 80px;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: #e8e8e8;
    font-family: inherit;
    font-size: 0.9rem;
    resize: vertical;
    margin-bottom: 1.5rem;
}

.completion-notes:focus {
    outline: none;
    border-color: rgba(100, 180, 160, 0.4);
}

.completion-notes::placeholder {
    color: var(--text-muted);
}

/* ═══════════════════════════════════════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════════════════════════════════════ */

.btn-primary {
    padding: 0.875rem 1.5rem;
    background: linear-gradient(135deg, #64b4a0 0%, #508cb4 100%);
    border: none;
    border-radius: 12px;
    color: #0a0a12;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(100, 180, 160, 0.3);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    padding: 0.875rem 1.5rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    color: #e8e8e8;
    font-weight: 500;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.12);
}

.btn-secondary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ═══════════════════════════════════════════════════════════════════════════
   UTILITIES
   ═══════════════════════════════════════════════════════════════════════════ */

.hidden {
    display: none !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════════════════ */

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

    .grounding-actions {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .sanctum-container {
        padding: 0.75rem;
    }

    .card {
        padding: 1.25rem;
    }

    .welcome-title {
        font-size: 1.5rem;
    }

    .session-content {
        padding: 1.5rem;
        min-height: 250px;
    }

    .step-instruction {
        font-size: 1rem;
    }

    .modal-content {
        padding: 1.5rem;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   AUDIO CONTROLS
   ═══════════════════════════════════════════════════════════════════════════ */

.audio-controls {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin: 1rem 0;
}

.audio-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 0.6rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.audio-btn:hover {
    background: rgba(100, 180, 160, 0.15);
    border-color: rgba(100, 180, 160, 0.3);
}

.audio-btn.active {
    background: rgba(100, 180, 160, 0.2);
    border-color: rgba(100, 180, 160, 0.4);
}

.audio-btn.muted {
    opacity: 0.5;
}

.audio-icon {
    font-size: 1.25rem;
}

.audio-label {
    font-size: 0.7rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* ═══════════════════════════════════════════════════════════════════════════
   AUDIO SCRIPTS SECTION - Guided Practices
   ═══════════════════════════════════════════════════════════════════════════ */

.scripts-section {
    padding: 2rem 0;
}

.section-subtitle {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: -0.5rem;
    margin-bottom: 1.5rem;
}

.scripts-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.filter-btn {
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.filter-btn.active {
    background: linear-gradient(135deg, rgba(100, 180, 160, 0.3), rgba(80, 140, 180, 0.2));
    border-color: rgba(100, 180, 160, 0.5);
    color: var(--text-primary);
}

.scripts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.script-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.script-card:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.04));
    border-color: rgba(100, 180, 160, 0.3);
    transform: translateY(-2px);
}

.script-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.script-info {
    flex: 1;
}

.script-title {
    font-size: 0.95rem;
    color: var(--text-primary);
    margin: 0 0 0.25rem 0;
}

.script-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.script-play-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #64b4a0, #508cb4);
    border: none;
    color: var(--text-primary);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.script-play-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 20px rgba(100, 180, 160, 0.4);
}

/* Script Player */
.script-player {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, rgba(30, 35, 45, 0.98), rgba(25, 30, 40, 0.98));
    backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1rem 1.5rem;
    z-index: 100;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

.script-player.hidden {
    display: none;
}

.player-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.player-companion {
    font-size: 2rem;
}

.player-info {
    flex: 1;
}

.player-title {
    font-size: 1rem;
    color: var(--text-primary);
    margin: 0;
}

.player-duration {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 0;
}

.player-close {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
}

.player-close:hover {
    background: rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
}

.player-content {
    max-height: 100px;
    overflow-y: auto;
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
}

.player-text {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
    font-style: italic;
}

.player-progress {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.player-progress .progress-bar {
    flex: 1;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
}

.player-progress .progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #64b4a0, #508cb4);
    transition: width 0.3s ease;
}

.progress-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    min-width: 70px;
}

.player-controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.player-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: var(--text-primary);
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.player-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.player-btn.play-btn {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #64b4a0, #508cb4);
}

.player-btn.play-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 20px rgba(100, 180, 160, 0.4);
}

.player-volume {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.volume-icon {
    font-size: 1rem;
}

.volume-slider {
    width: 100px;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    -webkit-appearance: none;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    background: #64b4a0;
    border-radius: 50%;
    cursor: pointer;
}

/* Mobile adjustments */
@media (max-width: 600px) {
    .scripts-grid {
        grid-template-columns: 1fr;
    }
    
    .script-player {
        padding: 0.75rem 1rem;
    }
    
    .player-content {
        max-height: 80px;
    }
    
    .player-btn {
        width: 38px;
        height: 38px;
    }
    
    .player-btn.play-btn {
        width: 48px;
        height: 48px;
    }
}
