@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=Outfit:wght@600;700;800;900&display=swap');

:root {
    --bg-dark: #0b0e14;
    --panel-bg: rgba(19, 24, 38, 0.92);
    --panel-border: rgba(255, 255, 255, 0.1);
    --shopee-orange: #ee4d2d;
    --shopee-red: #ff6b4a;
    --gold: #f59e0b;
    --gold-glow: rgba(245, 158, 11, 0.3);
    --green: #10b981;
    --green-glow: rgba(16, 185, 129, 0.25);
    --text-primary: #f8fafc;
    --text-muted: #94a3b8;
    --radius-lg: 16px;
    --radius-md: 10px;
    --radius-sm: 6px;
    --font-heading: 'Outfit', 'Inter', system-ui, sans-serif;
    --font-body: 'Inter', system-ui, sans-serif;
}

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

body {
    font-family: var(--font-body);
    background: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    background-image: 
        radial-gradient(circle at 15% 15%, rgba(238, 77, 45, 0.15) 0%, transparent 40%),
        radial-gradient(circle at 85% 85%, rgba(16, 185, 129, 0.12) 0%, transparent 40%);
    background-attachment: fixed;
    min-height: 100vh;
    padding-bottom: 4rem;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.25rem;
}

/* Header */
.site-header {
    background: rgba(11, 14, 20, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--panel-border);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 1rem 0;
}
.header-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 900;
    color: #ffffff;
}
.logo-icon {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, var(--shopee-orange), var(--shopee-red));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    box-shadow: 0 4px 15px rgba(238, 77, 45, 0.4);
}
.logo span {
    color: var(--shopee-orange);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    text-decoration: none;
    border: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.btn-primary {
    background: linear-gradient(135deg, var(--shopee-orange), var(--shopee-red));
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(238, 77, 45, 0.35);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(238, 77, 45, 0.5);
}
.btn-outline {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border: 1px solid var(--panel-border);
}
.btn-outline:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.25);
}
.btn-green {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}
.btn-green:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.45);
}

/* User Wallet Badge */
.user-wallet-badge {
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.4);
    padding: 0.45rem 0.9rem;
    border-radius: 20px;
    font-weight: 800;
    font-size: 0.88rem;
    color: var(--gold);
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}
.user-wallet-badge:hover {
    background: rgba(245, 158, 11, 0.25);
}

/* Hero Section */
.hero-section {
    padding: 3.5rem 0 2rem 0;
    text-align: center;
}
.hero-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(238, 77, 45, 0.12);
    border: 1px solid rgba(238, 77, 45, 0.3);
    color: var(--shopee-orange);
    padding: 0.4rem 1rem;
    border-radius: 30px;
    font-size: 0.88rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
}
.hero-title {
    font-family: var(--font-heading);
    font-size: 2.8rem;
    font-weight: 900;
    line-height: 1.2;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #ffffff 40%, #cbd5e1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.hero-title span {
    background: linear-gradient(135deg, var(--shopee-orange), var(--gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.hero-subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 680px;
    margin: 0 auto 2.5rem auto;
}

/* Converter Box */
.converter-card {
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 0 0 30px rgba(238, 77, 45, 0.12);
    max-width: 860px;
    margin: 0 auto;
}
.converter-input-wrapper {
    display: flex;
    gap: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(238, 77, 45, 0.4);
    border-radius: 14px;
    padding: 6px;
    transition: all 0.2s;
}
.converter-input-wrapper:focus-within {
    border-color: var(--shopee-orange);
    box-shadow: 0 0 20px rgba(238, 77, 45, 0.3);
}
.converter-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: #ffffff;
    font-size: 1.05rem;
    padding: 0.8rem 1rem;
    font-family: var(--font-body);
}
.converter-input::placeholder {
    color: #64748b;
}

/* Conversion Result Output Card */
.result-card {
    display: none;
    margin-top: 1.75rem;
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 16px;
    padding: 1.5rem;
    text-align: left;
    animation: fadeIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.25rem;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.12);
    padding-bottom: 1rem;
}
.result-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: #ffffff;
}
.cashback-badge {
    background: linear-gradient(135deg, var(--green), #059669);
    color: #ffffff;
    padding: 0.5rem 1rem;
    border-radius: 30px;
    font-weight: 900;
    font-size: 1rem;
    white-space: nowrap;
    box-shadow: 0 4px 15px var(--green-glow);
}

.result-grid {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 1.5rem;
    align-items: center;
}
@media (max-width: 640px) {
    .result-grid { grid-template-columns: 1fr; }
}

.qr-box {
    background: #ffffff;
    padding: 10px;
    border-radius: 12px;
    text-align: center;
}
.qr-box img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 6px;
}
.qr-hint {
    font-size: 0.78rem;
    font-weight: 700;
    color: #334155;
    margin-top: 6px;
}

.result-details {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.converted-link-input {
    width: 100%;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--panel-border);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    color: var(--gold);
    font-family: monospace;
    font-size: 0.9rem;
    outline: none;
}
.result-action-btns {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Feature Steps Grid */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
    margin: 4rem 0;
}
.step-card {
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    border-radius: 16px;
    padding: 1.75rem;
    text-align: center;
    position: relative;
}
.step-number {
    width: 42px;
    height: 42px;
    background: rgba(238, 77, 45, 0.15);
    color: var(--shopee-orange);
    border: 1px solid rgba(238, 77, 45, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 1.1rem;
    margin: 0 auto 1.25rem auto;
}
.step-card h3 {
    font-size: 1.15rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}
.step-card p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Commission Rates Table Card */
.rates-card {
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 4rem;
}
.rates-card h2 {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 800;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.table-responsive {
    overflow-x: auto;
}
table.custom-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
}
table.custom-table th, table.custom-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
table.custom-table th {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-muted);
    font-weight: 700;
    font-size: 0.82rem;
    text-transform: uppercase;
}
table.custom-table tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

/* Modal Windows */
.modal-backdrop {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
}
.modal-backdrop.active {
    display: flex;
}
.modal-card {
    background: #131822;
    border: 1px solid var(--panel-border);
    border-radius: 20px;
    max-width: 480px;
    width: 100%;
    padding: 2rem;
    position: relative;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8);
    animation: modalPop 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes modalPop {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}
.modal-close {
    position: absolute;
    top: 1.25rem; right: 1.25rem;
    background: rgba(255, 255, 255, 0.08);
    border: none;
    color: var(--text-muted);
    width: 32px; height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
    display: flex; align-items: center; justify-content: center;
}
.modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.form-group {
    margin-bottom: 1.25rem;
}
.form-group label {
    display: block;
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 6px;
}
.form-control {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--panel-border);
    border-radius: 10px;
    padding: 0.75rem 1rem;
    color: #ffffff;
    font-size: 0.95rem;
    outline: none;
    font-family: var(--font-body);
}
.form-control:focus {
    border-color: var(--shopee-orange);
}

/* Footer */
.site-footer {
    border-top: 1px solid var(--panel-border);
    padding: 2.5rem 0 1rem 0;
    margin-top: 4rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.88rem;
}
