/* Custom styles for TestComix */

/* Comic panel animations */
@keyframes panelGlow {
    0%, 100% { box-shadow: 0 0 20px rgba(14, 165, 233, 0.3), 0 0 40px rgba(236, 72, 153, 0.2); }
    50% { box-shadow: 0 0 30px rgba(14, 165, 233, 0.5), 0 0 60px rgba(236, 72, 153, 0.3); }
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

@keyframes pulseBorder {
    0%, 100% { border-color: rgba(14, 165, 233, 0.3); }
    50% { border-color: rgba(236, 72, 153, 0.5); }
}

/* Comic panel styles */
.comic-panel {
    position: relative;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.comic-panel:hover {
    transform: translateY(-8px) scale(1.02);
    z-index: 10;
}

.comic-frame {
    background: linear-gradient(145deg, #1a1a2e, #16213e);
    border-radius: 16px;
    padding: 1.5rem;
    border: 4px solid;
    animation: pulseBorder 3s infinite;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    overflow: hidden;
    transition: all 0.4s ease;
}

.comic-panel:hover .comic-frame {
    animation: panelGlow 2s infinite;
    border-width: 6px;
}

.comic-image {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 16/9;
    margin-bottom: 1.5rem;
    border: 3px solid #2d3748;
}

.panel-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.comic-panel:hover .panel-img {
    transform: scale(1.05);
}

.comic-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 50%, rgba(0, 0, 0, 0.8));
    opacity: 0;
    transition: opacity 0.4s ease;
    display: flex;
    align-items: flex-end;
    padding: 1.5rem;
}

.comic-panel:hover .comic-overlay {
    opacity: 1;
}

/* Comic speech bubbles */
.speech-bubble {
    background: white;
    padding: 0.75rem 1.5rem;
    border-radius: 20px;
    position: relative;
    transform: translateY(20px);
    transition: transform 0.4s ease;
    max-width: 80%;
    margin: 0 auto;
}

.speech-bubble:before {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 20px;
    border-width: 10px 10px 0;
    border-style: solid;
    border-color: white transparent transparent;
}

.comic-panel:hover .speech-bubble {
    transform: translateY(0);
    animation: float 3s ease-in-out infinite;
}

.thought-bubble {
    background: rgba(255, 255, 255, 0.95);
    padding: 0.75rem 1.5rem;
    border-radius: 40px;
    position: relative;
    transform: translateY(20px);
    transition: transform 0.4s ease;
    max-width: 80%;
    margin: 0 auto;
}

.thought-bubble:before, .thought-bubble:after {
    content: '';
    position: absolute;
    background: white;
    border-radius: 50%;
    width: 12px;
    height: 12px;
}

.thought-bubble:before {
    left: 15px;
    top: -6px;
}

.thought-bubble:after {
    left: 8px;
    top: -16px;
}

.comic-panel:hover .thought-bubble {
    transform: translateY(0);
    animation: float 3s ease-in-out infinite 0.5s;
}

.sound-effect {
    background: linear-gradient(45deg, #0ea5e9, #ec4899);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-size: 2.5rem;
    font-weight: 900;
    text-transform: uppercase;
    transform: rotate(-5deg) translateY(20px);
    transition: all 0.4s ease;
    text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.3);
}

.comic-panel:hover .sound-effect {
    transform: rotate(-5deg) translateY(0);
    animation: float 2s ease-in-out infinite 0.3s;
}

.comic-caption {
    text-align: center;
    padding: 0 1rem;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .comic-panels-container {
        padding: 0 1rem;
    }
}

@media (max-width: 768px) {
    .comic-frame {
        padding: 1rem;
    }
    
    .sound-effect {
        font-size: 2rem;
    }
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: linear-gradient(to bottom, #0f172a, #1e1b4b);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, #0ea5e9, #ec4899);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to bottom, #0284c7, #db2777);
}

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

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