/* SPIRALESS Website - Component Styles */

/* Audio Player Specific Components */
.audio-player-container {
    margin-top: 2rem;
    border-top: 1px solid rgba(207, 210, 220, 0.1);
    padding-top: 2rem;
}

.audio-track {
    margin-bottom: 1rem;
}

.audio-track:last-child {
    margin-bottom: 0;
}

/* Custom Audio Player Enhancements */
.audio-player.playing .play-pause-btn {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 214, 201, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(0, 214, 201, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(0, 214, 201, 0);
    }
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
    position: relative;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid var(--highlight-blue);
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

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

/* Form Validation States */
.form-group.error input,
.form-group.error select,
.form-group.error textarea {
    border-color: #ff4444;
    background: rgba(255, 68, 68, 0.1);
}

.form-group.error label {
    color: #ff4444;
}

.form-error {
    color: #ff4444;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.form-success {
    color: #4CAF50;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Lightbox Gallery */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-smooth);
}

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

.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: var(--radius-md);
}

.lightbox-caption {
    position: absolute;
    bottom: -3rem;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    text-align: center;
    font-size: 0.9rem;
}

.lightbox-close,
.lightbox-nav {
    position: absolute;
    background: rgba(27, 43, 90, 0.8);
    border: none;
    color: white;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-smooth);
    backdrop-filter: blur(10px);
}

.lightbox-close {
    top: -4rem;
    right: 0;
}

.lightbox-nav {
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-prev {
    left: -4rem;
}

.lightbox-next {
    right: -4rem;
}

.lightbox-close:hover,
.lightbox-nav:hover {
    background: var(--highlight-blue);
    color: var(--deep-navy);
    transform: translateY(-50%) scale(1.1);
}

.lightbox-nav:hover {
    transform: translateY(-50%) scale(1.1);
}

.lightbox-close:hover {
    transform: scale(1.1);
}

@media (max-width: 768px) {
    .lightbox-nav {
        width: 40px;
        height: 40px;
    }
    
    .lightbox-prev {
        left: 1rem;
    }
    
    .lightbox-next {
        right: 1rem;
    }
    
    .lightbox-close {
        top: 1rem;
        right: 1rem;
        width: 40px;
        height: 40px;
    }
}

/* Video Lightbox */
.video-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-smooth);
}

.video-lightbox.active {
    opacity: 1;
    visibility: visible;
}

.video-lightbox-content {
    position: relative;
    width: 90vw;
    height: 50vw;
    max-width: 1200px;
    max-height: 675px;
}

.video-lightbox iframe,
.video-lightbox video {
    width: 100%;
    height: 100%;
    border-radius: var(--radius-md);
}

.video-lightbox-close {
    position: absolute;
    top: 10px;
    right: 15px;
    background: rgba(0, 0, 0, 0.7);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-smooth);
    backdrop-filter: blur(10px);
}

.video-lightbox-close:hover {
    background: var(--highlight-blue);
    color: var(--deep-navy);
}

/* Scroll Progress Indicator */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: rgba(207, 210, 220, 0.1);
    z-index: 1001;
}

.scroll-progress-bar {
    height: 100%;
    background: var(--highlight-blue);
    width: 0%;
    transition: width 0.1s ease;
}

/* Navigation Active States */
.nav-link[aria-current="page"] {
    color: var(--highlight-blue);
}

.nav-link[aria-current="page"]::after {
    width: 100%;
}

/* Enhanced Button States */
.btn {
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:active::before {
    width: 300px;
    height: 300px;
}

/* Social Media Icon Animations */
.social-link svg {
    transition: var(--transition-smooth);
}

.social-link:hover svg {
    transform: scale(1.1);
}

/* Parallax Scrolling Effect */
.parallax {
    transform: translateZ(0);
    will-change: transform;
}

/* Enhanced Hover States for Cards */
.album-card,
.review-card,
.video-card {
    position: relative;
    overflow: hidden;
}

.album-card::before,
.review-card::before,
.video-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 214, 201, 0.1), transparent);
    transition: left 0.6s;
    z-index: 1;
}

.album-card:hover::before,
.review-card:hover::before,
.video-card:hover::before {
    left: 100%;
}

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

::-webkit-scrollbar-track {
    background: var(--deep-navy);
}

::-webkit-scrollbar-thumb {
    background: var(--highlight-blue);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-aqua);
}

/* Focus States for Accessibility */
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--highlight-blue);
    outline-offset: 2px;
}

/* Skip to Content Link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--highlight-blue);
    color: var(--deep-navy);
    padding: 8px;
    text-decoration: none;
    border-radius: var(--radius-sm);
    z-index: 1002;
    transition: top 0.3s;
}

.skip-link:focus {
    top: 6px;
}

/* Mobile Menu */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 30px;
    z-index: 1001;
}

.mobile-menu-toggle span {
    display: block;
    height: 3px;
    width: 100%;
    background: white;
    border-radius: 2px;
    transition: var(--transition-smooth);
    transform-origin: center;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

@media (max-width: 768px) {
    /* Mobile menu styles moved to main.css for consistency */
}

/* Print Styles */
@media print {
    .header,
    .footer,
    .btn,
    .audio-player,
    .contact-form {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    .hero-section {
        min-height: auto;
        page-break-after: always;
    }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    :root {
        --neutral-gray: #ffffff;
        --mid-blue: #000000;
        --highlight-blue: #ffff00;
    }
    
    .hero-overlay {
        background: rgba(0, 0, 0, 0.7);
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .audio-player.playing .play-pause-btn {
        animation: none;
    }
}

/* Loading States for Images */
.image-loading {
    background: linear-gradient(90deg, var(--mid-blue) 25%, var(--deep-navy) 50%, var(--mid-blue) 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Enhanced Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Dark Mode Adjustments (if needed) */
@media (prefers-color-scheme: dark) {
    /* Already optimized for dark theme */
}

/* Error States */
.error-boundary {
    padding: 2rem;
    text-align: center;
    background: rgba(255, 68, 68, 0.1);
    border: 1px solid rgba(255, 68, 68, 0.2);
    border-radius: var(--radius-md);
    color: #ff4444;
}

.error-boundary h3 {
    color: #ff4444;
    margin-bottom: 1rem;
}
