:root {
    --bg-main: #020617;
    --section-dark: #0f172a;
    --section-light: #ffffff;
    --primary-gradient: linear-gradient(to right, #8b5cf6, #ec4899);
    --text-primary: #111827;
    --text-secondary: #4b5563;
    --text-dark-bg: #f8fafc;
    --text-dark-secondary: #94a3b8;
    --border-color: #e2e8f0;
    --border-dark: #1e293b;
    --star-color: #fbbf24;
}

@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, Roboto, 'Helvetica Neue', 'Segoe UI', 'Apple SD Gothic Neo', 'Noto Sans KR', 'Malgun Gothic', sans-serif;
}

body {
    background-color: var(--section-light);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

nav {
    position: sticky;
    top: 0;
    width: 100%;
    padding: 1rem 0;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0,0,0,0.05);
    z-index: 1000;
}

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

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    list-style: none;
    align-items: center;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: color 0.3s;
}

.nav-links a:hover { color: #8b5cf6; }

.auth-btn {
    background: var(--primary-gradient);
    color: white !important;
    padding: 0.6rem 1.4rem;
    border-radius: 99px;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.hero {
    padding: 180px 0 120px;
    text-align: center;
    background: radial-gradient(circle at top right, rgba(139, 92, 246, 0.05), transparent),
                radial-gradient(circle at bottom left, rgba(236, 72, 153, 0.05), transparent);
}

.hero-badge {
    display: inline-block;
    padding: 0.6rem 1.4rem;
    background: rgba(139, 92, 246, 0.08);
    color: #8b5cf6;
    border-radius: 99px;
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 2.5rem;
    border: 1px solid rgba(139, 92, 246, 0.15);
    letter-spacing: -0.02em;
}

.hero h1 {
    font-size: clamp(3rem, 8vw, 4.8rem);
    font-weight: 900;
    margin-bottom: 2rem;
    letter-spacing: -0.04em;
    line-height: 1.15;
    color: #0f172a;
}

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

.hero-subtitle {
    color: #64748b;
    font-size: 1.35rem;
    max-width: 750px;
    margin: 0 auto 3.5rem;
    font-weight: 500;
    line-height: 1.7;
}

.hero-btns { display: flex; gap: 1.5rem; justify-content: center; margin-bottom: 6rem; }

.cta-btn {
    display: inline-block;
    background: var(--primary-gradient);
    color: white;
    padding: 1.2rem 3.5rem;
    border-radius: 18px;
    text-decoration: none;
    font-weight: 800;
    font-size: 1.2rem;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 15px 35px rgba(139, 92, 246, 0.25);
}

.cta-btn:hover { transform: translateY(-8px) scale(1.02); box-shadow: 0 20px 45px rgba(139, 92, 246, 0.35); }
.charge-btn { background: #0f172a; box-shadow: 0 12px 30px rgba(15, 23, 42, 0.3); }
.charge-btn:hover { box-shadow: 0 18px 36px rgba(15, 23, 42, 0.38); }

.feature-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 2rem;
    max-width: 1100px;
    margin: 0 auto 4rem;
}

.f-card {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    background: white;
    padding: 2.2rem;
    border-radius: 28px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.03);
    text-align: left;
    border: 1px solid rgba(0,0,0,0.03);
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    animation: floating-card 4s ease-in-out infinite alternate;
}
.f-card:nth-child(2) { animation-delay: 0.5s; }
.f-card:nth-child(3) { animation-delay: 1.2s; }
.f-card:nth-child(4) { animation-delay: 1.8s; }
@keyframes floating-card { from { transform: translateY(0); } to { transform: translateY(-12px); } }
.f-card:hover { transform: translateY(-15px) !important; background: #f8fafc; border-color: rgba(139, 92, 246, 0.2); box-shadow: 0 20px 50px rgba(0, 0, 0, 0.08); }

.f-icon { width: 65px; height: 65px; border-radius: 20px; display: flex; align-items: center; justify-content: center; font-size: 2rem; flex-shrink: 0; }
.f-icon.purple { background: rgba(139, 92, 246, 0.1); color: #8b5cf6; }
.f-icon.pink { background: rgba(236, 72, 153, 0.1); color: #ec4899; }
.f-info b { display: block; font-size: 1rem; color: var(--text-primary); }
.f-info span { font-size: 0.8rem; color: var(--text-secondary); }

.scroll-down-hint { font-size: 1.5rem; color: var(--text-secondary); animation: bounce 2s infinite; margin-top: 2rem; }
@keyframes bounce { 0%,20%,50%,80%,100%{transform:translateY(0);}40%{transform:translateY(-10px);}60%{transform:translateY(-5px);} }

.dark-section { background-color: var(--bg-main); color: var(--text-dark-bg); padding: 100px 0; }
.section-title { text-align: center; font-size: 2.2rem; font-weight: 800; margin-bottom: 3.5rem; background: var(--primary-gradient); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.dark-section .section-title { background: white; -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.dark-section .container { max-width: 1000px; }

.admin-header { margin: 40px 0 20px; text-align: center; }
.admin-tabs { display: flex; justify-content: center; gap: 10px; margin-bottom: 30px; flex-wrap: wrap; }
.tab-btn { padding: 0.7rem 1.5rem; border-radius: 12px; border: 1px solid var(--border-color); background: white; font-weight: 600; cursor: pointer; transition: all 0.3s; }
.tab-btn.active { background: var(--primary-gradient); color: white; border-color: transparent; box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3); }
.tab-content { display: none; }
.tab-content.active { display: block; animation: fadeInUp 0.5s ease-out; }

.admin-card {
    background: white;
    padding: 2rem;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    margin-bottom: 2rem;
}

.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1.5rem; margin-bottom: 2rem; }
.stat-value { font-size: 2rem; font-weight: 900; background: var(--primary-gradient); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }

.admin-form input, .admin-form select, .admin-form textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}
.admin-form button {
    width: 100%;
    padding: 1rem;
    background: var(--primary-gradient);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
}

table { width: 100%; border-collapse: collapse; margin-top: 1rem; }
th { text-align: left; padding: 1rem; border-bottom: 2px solid var(--border-color); color: var(--text-secondary); font-size: 0.9rem; }
td { padding: 1rem; border-bottom: 1px solid var(--border-color); }

.reviews-carousel { padding: 2.5rem 0; width: 100%; overflow: hidden; position: relative; }
.reviews-track { display: flex; gap: 2rem; width: max-content; animation: scroll-reviews 80s linear infinite; padding: 0.5rem 0; }
.reviews-track:hover { animation-play-state: paused; }
@keyframes scroll-reviews { 0% { transform: translateX(0); } 100% { transform: translateX(calc(-50% - 1rem)); } }

.review-card {
    width: 360px;
    flex-shrink: 0;
    background: #f1f5f9;
    border: 1px solid rgba(0, 0, 0, 0.03);
    padding: 2.2rem;
    border-radius: 24px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.review-card:hover { background: white; transform: translateY(-8px); border-color: #8b5cf6; box-shadow: 0 15px 35px rgba(139, 92, 246, 0.12); }
.stars { color: #fbbf24; margin-bottom: 1rem; font-size: 0.95rem; letter-spacing: 1px; }
.review-content { display: block; color: var(--text-primary); font-size: 1.05rem; line-height: 1.6; margin-bottom: 2rem; font-weight: 500; word-break: keep-all; }
.review-footer { display: flex; justify-content: space-between; align-items: flex-end; border-top: 1px solid rgba(0, 0, 0, 0.03); padding-top: 1rem; }
.reviewer-info b { display: block; color: var(--text-primary); font-size: 1rem; margin-bottom: 0.2rem; }
.reviewer-info span { color: var(--text-secondary); font-size: 0.8rem; font-weight: 400; }
.review-date { color: var(--text-secondary); font-size: 0.75rem; opacity: 0.8; }

.category-nav { display: flex; justify-content: center; gap: 10px; margin-bottom: 3rem; }
.cat-filter-btn { padding: 0.7rem 1.5rem; border-radius: 99px; border: 1px solid var(--border-color); background: white; font-weight: 600; cursor: pointer; transition: all 0.3s; }
.cat-filter-btn.active { background: var(--primary-gradient); color: white; border-color: transparent; }

.product-grid { padding: 0 0 80px; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 2rem; }
.product-card { background: white; border: 1px solid var(--border-color); border-radius: 20px; padding: 1.5rem; transition: all 0.3s; display: flex; flex-direction: column; }
.product-card:hover { border-color: #8b5cf6; box-shadow: 0 15px 40px rgba(139, 92, 246, 0.1); }
.product-card h3 { font-size: 1.3rem; margin-bottom: 0.5rem; }
.product-card .price { font-size: 1.5rem; font-weight: 800; color: #ec4899; }

.buy-btn {
    margin-top: auto;
    width: 100%;
    padding: 0.9rem;
    background: var(--primary-gradient);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.3s;
}
.buy-btn:hover { opacity: 0.9; }

.usage-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 2rem; padding: 0 0 80px; }
.usage-card { text-align: center; padding: 3rem 2rem; background: white; border-radius: 32px; border: 1px solid var(--border-color); transition: all 0.3s ease; box-shadow: 0 4px 20px rgba(0,0,0,0.02); }
.usage-card:hover { transform: translateY(-10px); box-shadow: 0 20px 40px rgba(139, 92, 246, 0.08); border-color: #8b5cf6; }
.usage-card .icon { font-size: 3.8rem; font-weight: 900; margin-bottom: 2rem; display: inline-block; background: var(--primary-gradient); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; font-style: italic; line-height: 1; padding: 0.2rem 0.5rem; }
.usage-card h3 { font-size: 1.5rem; font-weight: 800; margin-bottom: 1rem; color: var(--text-primary); }
.usage-card p { color: var(--text-secondary); font-size: 1.05rem; line-height: 1.7; word-break: keep-all; font-weight: 500; }

.accordion { max-width: 800px; margin: 0 auto; }
.accordion-item { background: #1e293b; border-radius: 12px; margin-bottom: 1rem; overflow: hidden; }
.accordion-header { padding: 1.2rem 1.5rem; cursor: pointer; display: flex; justify-content: space-between; align-items: center; font-weight: 600; }
.accordion-content { max-height: 0; padding: 0 1.5rem; color: var(--text-dark-secondary); transition: all 0.3s ease; overflow: hidden; }
.accordion-item.active .accordion-content { max-height: 200px; padding: 0 1.5rem 1.5rem; }

.user-profile { display: flex; align-items: center; gap: 8px; cursor: pointer; position: relative; }
.user-profile img { border-radius: 50%; width: 30px; }
.user-balance {
    font-size: 0.78rem;
    color: #0f172a;
    background: #f1f5f9;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    padding: 0.12rem 0.5rem;
    font-weight: 700;
}
.dropdown-menu { display: none; position: absolute; top: 45px; right: 0; background: white; border: 1px solid var(--border-color); border-radius: 12px; width: 180px; box-shadow: 0 10px 25px rgba(0,0,0,0.1); z-index: 1100; padding: 0.5rem; }
.dropdown-menu.show { display: block; }
.dropdown-menu a { display: block; padding: 0.7rem 1rem; color: var(--text-primary); text-decoration: none; border-radius: 8px; font-size: 0.9rem; }
.dropdown-menu a:hover { background: #f1f5f9; }

.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0; top: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    align-items: center;
    justify-content: center;
}
.modal.show { display: flex; }
.modal-content { background: white; padding: 2.5rem; border-radius: 24px; width: 90%; max-width: 500px; }
.close-modal { float: right; cursor: pointer; font-size: 1.4rem; color: #64748b; }
.close-modal:hover { color: #111827; }

.charge-modal-content { max-width: 560px; }
.charge-bank-box {
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 0.9rem 1rem;
    background: #f8fafc;
}
.charge-bank-box > div {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    font-size: 0.92rem;
    padding: 0.24rem 0;
}
.charge-bank-box b { color: #334155; }
.charge-bank-box span { color: #0f172a; font-weight: 600; }
.charge-input {
    width: 100%;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 0.8rem 0.9rem;
    font-size: 0.95rem;
}

@keyframes fadeInUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
.reveal { opacity: 0; transition: all 0.8s ease-out; }
.reveal.active { opacity: 1; animation: fadeInUp 0.8s ease-out forwards; }
.fade-in { animation: fadeInUp 0.8s ease-out forwards; }
section { position: relative; z-index: 1; }

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.98);
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    backdrop-filter: blur(5px);
}
.loading-overlay p { color: var(--text-primary); font-weight: 600; font-size: 1.1rem; }
.loader { width: 48px; height: 48px; border: 4px solid #f1f5f9; border-top: 4px solid #8b5cf6; border-radius: 50%; animation: spin-loader 0.8s linear infinite; margin-bottom: 1.5rem; }
@keyframes spin-loader { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

.back-home-btn {
    display: inline-block;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    position: absolute;
    top: -50px;
    left: 0;
    padding: 0.8rem 1.2rem;
    border-radius: 12px;
    background: #f8fafc;
    transition: all 0.3s ease;
    border: 1px solid rgba(0,0,0,0.05);
}
.back-home-btn:hover { color: #8b5cf6; background: white; box-shadow: 0 4px 12px rgba(0,0,0,0.05); transform: translateX(-5px); }

.admin-product-table .admin-inline-product-form {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}
.admin-product-table .admin-inline-product-form select,
.admin-product-table .admin-inline-product-form input[type="text"],
.admin-product-table .admin-inline-product-form input[type="number"] {
    width: auto;
    margin-bottom: 0;
    padding: 0.45rem 0.65rem;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    font-size: 0.9rem;
}
.admin-btn-save {
    padding: 0.45rem 1rem;
    border: none;
    border-radius: 10px;
    background: var(--primary-gradient);
    color: white;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
}
.admin-btn-remove {
    padding: 0.45rem 0.85rem;
    border: none;
    border-radius: 10px;
    background: #ef4444;
    color: white;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
}
.admin-btn-remove:hover { opacity: 0.92; }
