/**
 * Story Showcase CSS - Styling for character story presentation
 * Golden theme styling consistent with the application design
 */

/* Story Button Styles */
.story-button {
    cursor: pointer;
    transition: all 0.3s ease;
}

.story-button:hover {
    transform: scale(1.1);
    background-color: rgba(58,65,73, 0.5) !important;
}

.story-button:hover .hover-ring {
    border-color: rgba(58,65,73, 0.8);
    box-shadow: 0 0 15px rgba(58,65,73, 0.5);
    transform: scale(1.1);
}

/* Story Showcase Panel */
.story-showcase-modal {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    min-width: 500px;
    max-width: 800px;
    height: 100vh;
    background: rgba(0,0,0, 0.1)!important;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 15px 0 0 15px;
    border: 1px solid rgba(255, 255, 255, 0.2)!important;
    border-right: none;
    z-index: 9999;
    transition: transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1), 
    opacity 0.6s ease, 
    background-color 0.3s ease,
    width 0.3s ease;
    backdrop-filter: blur(10px);
    border-left: 2px solid rgba(255, 255, 255, 0.2);
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.3);
    color: white;
}

.story-showcase-modal.visible {
    right: 0;
}

/* Responsive width adjustments */
@media (max-width: 1400px) {
    .story-showcase-modal {
        width: 45%;
        min-width: 450px;
    }
}

@media (max-width: 1200px) {
    .story-showcase-modal {
        width: 50%;
        min-width: 400px;
    }
}

@media (max-width: 992px) {
    .story-showcase-modal {
        width: 60%;
        min-width: 350px;
    }
}

@media (max-width: 768px) {
    .story-showcase-modal {
        width: 80%;
        min-width: 300px;
    }
}

@media (max-width: 576px) {
    .story-showcase-modal {
        width: 95%;
        min-width: 280px;
    }
}

.story-showcase-content {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Header */
.story-showcase-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    background: none;
    border-radius: 18px 18px 0 0;
}

.story-showcase-header h2 {
    color: #ffffff;
    font-size: 1.2rem;
    font-weight: normal;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.story-showcase-controls {
    display: flex;
    align-items: center;
    gap: 20px;
}

#story-episode-counter {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.8rem;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.1);
    padding: 8px 16px;
    border-radius: 20px;
    backdrop-filter: blur(5px);
}

.story-showcase-close {
    color: rgba(255, 255, 255, 1);
    font-size: 1.6rem;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(58,65,73, 0.3);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(58,65,73, 0.3);
    line-height: 1;
    padding: 0;
    margin: 0;
    font-weight: 300;
}

.story-showcase-close:hover {
    color: white;
    transform: scale(1.1);
    background: rgba(58,65,73, 0.8);
    box-shadow: 0 0 10px rgba(58,65,73, 0.4);
}


/* Body */
.story-showcase-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 30px;
    overflow: hidden;
    color: white;
}

/* Episodes Container */
.story-episodes-container {
    flex: 1;
    position: relative;
    overflow: hidden;
    margin-bottom: 30px;
}

.story-episode {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}

.story-episode.active {
    opacity: 1;
    transform: translateX(0);
}

.story-episode.slide-in-left {
    animation: slideInLeft 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}

.story-episode.slide-in-right {
    animation: slideInRight 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}

.story-episode.slide-out-left {
    animation: slideOutLeft 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}

.story-episode.slide-out-right {
    animation: slideOutRight 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}



/* Episode Content */
.story-episode-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: 20px;
    height: 100%;
}

.story-episode-title {
    color: #ffffff;
    font-size: 1.2rem;
    font-weight: 500;
    margin: 0 0 20px 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    line-height: 1.2;
}

.story-episode-description {
    color: white;
    font-size: 1.0rem;
    line-height: 1.6;
    margin: 0;
    text-align: justify;
    font-weight: 300;
}

/* Navigation */
.story-showcase-navigation {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    margin-top: auto;
}

.story-nav-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.6);
    color: #ffffff;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    font-size: 1.2rem;
}

.story-nav-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.6);
    transform: scale(1.1);
}

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

/* Progress Dots */
.story-progress-dots {
    display: flex;
    gap: 12px;
    align-items: center;
}

.story-progress-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.story-progress-dot:hover {
    background: rgba(255, 255, 255, 0.6);
    transform: scale(1.2);
}

.story-progress-dot.active {
    background: #ffffff;
    border-color: rgba(58,65,73, 1);
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.5);
}

/* Animations */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideOutLeft {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(-100%);
    }
}

@keyframes slideOutRight {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .story-showcase-content {
        width: 95%;
        height: 90%;
        margin: 20px;
    }
    
    .story-showcase-header {
        padding: 15px 20px;
    }
    
    .story-showcase-header h2 {
        font-size: 1.4rem;
    }
    
    .story-showcase-body {
        padding: 20px;
    }
    
    .story-episode {
        flex-direction: column;
        gap: 20px;
    }
    
    .story-episode-image {
        flex: 0 0 200px;
    }
    
    .story-episode-title {
        font-size: 1.5rem;
    }
    
    .story-episode-description {
        font-size: 1rem;
    }
    
    .story-showcase-navigation {
        gap: 20px;
    }
    
    .story-nav-btn {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .story-showcase-content {
        width: 100%;
        height: 100%;
        border-radius: 0;
    }
    
    .story-episode-image {
        flex: 0 0 150px;
    }
    
    .story-episode-title {
        font-size: 1.3rem;
    }
    
    .story-episode-description {
        font-size: 0.9rem;
    }
    
    #story-episode-counter {
        font-size: 0.8rem;
        padding: 6px 12px;
    }
    
    .story-showcase-controls {
        gap: 15px;
    }
}