* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #0F0F0F;
    color: #E0E0E0;
    overflow-x: hidden;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(15, 15, 15, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid rgba(128, 0, 32, 0.3);
}

.logo {
    height: 25px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav {
    display: flex;
    gap: 30px;
    align-items: center;
}

.nav a {
    color: #999;
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.3s;
}

.nav a:hover {
    opacity: 0.5;
}

/* Credits Pill */
.credits-pill {
    background: rgba(128, 0, 32, 0.15);
    border: 1px solid rgba(128, 0, 32, 0.3);
    border-radius: 20px;
    padding: 6px 14px;
    font-size: 12px;
    color: #999;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.credits-pill:hover {
    background: rgba(128, 0, 32, 0.25);
    border-color: rgba(128, 0, 32, 0.5);
}

.credits-pill #credits-minutes {
    color: #800020;
    font-weight: 600;
}

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
    padding: 8px;
}

.hamburger span {
    width: 25px;
    height: 2px;
    background: #999;
    transition: all 0.3s;
}

.hamburger:hover span {
    background: #CCCCCC;
}

/* Mobile Header */
@media (max-width: 768px) {
    .header {
        padding: 15px 20px;
    }

    .header-right {
        gap: 15px;
    }

    .credits-pill {
        padding: 5px 10px;
        font-size: 10px;
    }

    .nav {
        position: fixed;
        top: 66px;
        left: 0;
        right: 0;
        background: rgba(15, 15, 15, 0.98);
        backdrop-filter: blur(10px);
        flex-direction: column;
        gap: 0;
        padding: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        border-bottom: 1px solid rgba(128, 0, 32, 0.3);
        align-items: stretch;
    }

    .nav.active {
        max-height: 300px;
    }

    .nav a {
        padding: 20px 20px;
        border-bottom: 1px solid rgba(128, 0, 32, 0.2);
    }

    .hamburger {
        display: flex;
    }
}

/* Main Container */
.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 100px 40px 40px;
}

.container.center {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 100px 20px 40px;
}

.page-title {
    font-size: 36px;
    font-weight: 500;
    color: #CCCCCC;
    margin-bottom: 60px;
    padding-bottom: 20px;
    border-bottom: 3px solid transparent;
    border-image: linear-gradient(90deg, #800020 0%, rgba(128, 0, 32, 0.3) 70%, transparent 100%);
    border-image-slice: 1;
    position: relative;
}

.page-title::before {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 80px;
    height: 3px;
    background: #800020;
    box-shadow: 0 0 20px rgba(128, 0, 32, 0.6);
}

.page-subtitle {
    font-size: 18px;
    color: #666;
    margin-bottom: 60px;
    margin-top: 20px;
}

/* Creator Page */
.creator-card {
    max-width: 640px;
    width: 100%;
}

.creator-card .page-title {
    font-size: 36px;
    text-align: center;
    margin-bottom: 50px;
}

.creator-card .page-title::before {
    left: 50%;
    transform: translateX(-50%);
}

.creator-card .page-subtitle {
    text-align: center;
    margin-bottom: 50px;
}

.page-header {
    transition: opacity 0.3s, transform 0.3s;
}

.page-header.hidden {
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
    position: absolute;
}

/* Form */
.form-group {
    margin-bottom: 35px;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #CCCCCC;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid rgba(128, 0, 32, 0.3);
    border-radius: 12px;
    font-size: 16px;
    font-family: inherit;
    color: #E0E0E0;
    background: #1A1A1A;
    transition: all 0.3s;
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: #800020;
    box-shadow: 0 0 0 4px rgba(128, 0, 32, 0.15);
}

.form-textarea {
    min-height: 140px;
    resize: vertical;
    line-height: 1.6;
}

.form-hint {
    font-size: 13px;
    color: #666;
    margin-top: 8px;
    font-style: italic;
}

.char-count {
    text-align: right;
    font-size: 12px;
    color: #666;
    margin-top: 6px;
}

.char-count.warning {
    color: #800020;
}

/* Voice Categories */
.voice-category {
    margin-bottom: 30px;
}

.voice-category:last-child {
    margin-bottom: 0;
}

.category-label {
    font-size: 12px;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
}

/* Voice Carousel Container */
.voice-carousel-container {
    position: relative;
    width: calc(100% + 100px); /* Extend width to accommodate arrows */
    margin-left: -50px; /* Center the container */
    padding: 0 50px; /* Make room for absolutely positioned arrows */
}

/* Carousel Navigation Buttons */
.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #1A1A1A;
    border: 2px solid rgba(128, 0, 32, 0.3);
    color: #999;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.carousel-nav.carousel-prev {
    left: 0;
}

.carousel-nav.carousel-next {
    right: 0;
}

.carousel-nav:hover:not(:disabled) {
    border-color: rgba(128, 0, 32, 0.6);
    background: rgba(128, 0, 32, 0.1);
    color: #CCCCCC;
    transform: translateY(-50%) scale(1.1);
}

.carousel-nav:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.carousel-nav svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

/* Voice Selector - Carousel Mode */
.voice-selector {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
}

.voice-selector.voice-carousel {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
    padding: 4px 0;
    position: relative;
}

.voice-selector.voice-carousel::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

/* Fade indicators for scrollable content */
.voice-carousel-container::before,
.voice-carousel-container::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 40px;
    pointer-events: none;
    z-index: 5;
    opacity: 0;
    transition: opacity 0.3s;
}

.voice-carousel-container::before {
    left: 50px;
    background: linear-gradient(to right, rgba(15, 15, 15, 0.8), transparent);
}

.voice-carousel-container::after {
    right: 50px;
    background: linear-gradient(to left, rgba(15, 15, 15, 0.8), transparent);
}

.voice-carousel-container.show-left-fade::before {
    opacity: 1;
}

.voice-carousel-container.show-right-fade::after {
    opacity: 1;
}

.voice-carousel .voice-option {
    scroll-snap-align: start;
    flex-shrink: 0;
    min-width: 110px;
}

.voice-option {
    position: relative;
}

.voice-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.voice-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 12px;
    border: 2px solid rgba(128, 0, 32, 0.3);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
    background: #1A1A1A;
}

.voice-label:hover {
    border-color: rgba(128, 0, 32, 0.5);
    transform: translateY(-2px);
}

.voice-option input[type="radio"]:checked + .voice-label {
    border-color: #800020;
    background: rgba(128, 0, 32, 0.15);
    box-shadow: 0 0 0 3px rgba(128, 0, 32, 0.15);
}

.voice-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    margin-bottom: 10px;
    position: relative;
    overflow: hidden;
}

.voice-avatar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.25) 0%, transparent 70%);
}

/* Auto Voice Avatar - Special Style */
.voice-avatar-auto {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%) !important;
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.05);
    }
}

.voice-name {
    font-size: 14px;
    font-weight: 600;
    color: #E0E0E0;
}

.asmr-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    padding: 2px 6px;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    color: #FF1744;
    background: rgba(255, 23, 68, 0.15);
    border: 1px solid rgba(255, 23, 68, 0.3);
    border-radius: 3px;
    letter-spacing: 0.5px;
}

/* Generate Button */
.generate-section {
    margin-top: 50px;
    text-align: center;
}

.generate-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 18px 40px;
    background: #800020;
    color: white;
    border: none;
    border-radius: 30px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 30px rgba(128, 0, 32, 0.4);
}

.generate-btn:hover:not(:disabled) {
    background: #5a0016;
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(128, 0, 32, 0.5);
}

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

.generate-btn svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

/* Loading State */
.loading-state {
    display: none;
    text-align: center;
    margin-top: 40px;
    padding: 40px;
}

.loading-state.active {
    display: block;
}

.loading-orb {
    width: 100px;
    height: 100px;
    margin: 0 auto 30px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #d4a5a5, #800020);
    animation: pulse-loading 1.5s ease-in-out infinite;
    box-shadow: 0 0 40px rgba(128, 0, 32, 0.5);
}

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

.loading-text {
    font-size: 18px;
    color: #CCCCCC;
    font-weight: 600;
    margin-bottom: 10px;
}

.loading-subtext {
    font-size: 14px;
    color: #666;
}

/* Library Page - Story List */
.library-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 60px;
}

.library-title {
    font-size: 28px;
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.library-title::before {
    display: none;
}

.create-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: #800020;
    color: white;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(128, 0, 32, 0.3);
}

.create-action-btn:hover {
    background: #5a0016;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(128, 0, 32, 0.4);
}

.create-action-btn svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.stories-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 60px;
    padding: 20px 0;
}

.pagination-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #1A1A1A;
    color: #999;
    border: 1px solid rgba(128, 0, 32, 0.3);
    border-radius: 20px;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s;
}

.pagination-btn:hover {
    background: rgba(128, 0, 32, 0.1);
    color: #CCCCCC;
    border-color: rgba(128, 0, 32, 0.5);
}

.pagination-btn svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.pagination-info {
    color: #666;
    font-size: 14px;
    font-weight: 500;
}

.story-card-wrapper {
    position: relative;
}

.story-card {
    background: #1A1A1A;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: flex;
    align-items: center;
    gap: 30px;
    position: relative;
    border: 1px solid rgba(128, 0, 32, 0.3);
}

.story-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(128, 0, 32, 0.3);
    border-color: rgba(128, 0, 32, 0.5);
}

.cancel-clip-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(128, 0, 32, 0.8);
    color: #FFF;
    border: 1px solid rgba(128, 0, 32, 0.5);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: all 0.3s;
    z-index: 10;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cancel-clip-btn:hover:not(:disabled) {
    background: rgba(180, 0, 45, 0.9);
    border-color: rgba(180, 0, 45, 0.7);
    transform: scale(1.05);
}

.cancel-clip-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.cancel-clip-btn svg {
    flex-shrink: 0;
}

.story-orb {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    flex-shrink: 0;
    position: relative;
}

.story-status {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    z-index: 10;
}

.story-status.completed {
    background: #1A1A1A;
    border: 2px solid rgba(128, 0, 32, 0.5);
}

.story-status.completed svg {
    width: 18px;
    height: 18px;
    fill: #800020;
}

.story-status.live {
    background: #800020;
    border: 2px solid #800020;
}

.story-status.live::after {
    content: '';
    width: 12px;
    height: 12px;
    background: white;
    border-radius: 50%;
    animation: blink 1.5s ease-in-out infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.story-status.waiting {
    background: #1A1A1A;
    border: 2px solid rgba(128, 0, 32, 0.5);
}

.story-status.waiting::after {
    content: '';
    width: 10px;
    height: 10px;
    border: 2px solid #800020;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.story-content {
    flex: 1;
    min-width: 0;
}

.story-title {
    font-size: 20px;
    font-weight: 600;
    color: #E0E0E0;
    margin-bottom: 8px;
}

.story-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 14px;
    color: #888;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.story-duration {
    font-size: 28px;
    font-weight: 300;
    color: #800020;
    flex-shrink: 0;
    letter-spacing: 1px;
}

.story-duration.pending {
    font-size: 20px;
    color: #555;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 100px 20px;
}

.empty-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 30px;
    opacity: 0.3;
}

.empty-icon svg {
    width: 100%;
    height: 100%;
    fill: #800020;
}

.empty-title {
    font-size: 24px;
    color: #E0E0E0;
    margin-bottom: 10px;
}

.empty-text {
    font-size: 16px;
    color: #666;
    margin-bottom: 30px;
}

.cta-btn {
    display: inline-block;
    padding: 14px 32px;
    background: #800020;
    color: white;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
}

.cta-btn:hover {
    background: #5a0016;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(128, 0, 32, 0.5);
}

/* Player Page */
.player-card {
    max-width: 500px;
    width: 100%;
    text-align: center;
}

.story-info {
    margin-bottom: 80px;
}

.story-info .story-title {
    font-size: 32px;
    font-weight: 500;
    color: #CCCCCC;
    margin-bottom: 12px;
}

.story-info .story-meta {
    font-size: 16px;
    color: #666;
    justify-content: center;
    text-align: center;
}

/* Player States */
.waiting-state,
.live-state,
.complete-state {
    display: none;
}

.waiting-state.active,
.live-state.active,
.complete-state.active {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Waiting State */
.anticipation-orb {
    width: 160px;
    height: 160px;
    margin: 0 auto 40px;
    position: relative;
}

.orb-core {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, rgba(212, 165, 165, 0.8), #800020);
    box-shadow:
        0 0 40px rgba(128, 0, 32, 0.5),
        inset 0 0 30px rgba(255, 255, 255, 0.1);
    animation: anticipate 2.5s ease-in-out infinite;
}

@keyframes anticipate {
    0%, 100% {
        transform: scale(1);
        opacity: 0.8;
    }
    50% {
        transform: scale(1.03);
        opacity: 1;
    }
}

.waiting-text {
    font-size: 16px;
    color: #666;
    font-weight: 500;
}

/* Live State */
.audio-orb {
    width: 200px;
    height: 200px;
    margin: 0 auto 40px;
    position: relative;
}

.orb-pulse {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, rgba(212, 100, 100, 0.9), #800020);
    animation: pulse 1s ease-in-out infinite;
    box-shadow:
        0 0 60px rgba(128, 0, 32, 0.7),
        inset 0 0 40px rgba(255, 255, 255, 0.15);
}

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

.orb-rings {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
}

.ring {
    position: absolute;
    border: 2px solid rgba(128, 0, 32, 0.6);
    border-radius: 50%;
    animation: expand 2.5s ease-out infinite;
}

.ring:nth-child(1) {
    width: 100%;
    height: 100%;
    animation-delay: 0s;
}

.ring:nth-child(2) {
    width: 100%;
    height: 100%;
    animation-delay: 0.8s;
}

.ring:nth-child(3) {
    width: 100%;
    height: 100%;
    animation-delay: 1.6s;
}

@keyframes expand {
    0% {
        transform: scale(1);
        opacity: 0.5;
    }
    100% {
        transform: scale(1.6);
        opacity: 0;
    }
}

.live-indicator {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    color: #800020;
    font-weight: 600;
    margin-bottom: 8px;
}

.live-dot {
    width: 8px;
    height: 8px;
    background: #800020;
    border-radius: 50%;
    animation: blink 1s ease-in-out infinite;
}

/* Complete State */
.complete-state {
    text-align: center;
}

.audio-controls {
    max-width: 100%;
    width: 100%;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(128, 0, 32, 0.3);
    border-radius: 3px;
    position: relative;
    cursor: pointer;
    margin-bottom: 15px;
}

.progress-fill {
    height: 100%;
    background: #800020;
    border-radius: 3px;
    width: 0%;
    transition: width 0.1s;
}

.time-display {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: #666;
    margin-bottom: 35px;
}

.control-buttons {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 25px;
    margin-bottom: 20px;
}

.control-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #999;
    transition: all 0.3s;
    padding: 10px;
}

.control-btn:hover {
    transform: scale(1.1);
    opacity: 0.5;
}

.control-btn.primary {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #800020;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.control-btn svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.control-btn.primary svg {
    width: 28px;
    height: 28px;
    margin-left: 3px;
}

.download-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 30px;
    padding: 12px 24px;
    background: rgba(128, 0, 32, 0.15);
    border: 1px solid rgba(128, 0, 32, 0.3);
    border-radius: 25px;
    color: #800020;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
}

.download-btn:hover {
    background: rgba(128, 0, 32, 0.25);
    border-color: rgba(128, 0, 32, 0.5);
    transform: translateY(-2px);
}

.back-btn {
    margin-top: 60px;
    display: inline-block;
    padding: 12px 30px;
    border: 1px solid #333;
    border-radius: 25px;
    color: #999;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s;
}

.back-btn:hover {
    background: #1A1A1A;
    border-color: #444;
}

/* Message/Error containers */
.message {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    transition: opacity 0.3s;
}

.message.hidden {
    display: none;
}

.message.error {
    background: rgba(128, 0, 32, 0.2);
    color: #800020;
    border: 1px solid rgba(128, 0, 32, 0.4);
}

/* Responsive */
@media (max-width: 768px) {
    .header {
        padding: 15px 20px;
    }

    .logo {
        height: 20px;
    }

    .container {
        padding: 80px 20px 40px;
    }

    .page-title {
        font-size: 32px;
    }

    .library-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
        margin-bottom: 40px;
    }

    .library-title {
        font-size: 24px;
    }

    .pagination {
        flex-wrap: wrap;
        gap: 15px;
    }

    .pagination-info {
        order: -1;
        width: 100%;
        text-align: center;
    }

    .creator-card .page-title {
        font-size: 30px;
    }

    .page-subtitle {
        font-size: 16px;
    }

    .story-card {
        padding: 20px;
        gap: 20px;
    }

    .story-orb {
        width: 60px;
        height: 60px;
    }

    .story-title {
        font-size: 18px;
    }

    .story-duration {
        font-size: 22px;
    }

    .voice-selector:not(.voice-carousel) {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }

    .voice-carousel .voice-option {
        min-width: 120px;
    }

    .voice-avatar {
        width: 48px;
        height: 48px;
    }

    /* Hide carousel navigation on mobile */
    .carousel-nav {
        display: none;
    }

    /* Reset carousel container on mobile */
    .voice-carousel-container {
        width: 100%;
        margin-left: 0;
        padding: 0;
    }

    .voice-carousel-container::before,
    .voice-carousel-container::after {
        display: none;
    }

    .anticipation-orb {
        width: 140px;
        height: 140px;
    }

    .audio-orb {
        width: 180px;
        height: 180px;
    }

    .duration-display {
        font-size: 30px;
    }

    .control-btn.primary {
        width: 56px;
        height: 56px;
    }

    .control-btn.primary svg {
        width: 24px;
        height: 24px;
    }

    .story-info .story-title {
        font-size: 26px;
    }
}

@media (max-width: 480px) {
    .voice-selector:not(.voice-carousel) {
        grid-template-columns: repeat(2, 1fr);
    }

    .voice-carousel .voice-option {
        min-width: 110px;
    }

    /* Ensure arrows stay hidden on small mobile */
    .carousel-nav {
        display: none;
    }

    .voice-carousel-container {
        width: 100%;
        margin-left: 0;
        padding: 0;
    }

    .story-card .story-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }

    .story-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .story-duration {
        align-self: flex-end;
    }

    /* Keep player meta centered on mobile */
    .story-info .story-meta {
        flex-direction: row;
        align-items: center;
    }

    .create-action-btn {
        width: 100%;
        justify-content: center;
    }

    .library-title {
        font-size: 22px;
    }
}

/* Footer */
.footer {
    background: rgba(15, 15, 15, 0.95);
    border-top: 1px solid rgba(128, 0, 32, 0.3);
    padding: 40px 40px;
    margin-top: 80px;
}

.footer-content {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-links {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}

.footer-links a {
    color: #666;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: #999;
}

.footer-copyright {
    color: #444;
    font-size: 13px;
}

@media (max-width: 768px) {
    .footer {
        padding: 30px 20px;
        margin-top: 60px;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .footer-links {
        justify-content: center;
    }
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: #1A1A1A;
    border: 1px solid rgba(128, 0, 32, 0.3);
    border-radius: 16px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    transform: scale(0.9);
    transition: transform 0.3s;
}

.modal.active .modal-content {
    transform: scale(1);
}

.modal-header {
    padding: 30px 30px 20px;
    border-bottom: 1px solid rgba(128, 0, 32, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-size: 24px;
    font-weight: 500;
    color: #CCCCCC;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    color: #666;
    font-size: 32px;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s;
    line-height: 1;
}

.modal-close:hover {
    color: #999;
}

.modal-body {
    padding: 30px;
}

.modal-credits-display {
    background: rgba(128, 0, 32, 0.1);
    border: 1px solid rgba(128, 0, 32, 0.3);
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    margin-bottom: 25px;
}

.modal-credits-number {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.modal-credits-number #modal-credits-minutes {
    font-size: 48px;
    font-weight: 700;
    color: #800020;
    line-height: 1;
}

.modal-credits-label {
    font-size: 14px;
    color: #999;
    font-weight: 500;
}

.modal-text {
    color: #999;
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 15px;
}

.modal-btn {
    display: block;
    width: 100%;
    padding: 16px 32px;
    background: #800020;
    color: white;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    text-align: center;
    margin-top: 25px;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
}

.modal-btn:hover {
    background: #5a0016;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(128, 0, 32, 0.5);
}

@media (max-width: 768px) {
    .modal-header {
        padding: 25px 20px 15px;
    }

    .modal-header h2 {
        font-size: 20px;
    }

    .modal-body {
        padding: 20px;
    }

    .modal-credits-number #modal-credits-minutes {
        font-size: 42px;
    }
}
