/* =============================================
   The Black - Premium Black & Gold Theme
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700&family=Noto+Sans+KR:wght@300;400;500;700&display=swap');

:root {
    --black: #0a0a0a;
    --black-light: #111111;
    --black-card: #151515;
    --black-hover: #1a1a1a;
    --gold: #D4AF37;
    --gold-light: #E8C547;
    --gold-dark: #B8941E;
    --gold-glow: rgba(212, 175, 55, 0.15);
    --gold-border: rgba(212, 175, 55, 0.3);
    --text-white: #f0f0f0;
    --text-gray: #888888;
    --text-muted: #555555;
    --danger: #e74c3c;
    --success: #2ecc71;
    --info: #3498db;
}

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

body {
    background-color: var(--black);
    color: var(--text-white);
    font-family: 'Noto Sans KR', sans-serif;
    font-weight: 300;
    min-height: 100vh;
    line-height: 1.6;
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--black); }
::-webkit-scrollbar-thumb { background: var(--gold-dark); border-radius: 3px; }

/* ========== HEADER / NAV ========== */
.nav {
    background: linear-gradient(180deg, rgba(15,15,15,0.98) 0%, rgba(10,10,10,0.95) 100%);
    border-bottom: 1px solid var(--gold-border);
    padding: 0 2rem;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(20px);
}
.nav-brand {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gold);
    text-decoration: none;
    letter-spacing: 2px;
    text-transform: uppercase;
}
.nav-brand span { color: var(--text-white); font-weight: 400; }
.nav-menu { display: flex; align-items: center; gap: 1.5rem; }
.nav-link {
    color: var(--text-gray);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 400;
    transition: color 0.3s;
    position: relative;
}
.nav-link:hover, .nav-link.active { color: var(--gold); }
.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--gold);
}
.nav-points {
    background: linear-gradient(135deg, var(--gold-dark), var(--gold));
    color: var(--black);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
}
.nav-user { color: var(--text-gray); font-size: 0.85rem; }

/* ========== CONTAINER ========== */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}
.container-narrow {
    max-width: 480px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

/* ========== CARDS ========== */
.card {
    background: var(--black-card);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    transition: border-color 0.3s;
}
.card:hover { border-color: var(--gold-border); }
.card-gold {
    background: linear-gradient(135deg, rgba(212,175,55,0.08) 0%, rgba(212,175,55,0.02) 100%);
    border: 1px solid var(--gold-border);
}
.card-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
    color: var(--gold);
    margin-bottom: 1rem;
}
.card-subtitle {
    color: var(--text-gray);
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
}

/* ========== FORMS ========== */
.form-group { margin-bottom: 1.25rem; }
.form-label {
    display: block;
    color: var(--text-gray);
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
    font-weight: 400;
}
.form-input {
    width: 100%;
    padding: 12px 16px;
    background: var(--black-light);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    color: var(--text-white);
    font-size: 0.95rem;
    font-family: 'Noto Sans KR', sans-serif;
    transition: border-color 0.3s, box-shadow 0.3s;
    outline: none;
}
.form-input:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px var(--gold-glow);
}
.form-input::placeholder { color: var(--text-muted); }

select.form-input {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M6 8L1 3h10z' fill='%23D4AF37'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
    cursor: pointer;
}

/* ========== BUTTONS ========== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    border: none;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 500;
    font-family: 'Noto Sans KR', sans-serif;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    gap: 8px;
}
.btn-gold {
    background: linear-gradient(135deg, var(--gold-dark), var(--gold), var(--gold-light));
    color: var(--black);
    font-weight: 700;
}
.btn-gold:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.3);
}
.btn-gold:active { transform: translateY(0); }
.btn-outline {
    background: transparent;
    border: 1px solid var(--gold-border);
    color: var(--gold);
}
.btn-outline:hover {
    background: var(--gold-glow);
    border-color: var(--gold);
}
.btn-danger {
    background: var(--danger);
    color: white;
}
.btn-sm { padding: 8px 16px; font-size: 0.85rem; }
.btn-full { width: 100%; }
.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* ========== SERVICE GRID ========== */
.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}
.service-item {
    background: var(--black-card);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 14px;
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}
.service-item:hover {
    border-color: var(--gold);
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(212, 175, 55, 0.1);
}
.service-item.active {
    border-color: var(--gold);
    background: linear-gradient(135deg, rgba(212,175,55,0.1), rgba(212,175,55,0.02));
}
.service-item.active::before {
    content: '✓';
    position: absolute;
    top: 8px;
    right: 12px;
    color: var(--gold);
    font-weight: bold;
}
.service-name {
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-white);
}
.service-price {
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
    color: var(--gold);
    font-weight: 700;
}
.service-price small { font-size: 0.7rem; font-weight: 400; color: var(--text-gray); }

/* ========== ACTIVATION BOX ========== */
.activation-box {
    background: linear-gradient(135deg, rgba(212,175,55,0.06) 0%, rgba(10,10,10,1) 100%);
    border: 2px solid var(--gold);
    border-radius: 20px;
    padding: 2.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.activation-box::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(212,175,55,0.03) 0%, transparent 70%);
    animation: pulse-glow 4s ease-in-out infinite;
}
@keyframes pulse-glow {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}
.phone-number {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    color: var(--gold);
    font-weight: 700;
    letter-spacing: 3px;
    position: relative;
    margin: 1rem 0;
}
.sms-code {
    font-family: 'Playfair Display', serif;
    font-size: 3rem;
    color: var(--gold-light);
    font-weight: 700;
    letter-spacing: 6px;
    position: relative;
    animation: fadeInGold 0.5s ease-out;
}
@keyframes fadeInGold {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1); }
}
.status-label {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}
.status-waiting {
    background: rgba(212,175,55,0.15);
    color: var(--gold);
    border: 1px solid var(--gold-border);
}
.status-completed {
    background: rgba(46,204,113,0.15);
    color: var(--success);
    border: 1px solid rgba(46,204,113,0.3);
}
.status-failed {
    background: rgba(231,76,60,0.15);
    color: var(--danger);
    border: 1px solid rgba(231,76,60,0.3);
}

/* ========== LOADING BAR ========== */
.gold-loader {
    width: 200px;
    height: 3px;
    background: var(--black-hover);
    border-radius: 3px;
    margin: 1.5rem auto;
    overflow: hidden;
    position: relative;
}
.gold-loader::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
    animation: gold-slide 1.5s ease-in-out infinite;
}
@keyframes gold-slide {
    0% { left: -60%; }
    100% { left: 100%; }
}

/* ========== TIMER ========== */
.timer {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    color: var(--gold);
    margin: 0.5rem 0;
}
.timer.danger { color: var(--danger); }

/* ========== TABLES ========== */
.table-wrap { overflow-x: auto; }
table {
    width: 100%;
    border-collapse: collapse;
}
th {
    text-align: left;
    padding: 12px 16px;
    color: var(--gold);
    font-weight: 500;
    font-size: 0.85rem;
    border-bottom: 1px solid var(--gold-border);
    white-space: nowrap;
}
td {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.03);
    font-size: 0.9rem;
    color: var(--text-gray);
}
tr:hover td { background: rgba(255,255,255,0.02); }

/* ========== BADGES ========== */
.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
}
.badge-gold { background: var(--gold-glow); color: var(--gold); border: 1px solid var(--gold-border); }
.badge-success { background: rgba(46,204,113,0.15); color: var(--success); }
.badge-danger { background: rgba(231,76,60,0.15); color: var(--danger); }
.badge-waiting { background: rgba(52,152,219,0.15); color: var(--info); }

/* ========== AUTH PAGES ========== */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--black);
    position: relative;
}
.auth-wrapper::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(ellipse at 50% 0%, rgba(212,175,55,0.06) 0%, transparent 60%);
}
.auth-card {
    background: var(--black-card);
    border: 1px solid var(--gold-border);
    border-radius: 20px;
    padding: 3rem 2.5rem;
    width: 100%;
    max-width: 420px;
    position: relative;
    z-index: 1;
}
.auth-logo {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--gold);
    text-align: center;
    letter-spacing: 3px;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}
.auth-subtitle {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 2rem;
}
.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}
.auth-footer a { color: var(--gold); text-decoration: none; }
.auth-footer a:hover { text-decoration: underline; }

/* ========== CHARGE ========== */
.wallet-box {
    background: var(--black-light);
    border: 1px dashed var(--gold-border);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    margin: 1rem 0;
}
.wallet-address {
    font-family: monospace;
    font-size: 0.85rem;
    color: var(--gold);
    word-break: break-all;
    padding: 10px;
    background: var(--black);
    border-radius: 8px;
    margin-top: 0.5rem;
    cursor: pointer;
    transition: background 0.3s;
}
.wallet-address:hover { background: var(--black-hover); }

/* ========== STATS GRID ========== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}
.stat-card {
    background: var(--black-card);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 14px;
    padding: 1.5rem;
}
.stat-label { color: var(--text-muted); font-size: 0.8rem; margin-bottom: 0.5rem; }
.stat-value {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    color: var(--gold);
    font-weight: 700;
}
.stat-value small { font-size: 0.9rem; color: var(--text-gray); }

/* ========== ALERTS ========== */
.alert {
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}
.alert-danger { background: rgba(231,76,60,0.1); color: var(--danger); border: 1px solid rgba(231,76,60,0.2); }
.alert-success { background: rgba(46,204,113,0.1); color: var(--success); border: 1px solid rgba(46,204,113,0.2); }
.alert-info { background: rgba(212,175,55,0.1); color: var(--gold); border: 1px solid var(--gold-border); }

/* ========== MISC ========== */
.divider {
    border: none;
    height: 1px;
    background: rgba(255,255,255,0.05);
    margin: 1.5rem 0;
}
.text-gold { color: var(--gold); }
.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.hidden { display: none; }

/* ========== TYPING EFFECT ========== */
.typing-text {
    overflow: hidden;
    white-space: nowrap;
    border-right: 2px solid var(--gold);
    animation: typing 1.5s steps(20) forwards, blink 0.8s step-end infinite;
    display: inline-block;
}
@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}
@keyframes blink {
    50% { border-color: transparent; }
}

/* ========== COPY TOOLTIP ========== */
.copy-tooltip {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--gold);
    color: var(--black);
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.85rem;
    z-index: 9999;
    animation: slideIn 0.3s ease-out;
}
@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    .nav { padding: 0 1rem; }
    .nav-brand { font-size: 1.2rem; }
    .nav-menu { gap: 0.8rem; }
    .nav-link { font-size: 0.8rem; }
    .container { padding: 1rem; }
    .service-grid { grid-template-columns: repeat(2, 1fr); }
    .phone-number { font-size: 1.8rem; }
    .sms-code { font-size: 2rem; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .auth-card { margin: 1rem; padding: 2rem 1.5rem; }
}
@media (max-width: 480px) {
    .service-grid { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: 1fr; }
    .nav-menu .nav-link:not(.nav-points) { font-size: 0.75rem; }
}
