/*
Theme Name: RIVI NYX Rain Theme
Description: 「夜の廃駅 × サイバーパンク × 雨」の世界観を表現した没入型EDMアーティストテーマ
Author: RIVI NYX
Version: 2.0.0
License: GPL v2 or later
Text Domain: rivi-nyx
*/

/* ==========================================================================
   RESET & BASE STYLES
   ========================================================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    background: inherit !important;
}

body {
    font-family: 'Courier New', 'Monaco', 'Lucida Console', monospace;
    background-color: #000000;
    color: #ffffff;
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

/* ==========================================================================
   ACCESSIBILITY & SCREEN READER STYLES
   ========================================================================== */

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 999999;
    padding: 8px 16px;
    background: #00ffff;
    color: #000000;
    text-decoration: none;
    font-weight: bold;
}

.skip-link:focus {
    left: 6px;
    top: 6px;
}

.sr-only,
.screen-reader-text {
    position: absolute !important;
    clip: rect(1px, 1px, 1px, 1px);
    width: 1px !important;
    height: 1px !important;
    overflow: hidden;
}

/* ==========================================================================
   GLOBAL UNIFIED BACKGROUND
   ========================================================================== */

/* Apply unified background to entire page */
body.rivi-nyx-rain-theme {
    background: 
        linear-gradient(135deg, rgba(0, 0, 0, 0.7) 0%, rgba(0, 25, 50, 0.6) 25%, rgba(0, 50, 100, 0.5) 50%, rgba(0, 25, 50, 0.6) 75%, rgba(0, 0, 0, 0.7) 100%),
        url('rivi-nyx-subway-bg.png'),
        linear-gradient(135deg, #000000 0%, #001122 25%, #003366 50%, #001122 75%, #000000 100%);
    background-size: cover, cover, cover;
    background-position: center center, center center, center center;
    background-repeat: no-repeat, no-repeat, no-repeat;
    background-attachment: fixed, fixed, fixed;
    min-height: 100vh;
    
    /* Apply cyberpunk color filters to entire background */
    filter: 
        brightness(0.6)
        contrast(1.8)
        saturate(2.5)
        hue-rotate(200deg)
        sepia(0.8)
        invert(0.1);
}

/* Reset individual section backgrounds to transparent */
.hero-section {
    background: none !important;
    background-image: none !important;
    background-color: transparent !important;
    filter: none !important; /* Remove individual filters since body has them */
    width: 100vw;
    height: 100vh;
    min-height: 100vh;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

/* Content Section Styling */
.content-section {
    min-height: 100vh !important;
    padding: 4rem 0 !important;
    background: none !important; /* Use body background instead */
    background-image: none !important;
    background-color: transparent !important;
    background-attachment: inherit !important;
    background-size: inherit !important;
    position: relative !important;
    z-index: 1 !important; /* 雨より低く */
    color: #ffffff !important;
}

/* Force all child elements to have transparent backgrounds */
.content-section *,
.hero-section *,
.site-footer * {
    background-image: none !important;
    background-color: transparent !important;
}

/* Site footer with transparent background */
.site-footer {
    background: none !important;
    background-image: none !important;
    background-color: transparent !important;
    padding: 2rem 0;
    text-align: center;
    border-top: 2px solid rgba(0, 255, 255, 0.3);
    position: relative;
    z-index: 1;
    box-shadow: 0 -10px 30px rgba(0, 255, 255, 0.1);
}

/* ==========================================================================
   GLOBAL RAIN ANIMATION CONTAINER
   ========================================================================== */

.global-rain-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 300vh; /* さらに高く拡張 */
    z-index: 9999; /* 最前面に確実に配置 */
    pointer-events: none;
    overflow: hidden;
}

/* CSS-Only Rain Fallback System */
.global-rain-container::before,
.global-rain-container::after {
    content: '';
    position: absolute;
    top: -100px;
    width: 2px;
    height: 100px;
    background: linear-gradient(to bottom, rgba(0, 255, 255, 1), rgba(0, 255, 255, 0));
    animation: css-rain-fall 3s linear infinite;
    z-index: 9999;
}

.global-rain-container::before {
    left: 10%;
    animation-delay: 0s;
}

.global-rain-container::after {
    left: 30%;
    animation-delay: 1s;
}

/* CSS Rain Animation */
@keyframes css-rain-fall {
    0% {
        transform: translateY(-100px);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(calc(300vh + 200px));
        opacity: 0;
    }
}

/* Force visible rain drops with CSS */
.force-rain-drops {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9998;
    pointer-events: none;
    background-image: 
        linear-gradient(transparent 0%, transparent 95%, rgba(0, 255, 255, 0.3) 95%, rgba(0, 255, 255, 0.3) 100%),
        linear-gradient(90deg, transparent 0%, transparent 10%, rgba(0, 255, 255, 0.1) 10%, rgba(0, 255, 255, 0.1) 11%, transparent 11%);
    background-size: 20px 100vh, 100vw 20px;
    animation: rain-pattern 2s linear infinite;
}

@keyframes rain-pattern {
    0% {
        background-position: 0 -100vh, 0 0;
    }
    100% {
        background-position: 0 100vh, 0 0;
    }
}

/* Rain Drop Styles - より強力な雨粒 */
.rain-drop {
    position: absolute;
    background: linear-gradient(to bottom, 
        rgba(0, 255, 255, 1.0), 
        rgba(0, 255, 255, 0.4));
    border-radius: 50px;
    animation: rain-fall linear infinite;
    pointer-events: none;
    box-shadow: 
        0 0 10px rgba(0, 255, 255, 0.8),
        0 0 20px rgba(0, 255, 255, 0.4);
    z-index: 9999; /* 雨粒も最前面 */
}

/* Rain Animation Keyframes - 長距離落下 */
@keyframes rain-fall {
    0% { 
        transform: translateY(-50px); 
        opacity: 0; 
    }
    5% { 
        opacity: 1; 
    }
    95% { 
        opacity: 1; 
    }
    100% { 
        transform: translateY(calc(300vh + 100px)); /* さらに長距離に拡張 */
        opacity: 0; 
    }
}

/* Rain Intensity Variations */
.rain-drop:nth-child(odd) {
    animation-duration: 0.8s;
}

.rain-drop:nth-child(even) {
    animation-duration: 1.2s;
}

.rain-drop:nth-child(3n) {
    animation-duration: 1.0s;
    box-shadow: 0 0 8px rgba(0, 255, 255, 0.7);
}

/* ==========================================================================
   HERO SECTION - FULL SCREEN BACKGROUND
   ========================================================================== */

.hero-content {
    position: relative;
    z-index: 100; /* 雨より低く、でも他より高く */
    text-align: center;
    max-width: 800px;
    padding: 2rem;
    animation: hero-fade-in 2s ease-out;
}

@keyframes hero-fade-in {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================================================
   CYBERPUNK TEXT EFFECTS
   ========================================================================== */

/* Site Title / Artist Name */
.site-title {
    font-size: 4rem;
    font-weight: bold;
    color: #00ffff;
    text-shadow: 
        0 0 10px #00ffff,
        0 0 20px #00ffff,
        0 0 30px #00ffff,
        0 0 40px #00ffff;
    text-align: center;
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
    animation: title-glow 3s ease-in-out infinite alternate;
}

@keyframes title-glow {
    0% {
        text-shadow: 
            0 0 10px #00ffff,
            0 0 20px #00ffff,
            0 0 30px #00ffff;
    }
    100% {
        text-shadow: 
            0 0 15px #00ffff,
            0 0 25px #00ffff,
            0 0 35px #00ffff,
            0 0 45px #00ffff;
    }
}

/* Glitch Effect for Title */
.title-main {
    position: relative;
    z-index: 2;
}

.title-glitch {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    color: #ff00ff;
    animation: glitch 2s infinite;
    z-index: 1;
}

@keyframes glitch {
    0%, 90%, 100% {
        transform: translate(0);
        opacity: 0;
    }
    5% {
        transform: translate(2px, 1px);
        opacity: 0.8;
    }
    10% {
        transform: translate(-1px, -2px);
        opacity: 0.8;
    }
    15% {
        transform: translate(0);
        opacity: 0;
    }
}

/* Site Tagline */
.site-tagline {
    font-size: 1.2rem;
    color: #ffffff;
    margin-bottom: 0.5rem;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
    animation: tagline-pulse 4s ease-in-out infinite;
}

@keyframes tagline-pulse {
    0%, 100% {
        opacity: 0.8;
    }
    50% {
        opacity: 1;
        text-shadow: 0 0 15px rgba(255, 255, 255, 0.8);
    }
}

/* Site Subtitle */
.site-subtitle {
    font-size: 1rem;
    color: #00ffff;
    margin-bottom: 2rem;
    font-style: italic;
    opacity: 0.9;
    text-shadow: 0 0 5px rgba(0, 255, 255, 0.5);
}

/* ==========================================================================
   SOCIAL LINKS & MUSIC PLATFORMS
   ========================================================================== */

.hero-links {
    margin-top: 2rem;
}

.social-links {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    align-items: center;
}

/* Music Platforms */
.music-platforms {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.platform-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: rgba(0, 255, 255, 0.1);
    border: 2px solid #00ffff;
    color: #00ffff;
    text-decoration: none;
    border-radius: 25px;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.platform-link:hover {
    background: rgba(0, 255, 255, 0.2);
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.5);
    transform: translateY(-2px);
}

.platform-link i {
    font-size: 1.2rem;
}

/* Platform-specific colors */
.platform-link.soundcloud:hover {
    border-color: #ff5500;
    color: #ff5500;
    box-shadow: 0 0 20px rgba(255, 85, 0, 0.5);
}

.platform-link.spotify:hover {
    border-color: #1db954;
    color: #1db954;
    box-shadow: 0 0 20px rgba(29, 185, 84, 0.5);
}

.platform-link.apple-music:hover {
    border-color: #fa57c1;
    color: #fa57c1;
    box-shadow: 0 0 20px rgba(250, 87, 193, 0.5);
}

.platform-link.youtube:hover {
    border-color: #ff0000;
    color: #ff0000;
    box-shadow: 0 0 20px rgba(255, 0, 0, 0.5);
}

/* Social Media */
.social-media {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: rgba(255, 0, 255, 0.1);
    border: 2px solid #ff00ff;
    color: #ff00ff;
    text-decoration: none;
    border-radius: 50%;
    transition: all 0.3s ease;
    font-size: 1.2rem;
}

.social-link:hover {
    background: rgba(255, 0, 255, 0.2);
    box-shadow: 0 0 20px rgba(255, 0, 255, 0.5);
    transform: scale(1.1);
}

/* ==========================================================================
   SCROLL INDICATOR
   ========================================================================== */

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    z-index: 3;
    animation: scroll-bounce 2s infinite;
}

@keyframes scroll-bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-10px);
    }
    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

.scroll-arrow {
    margin-bottom: 0.5rem;
}

.scroll-arrow span {
    display: block;
    width: 2px;
    height: 15px;
    background: #00ffff;
    margin: 2px auto;
    animation: scroll-arrow-move 2s infinite;
    box-shadow: 0 0 5px rgba(0, 255, 255, 0.5);
}

.scroll-arrow span:nth-child(2) {
    animation-delay: 0.15s;
}

.scroll-arrow span:nth-child(3) {
    animation-delay: 0.3s;
}

@keyframes scroll-arrow-move {
    0% {
        opacity: 0;
        height: 15px;
    }
    50% {
        opacity: 1;
        height: 20px;
    }
    100% {
        opacity: 0;
        height: 15px;
    }
}

.scroll-text {
    color: #00ffff;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.8;
}

/* ==========================================================================
   CONTENT SECTIONS
   ========================================================================== */

.container {
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 0 2rem !important;
    position: relative !important;
    z-index: 2 !important;
    background: none !important;
}

.entry-content {
    background: rgba(0, 0, 0, 0.8) !important;
    border: 2px solid rgba(0, 255, 255, 0.6) !important;
    border-radius: 15px !important;
    padding: 2rem !important;
    margin: 2rem 0 !important;
    box-shadow: 
        0 0 30px rgba(0, 255, 255, 0.3),
        inset 0 0 30px rgba(0, 255, 255, 0.1) !important;
    backdrop-filter: blur(15px) !important;
    color: #ffffff !important;
    position: relative !important;
    z-index: 10 !important; /* 雨より低く、でもコンテンツより高く */
    background-image: none !important;
}

.entry-content::before {
    content: '' !important;
    position: absolute !important;
    top: -2px !important;
    left: -2px !important;
    right: -2px !important;
    bottom: -2px !important;
    background: linear-gradient(45deg, 
        rgba(0, 255, 255, 0.4) 0%, 
        rgba(255, 0, 255, 0.4) 50%, 
        rgba(0, 255, 255, 0.4) 100%) !important;
    border-radius: 17px !important;
    z-index: -1 !important;
    animation: neon-pulse 2s ease-in-out infinite alternate !important;
}

@keyframes neon-pulse {
    0% {
        opacity: 0.6;
        filter: blur(1px);
    }
    100% {
        opacity: 1;
        filter: blur(0px);
    }
}

.entry-content p {
    color: #cccccc !important;
    line-height: 1.8 !important;
    margin-bottom: 1rem !important;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.2) !important;
    font-size: 1rem !important;
}

.entry-content a {
    color: #00ffff !important;
    text-decoration: none !important;
    text-shadow: 0 0 5px rgba(0, 255, 255, 0.5) !important;
    transition: all 0.3s ease !important;
}

.entry-content a:hover {
    color: #ff00ff !important;
    text-shadow: 0 0 10px rgba(255, 0, 255, 0.7) !important;
}

/* WordPress specific overrides */
.content-section article {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

.content-section .post {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

/* Ultra-specific WordPress overrides for content styling */
body.rivi-nyx-rain-theme .content-section .container .entry-content,
.rivi-nyx-rain-theme .content-section .container .entry-content,
.content-section .container .entry-content,
.entry-content {
    background: rgba(0, 0, 0, 0.8) !important;
    border: 2px solid rgba(0, 255, 255, 0.6) !important;
    border-radius: 15px !important;
    padding: 2rem !important;
    margin: 2rem 0 !important;
    box-shadow: 
        0 0 30px rgba(0, 255, 255, 0.3),
        inset 0 0 30px rgba(0, 255, 255, 0.1) !important;
    backdrop-filter: blur(15px) !important;
    color: #ffffff !important;
    position: relative !important;
    z-index: 10 !important;
}

/* Force text styling */
body.rivi-nyx-rain-theme .content-section .entry-content p,
.content-section .entry-content p,
.entry-content p {
    color: #cccccc !important;
    line-height: 1.8 !important;
    margin-bottom: 1rem !important;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.2) !important;
    font-size: 1rem !important;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */

.site-footer {
    background: none !important;
    background-image: none !important;
    background-color: transparent !important;
    padding: 2rem 0;
    text-align: center;
    border-top: 2px solid rgba(0, 255, 255, 0.3);
    position: relative;
    z-index: 1;
    box-shadow: 0 -10px 30px rgba(0, 255, 255, 0.1);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.copyright,
.theme-credit {
    color: #888888;
    font-size: 0.8rem;
    margin: 0.5rem 0;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.1);
}

.theme-credit a {
    color: #00ffff;
    text-decoration: none;
    text-shadow: 0 0 5px rgba(0, 255, 255, 0.5);
    transition: all 0.3s ease;
}

.theme-credit a:hover {
    color: #ff00ff;
    text-shadow: 0 0 10px rgba(255, 0, 255, 0.7);
}

/* ==========================================================================
   RAIN CONTROLS (ADMIN ONLY)
   ========================================================================== */

.rain-controls {
    margin-top: 2rem;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: 10px;
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

.rain-toggle-btn,
.rain-intensity-select {
    padding: 0.5rem 1rem;
    background: rgba(0, 255, 255, 0.1);
    border: 1px solid #00ffff;
    color: #00ffff;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    font-size: 0.8rem;
}

.rain-toggle-btn:hover,
.rain-intensity-select:hover {
    background: rgba(0, 255, 255, 0.2);
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.3);
}

/* ==========================================================================
   ACCESSIBILITY FEATURES
   ========================================================================== */

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .global-rain-container {
        display: none !important;
    }
    
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .scroll-indicator {
        animation: none;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .site-title {
        color: #ffffff;
        text-shadow: 2px 2px 4px #000000;
    }
    
    .platform-link,
    .social-link {
        border-width: 3px;
        background: rgba(255, 255, 255, 0.1);
    }
}

/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */

/* Desktop (1024px+) */
@media (min-width: 1024px) {
    .global-rain-container {
        opacity: 1;
    }
    
    .site-title {
        font-size: 4rem;
    }
    
    .hero-content {
        padding: 3rem;
    }
    
    .music-platforms {
        gap: 1.5rem;
    }
}

/* Tablet (768px-1024px) */
@media (max-width: 1024px) {
    .global-rain-container {
        opacity: 0.5;
    }
    
    .site-title {
        font-size: 3rem;
    }
    
    .hero-content {
        padding: 2rem;
    }
    
    .music-platforms {
        gap: 1rem;
    }
    
    .platform-link {
        padding: 0.6rem 1.2rem;
        font-size: 0.8rem;
    }
}

/* Smartphone (768px以下) */
@media (max-width: 768px) {
    .global-rain-container {
        display: none; /* 雨無効化 */
    }
    
    .site-title {
        font-size: 2rem;
    }
    
    .hero-section {
        background-attachment: scroll;
    }
    
    .hero-content {
        padding: 1.5rem;
    }
    
    .site-tagline {
        font-size: 1rem;
    }
    
    .site-subtitle {
        font-size: 0.9rem;
    }
    
    .music-platforms {
        flex-direction: column;
        gap: 0.8rem;
    }
    
    .platform-link {
        padding: 0.8rem 1rem;
        font-size: 0.8rem;
        width: 100%;
        max-width: 250px;
    }
    
    .social-media {
        gap: 0.8rem;
    }
    
    .social-link {
        width: 45px;
        height: 45px;
        font-size: 1rem;
    }
    
    .scroll-indicator {
        bottom: 1rem;
    }
}

/* Small Mobile (480px以下) */
@media (max-width: 480px) {
    .site-title {
        font-size: 1.8rem;
    }
    
    .hero-content {
        padding: 1rem;
    }
    
    .site-tagline {
        font-size: 0.9rem;
    }
    
    .site-subtitle {
        font-size: 0.8rem;
    }
    
    .platform-link {
        padding: 0.7rem 0.8rem;
        font-size: 0.7rem;
    }
    
    .social-link {
        width: 40px;
        height: 40px;
        font-size: 0.9rem;
    }
}

/* ==========================================================================
   PERFORMANCE OPTIMIZATIONS
   ========================================================================== */

/* GPU Acceleration */
.rain-drop,
.hero-content,
.site-title,
.platform-link,
.social-link {
    transform: translateZ(0);
    will-change: transform;
}

/* Print Styles */
@media print {
    .global-rain-container,
    .rain-controls,
    .scroll-indicator {
        display: none !important;
    }
    
    .hero-section {
        background: none !important;
        color: #000000 !important;
    }
    
    .site-title {
        color: #000000 !important;
        text-shadow: none !important;
    }
}
