/* ============================================
   R.O.C. Taiwan - Modern Apple-Style Design
   ============================================ */

:root {
    /* Modern Color Palette */
    --bg-primary: #000000;
    --bg-secondary: #0a0a0a;
    --bg-tertiary: #111111;
    --bg-card: #1a1a1a;
    --bg-card-hover: #222222;
    
    --text-primary: #f5f5f7;
    --text-secondary: #86868b;
    --text-tertiary: #6e6e73;
    
    --accent-blue: #2997ff;
    --accent-purple: #bf5af2;
    --accent-pink: #ff375f;
    --accent-orange: #ff9f0a;
    --accent-green: #30d158;
    
    --gradient-1: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-2: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-3: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --gradient-text: linear-gradient(90deg, #2997ff, #bf5af2, #ff375f);
    
    --border-color: rgba(255, 255, 255, 0.08);
    --border-light: rgba(255, 255, 255, 0.12);
    
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 30px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.5);
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ============================================
   Typography
   ============================================ */

.gradient {
    background: var(--gradient-text);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ============================================
   Navigation
   ============================================ */

.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 0 48px;
    height: 72px;
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
}

.nav-inner {
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1.1rem;
}

.nav-flag {
    width: 24px;
    height: auto;
    border-radius: 3px;
    box-shadow: var(--shadow-sm);
}

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

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--text-primary);
}

.nav-cta {
    background: var(--accent-blue);
    color: white !important;
    padding: 10px 20px;
    border-radius: 50px;
    font-weight: 500;
}

.nav-cta:hover {
    background: #1a8aef;
    transform: scale(1.02);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.nav-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    transition: var(--transition);
}

/* ============================================
   Hero Section
   ============================================ */

.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 140px 48px 80px;
    max-width: 1000px;
    margin: 0 auto;
}

.hero-content {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeUp 0.8s ease forwards 0.2s;
}

@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 32px;
}

.badge-dot {
    width: 8px;
    height: 8px;
    background: var(--accent-green);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

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

.un-members {
    background: linear-gradient(90deg, #2997ff, #bf5af2);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 700;
    animation: glow 2s ease-in-out infinite;
}

@keyframes glow {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.3); }
}

.hero-title {
    font-size: clamp(3rem, 6vw, 5rem);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin-bottom: 24px;
}

.title-line {
    display: block;
}

.hero-desc {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 40px;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 60px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 28px;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--accent-blue);
    color: white;
}

.btn-primary:hover {
    background: #1a8aef;
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(41, 151, 255, 0.3);
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border-light);
}

.btn-secondary:hover {
    background: var(--bg-card-hover);
    border-color: var(--text-tertiary);
}

.btn-discord {
    background: #5865F2;
    color: white;
}

.btn-discord:hover {
    background: #4752c4;
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(88, 101, 242, 0.3);
}

.btn-large {
    padding: 20px 40px;
    font-size: 1.1rem;
}

.hero-stats {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 32px;
}

.stat-item {
    text-align: center;
}

.stat-value {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-tertiary);
}

.stat-divider {
    width: 1px;
    height: 50px;
    background: var(--border-color);
}

.hero-visual {
    position: relative;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeUp 0.8s ease forwards 0.4s;
}

.hero-card {
    position: relative;
    aspect-ratio: 4/3;
    background: var(--bg-tertiary);
    border-radius: var(--radius-xl);
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
}

.hero-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-card.fallback {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f0f23 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-card.fallback::before {
    content: '';
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(circle at 30% 40%, rgba(41, 151, 255, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 70% 60%, rgba(191, 90, 242, 0.1) 0%, transparent 50%);
}

.hero-card.fallback::after {
    content: '🏙️ Taipei Skyline';
    color: var(--text-tertiary);
    font-size: 1rem;
    z-index: 1;
}

.card-overlay {
    position: absolute;
    bottom: 24px;
    right: 24px;
}

.floating-flag {
    width: 48px;
    height: auto;
    border-radius: 6px;
    box-shadow: var(--shadow-md);
    animation: float 4s ease-in-out infinite;
}

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

/* ============================================
   Partners Section
   ============================================ */

.partners {
    padding: 60px 48px;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-secondary);
}

.partners-inner {
    max-width: 1000px;
    margin: 0 auto;
    text-align: center;
}

.partners-label {
    font-size: 0.9rem;
    color: var(--text-tertiary);
    margin-bottom: 24px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.partners-logos {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 48px;
}

.partner-item {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-secondary);
    font-weight: 500;
}

.un-badge {
    width: 36px;
    height: 36px;
    background: var(--bg-card);
    border: 2px solid var(--accent-blue);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--accent-blue);
    font-size: 0.75rem;
}

.partner-flag {
    width: 32px;
    height: auto;
    border-radius: 4px;
}

.partner-divider {
    width: 1px;
    height: 40px;
    background: var(--border-color);
}

/* ============================================
   Section Styles
   ============================================ */

.section-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 80px;
}

.section-tag {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent-blue);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 16px;
}

.section-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin-bottom: 20px;
}

.section-desc {
    font-size: 1.2rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ============================================
   About Section
   ============================================ */

.about {
    padding: 140px 48px;
    max-width: 1400px;
    margin: 0 auto;
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.about-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 40px;
    transition: var(--transition);
}

.about-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-light);
    transform: translateY(-4px);
}

.card-icon {
    width: 56px;
    height: 56px;
    background: var(--gradient-1);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
}

.card-icon svg {
    width: 28px;
    height: 28px;
    color: white;
}

.about-card h3 {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.about-card p {
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ============================================
   Features Section
   ============================================ */

.features {
    padding: 80px 48px;
}

.feature-block {
    max-width: 1400px;
    margin: 0 auto 120px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.feature-block.reverse {
    direction: rtl;
}

.feature-block.reverse > * {
    direction: ltr;
}

.feature-tag {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent-purple);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 12px;
}

.feature-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 20px;
}

.feature-desc {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 32px;
}

.feature-list {
    list-style: none;
}

.feature-list li {
    position: relative;
    padding-left: 24px;
    margin-bottom: 12px;
    color: var(--text-secondary);
}

.feature-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    width: 8px;
    height: 8px;
    background: var(--accent-blue);
    border-radius: 50%;
}

.visual-wrapper {
    position: relative;
    aspect-ratio: 16/10;
    background: var(--bg-tertiary);
    border-radius: var(--radius-xl);
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.visual-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.visual-badge {
    position: absolute;
    bottom: 20px;
    left: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    padding: 12px 20px;
    border-radius: 50px;
}

.visual-badge img {
    width: 18px;
    height: auto;
    border-radius: 3px;
}

.visual-badge span {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-primary);
}

/* ============================================
   Gallery Section
   ============================================ */

.gallery {
    padding: 140px 48px;
    max-width: 1400px;
    margin: 0 auto;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, 220px);
    gap: 16px;
}

.gallery-item {
    position: relative;
    background: var(--bg-tertiary);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: var(--transition);
}

.gallery-item:hover {
    transform: scale(1.02);
    border-color: var(--border-light);
}

.gallery-item.large {
    grid-row: span 2;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-item.fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f0f23 100%);
}

.gallery-item.fallback::before {
    content: '';
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(circle at 50% 50%, rgba(41, 151, 255, 0.1) 0%, transparent 60%);
}

.gallery-item.fallback .gallery-caption {
    opacity: 1;
    transform: translateY(0);
}

.gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 24px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.9));
    opacity: 0;
    transform: translateY(10px);
    transition: var(--transition);
}

.gallery-item:hover .gallery-caption {
    opacity: 1;
    transform: translateY(0);
}

.gallery-caption h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.gallery-caption p {
    font-size: 0.85rem;
    color: var(--text-tertiary);
}

/* ============================================
   Community Section
   ============================================ */

.community {
    padding: 160px 48px;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
}

.community-inner {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.community-flag {
    width: 72px;
    height: auto;
    margin: 0 auto 32px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    animation: float 4s ease-in-out infinite;
}

.community-flag img {
    width: 100%;
    display: block;
}

.community-tag {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent-blue);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 16px;
}

.community-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    line-height: 1.15;
    margin-bottom: 20px;
}

.community-desc {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 48px;
    line-height: 1.7;
}

.community-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 60px;
}

.community-metrics {
    display: flex;
    justify-content: center;
    gap: 32px;
    flex-wrap: wrap;
}

.metric {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 20px 28px;
    border-radius: var(--radius-lg);
    transition: var(--transition);
}

.metric:hover {
    border-color: var(--border-light);
    transform: translateY(-2px);
}

.metric-icon {
    font-size: 1.8rem;
}

.metric-text {
    text-align: left;
}

.metric-text strong {
    display: block;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.metric-text span {
    font-size: 0.85rem;
    color: var(--text-tertiary);
}

/* ============================================
   Footer
   ============================================ */

.footer {
    padding: 60px 48px;
    border-top: 1px solid var(--border-color);
}

.footer-inner {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 32px;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 16px;
}

.footer-flag {
    width: 28px;
    height: auto;
    border-radius: 4px;
}

.footer-info {
    text-align: left;
}

.footer-name {
    display: block;
    font-weight: 600;
    color: var(--text-primary);
}

.footer-sub {
    font-size: 0.85rem;
    color: var(--text-tertiary);
}

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

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--accent-blue);
}

.footer-bottom {
    text-align: center;
}

.footer-bottom p {
    font-size: 0.85rem;
    color: var(--text-tertiary);
}

/* ============================================
   Responsive Design
   ============================================ */

@media (max-width: 1200px) {
    .hero {
        padding: 120px 24px 60px;
    }
}

@media (max-width: 1024px) {
    .about-grid {
        grid-template-columns: 1fr;
        max-width: 500px;
        margin: 0 auto;
    }
    
    .feature-block {
        grid-template-columns: 1fr;
        gap: 48px;
    }
    
    .feature-block.reverse {
        direction: ltr;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto;
    }
    
    .gallery-item.large {
        grid-column: span 2;
        grid-row: auto;
        height: 300px;
    }
    
    .gallery-item {
        height: 200px;
    }
}

@media (max-width: 768px) {
    .nav {
        padding: 0 24px;
    }
    
    .nav-links {
        display: none;
        position: fixed;
        top: 72px;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.98);
        flex-direction: column;
        justify-content: center;
        gap: 32px;
        padding: 32px;
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .nav-links a {
        font-size: 1.5rem;
        color: var(--text-primary);
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .hero {
        padding: 120px 24px 60px;
    }
    
    .hero-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
        max-width: 300px;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 24px;
    }
    
    .stat-divider {
        width: 50px;
        height: 1px;
    }
    
    .partners {
        padding: 40px 24px;
    }
    
    .partners-logos {
        flex-direction: column;
        gap: 24px;
    }
    
    .partner-divider {
        width: 50px;
        height: 1px;
    }
    
    .about,
    .features,
    .gallery,
    .community {
        padding: 80px 24px;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    
    .gallery-item.large {
        grid-column: auto;
    }
    
    .community-metrics {
        flex-direction: column;
        align-items: center;
    }
    
    .metric {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }
    
    .footer {
        padding: 40px 24px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .feature-title {
        font-size: 1.75rem;
    }
    
    .community-title {
        font-size: 2rem;
    }
}

/* ============================================
   Animations
   ============================================ */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-in {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-in.visible {
    opacity: 1;
    transform: translateY(0);
}
