/* CSS Variables & Reset */
:root {
    --primary-color: #7C4DFF;
    /* Deep Purple */
    --secondary-color: #00E5FF;
    /* Cyan/Blue Accent */
    --accent-color: #FFD600;
    /* Gold for coins */
    --text-color: #FFFFFF;
    --light-text: #B39DDB;
    --bg-color: #121212;
    --card-bg: #1E1E1E;
    --nav-bg: rgba(18, 18, 18, 0.95);
    --max-width: 1200px;
    --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.3);
    --shadow-hover: 0 15px 40px rgba(124, 77, 255, 0.25);
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Noto Sans KR', sans-serif;
    color: var(--text-color);
    background-color: var(--bg-color);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

h1,
h2,
h3,
h4 {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
    height: 100%;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.section-title p {
    color: var(--light-text);
    font-size: 1.1rem;
}

.text-primary {
    color: var(--secondary-color);
    text-shadow: 0 0 10px rgba(0, 229, 255, 0.5);
}

.highlight {
    color: var(--accent-color);
    position: relative;
    z-index: 1;
    text-shadow: 0 0 15px rgba(255, 214, 0, 0.4);
}

/* Header */
header {
    height: 70px;
    background: var(--nav-bg);
    backdrop-filter: blur(10px);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-text {
    font-family: 'Poppins', sans-serif;
    font-size: 1.5rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
}

nav ul {
    display: flex;
    align-items: center;
    gap: 30px;
}

nav a:not(.btn-download) {
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition);
    color: #E0E0E0;
}

nav a:not(.btn-download):hover {
    color: var(--secondary-color);
    text-shadow: 0 0 8px rgba(0, 229, 255, 0.4);
}

.btn-download {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(135deg, var(--primary-color), #651FFF);
    color: white;
    font-weight: 700;
    border-radius: 50px;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(124, 77, 255, 0.4);
}

.btn-download:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(124, 77, 255, 0.6);
    filter: brightness(1.1);
}

.btn-download.sm {
    padding: 10px 24px;
    font-size: 0.9rem;
}

.btn-download.lg {
    padding: 16px 36px;
    font-size: 1.1rem;
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    color: #000;
}

/* Hero Section */
#hero {
    padding: 160px 0 100px;
    position: relative;
    overflow: hidden;
    background: radial-gradient(circle at 50% 30%, rgba(124, 77, 255, 0.15) 0%, rgba(18, 18, 18, 0) 70%);
}

.hero-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
}

.hero-text {
    flex: 1;
    max-width: 600px;
}

.hero-text h1 {
    font-size: 3.5rem;
    line-height: 1.2;
    margin-bottom: 20px;
    color: var(--text-color);
}

.hero-text p {
    font-size: 1.2rem;
    color: var(--light-text);
    margin-bottom: 40px;
    white-space: pre-line;
    /* Handle newlines gracefully */
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
    position: relative;
    z-index: 2;
}

.floating-mockup {
    max-width: 100%;
    width: 380px;
    filter: drop-shadow(0 0 40px rgba(124, 77, 255, 0.3));
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0% {
        transform: translateY(0px) rotate(0deg);
    }

    50% {
        transform: translateY(-20px) rotate(1deg);
    }

    100% {
        transform: translateY(0px) rotate(0deg);
    }
}

.hero-bg-shape {
    position: absolute;
    top: -20%;
    right: -20%;
    width: 80%;
    height: 120%;
    background: radial-gradient(circle, rgba(0, 229, 255, 0.08) 0%, rgba(18, 18, 18, 0) 70%);
    z-index: 1;
    pointer-events: none;
}

/* Features Section */
#features {
    padding: 100px 0;
    background: #181818;
}

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

.feature-card {
    background: var(--card-bg);
    padding: 40px 30px;
    border-radius: 24px;
    text-align: center;
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
    background: #252525;
    border-color: var(--primary-color);
}

.icon-box {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 20px;
    padding: 10px;
}

.icon-box img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.feature-card h3 {
    margin-bottom: 15px;
    font-size: 1.3rem;
    color: var(--text-color);
}

.feature-card p {
    color: var(--light-text);
    font-size: 0.95rem;
    white-space: pre-line;
}

/* How It Works Section */
#how-it-works {
    padding: 100px 0;
}

.showcase-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 60px;
    /* Add background/container styling for visual pop */
    background: linear-gradient(135deg, rgba(124, 77, 255, 0.05), rgba(0, 229, 255, 0.05));
    padding: 60px;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.showcase-text {
    flex: 1;
}

.showcase-text h2 {
    font-size: 3rem;
    margin-bottom: 40px;
    line-height: 1.2;
}

.steps-list {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.steps-list li {
    display: flex;
    gap: 20px;
}

.step-num {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: #000;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
    font-size: 1.2rem;
    box-shadow: 0 4px 10px rgba(0, 229, 255, 0.3);
}

.step-info h4 {
    margin-bottom: 5px;
    font-size: 1.1rem;
    color: var(--text-color);
}

.step-info p {
    color: var(--light-text);
    font-size: 0.95rem;
}

.showcase-image {
    flex: 1;
    display: flex;
    justify-content: center;
}

.phone-frame {
    position: relative;
    width: 100%;
    max-width: 420px;
    /* Optimal Viewing Size */
    margin: 0 auto;
}

.phone-frame img {
    width: 100%;
    display: block;
    filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.5));
}

/* Video Frame Global (Desktop) */
.video-frame {
    aspect-ratio: 9 / 16;
    background: #000;
    border-radius: 30px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    border: 10px solid #333;
}

.video-frame iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Footer */
footer {
    background-color: #0d0d0d;
    color: white;
    padding: 80px 0 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 40px;
}

.footer-brand h3 {
    margin-bottom: 15px;
    color: var(--text-color);
    font-size: 1.5rem;
}

.footer-brand p {
    color: #888;
    font-size: 0.9rem;
    white-space: pre-line;
}

.footer-links h4,
.footer-contact h4 {
    margin-bottom: 20px;
    font-size: 1.1rem;
    color: var(--text-color);
}

.footer-links ul li {
    margin-bottom: 10px;
}

.footer-links ul li a {
    color: #888;
    transition: var(--transition);
}

.footer-links ul li a:hover {
    color: var(--secondary-color);
    padding-left: 5px;
}

.footer-contact p {
    color: #888;
}

.footer-bottom {
    text-align: center;
    color: #555;
    font-size: 0.85rem;
}

/* Language Switcher */
.lang-switch {
    display: flex;
    align-items: center;
    position: relative;
    font-family: 'Poppins', sans-serif;
    margin-right: 20px;
}

.lang-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.lang-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--secondary-color);
}

.lang-dropdown {
    position: absolute;
    top: 120%;
    right: 0;
    background: #252525;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    min-width: 120px;
    display: none;
    flex-direction: column;
    padding: 8px 0;
    z-index: 1001;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.lang-dropdown.show {
    display: flex;
    animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

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

.lang-dropdown li {
    padding: 10px 20px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.9rem;
    font-weight: 500;
    color: #ccc;
}

.lang-dropdown li:hover {
    background: rgba(124, 77, 255, 0.1);
    color: var(--secondary-color);
}

/* Responsive */
@media (max-width: 900px) {
    .container {
        padding: 0 20px;
    }

    /* Hide Header Download Button on Mobile/Tablet */
    nav .btn-download {
        display: none !important;
    }

    /* Adjust Nav gap since button is gone */
    nav ul {
        gap: 20px;
    }

    .hero-text h1 {
        font-size: 2.8rem;
    }

    .hero-content {
        flex-direction: column;
        text-align: center;
        padding-top: 100px;
        gap: 60px;
    }

    .hero-text {
        margin-bottom: 0;
        max-width: 100%;
    }

    .hero-image {
        width: 100%;
    }

    .floating-mockup {
        width: 340px;
        max-width: 90%;
        /* Prevent overflow */
    }

    .showcase-wrapper {
        flex-direction: column;
        padding: 40px 20px;
        gap: 50px;
    }

    .feature-grid {
        grid-template-columns: 1fr;
        max-width: 500px;
        margin: 0 auto;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 30px;
    }

    /* Responsive Video Frame - Maximize on Mobile/Tablet */
    .video-frame {
        width: 100%;
        /* Full availability width */
        max-width: 400px;
        /* Limit max width on tablets */
        height: auto;
        aspect-ratio: 9 / 16;
        /* Standard Shorts Ratio */
        border-width: 4px;
        margin: 0 auto;
        border-radius: 20px;
        background: #000;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    }

    .video-frame iframe {
        border-radius: 16px;
    }
}

/* Mobile Specific (Phone) */
@media (max-width: 480px) {
    header {
        height: 60px;
    }

    .logo-text {
        font-size: 1.2rem;
    }

    /* Hide Navigation Links & Header Button */
    nav ul {
        gap: 15px;
    }

    /* Hide all links except language switcher */
    nav a,
    nav .btn-download,
    nav ul li:not(:last-child) {
        display: none !important;
    }

    /* Ensure Language Switcher Stays Visible */
    nav ul li:last-child,
    .lang-switch {
        display: flex !important;
        margin-right: 0;
    }

    .lang-btn {
        padding: 6px 12px;
        font-size: 0.8rem;
    }

    .hero-text h1 {
        font-size: 2.2rem;
    }

    .hero-text p {
        font-size: 1rem;
    }

    .floating-mockup {
        width: 280px;
    }

    .section-title h2 {
        font-size: 2rem;
    }

    /* Responsive Video Frame - Maximize on Mobile */
    .video-frame {
        width: 100%;
        /* Full availability width */
        max-width: none;
        /* Remove restriction */
        height: auto;
        aspect-ratio: 9 / 16;
        /* Standard Shorts Ratio */
        border-width: 4px;
        /* Thinner bezel */
        margin: 0 auto;
        border-radius: 20px;
        /* Thinner radius */
        background: #000;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    }

    .video-frame iframe {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        border-radius: 16px;
        /* Match inner radius */
    }

    .showcase-text h2 {
        font-size: 2rem;
    }

    .step-num {
        width: 32px;
        height: 32px;
        font-size: 1rem;
    }

    /* Mobile Bottom CTA */
    .mobile-bottom-cta {
        display: flex;
        position: fixed;
        bottom: 20px;
        left: 50%;
        transform: translateX(-50%);
        width: 90%;
        z-index: 2000;
        animation: slideUp 0.5s ease-out;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
        border-radius: 50px;
    }

    .mobile-bottom-cta .btn-download {
        display: flex !important;
        width: 100%;
        padding: 16px;
        font-size: 1.1rem;
        justify-content: center;
        background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
        color: #000;
        font-weight: 800;
    }
}

@media (min-width: 481px) {
    .mobile-bottom-cta {
        display: none;
    }
}

@keyframes slideUp {
    from {
        transform: translate(-50%, 100%);
        opacity: 0;
    }

    to {
        transform: translate(-50%, 0);
        opacity: 1;
    }
}

/* Video Thumbnail Fallback */
.video-link {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
    cursor: pointer;
}

.video-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.video-link:hover .video-thumbnail {
    transform: scale(1.05);
}

.video-link:hover .play-button {
    transform: translate(-50%, -50%) scale(1.1);
    background: rgba(255, 61, 0, 0.9);
    /* YouTube Red */
}

.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 70px;
    height: 70px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: all 0.3s ease;
    border: 2px solid white;
    backdrop-filter: blur(5px);
}