:root {
    --primary-color: #d4af37; /* Gold */
    --primary-dim: rgba(212, 175, 55, 0.15);
    --primary-glow: rgba(212, 175, 55, 0.4);
    --bg-dark: #121212;
    --card-bg: #1e1e1e;
    --input-bg: #2a2a2a;
    --border-color: #3a3a3a;
    --text-light: #e0e0e0;
    --text-dim: #a0a0a0;
    --accent-blue: #3498db;
    --danger: #e74c3c;
    --success: #2ecc71;
    --shadow: 0 10px 30px rgba(0,0,0,0.5);
    --transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
}

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

body {
    font-family: 'Noto Sans JP', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-light);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

.background-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, transparent 0%, rgba(0,0,0,0.7) 100%),
                url('https://www.transparenttextures.com/patterns/carbon-fibre.png');
    z-index: -1;
}

.container {
    max-width: 860px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== HERO ===== */
.hero {
    position: relative;
    min-height: 480px;
    padding: 100px 20px 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: url('../images/hero_bg.png') center/cover no-repeat;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(0,0,0,0.6) 0%,
        rgba(0,0,0,0.55) 60%,
        rgba(18,18,18,1) 100%
    );
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 10;
    max-width: 700px;
    margin: 0 auto;
}

.hero-eyebrow {
    font-family: 'Outfit', sans-serif;
    font-size: 0.9rem;
    color: var(--primary-color);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 16px;
    opacity: 0.9;
}

.hero h1 {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(2rem, 6vw, 3.5rem);
    color: white;
    line-height: 1.3;
    margin-bottom: 20px;
    text-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

.hero-sub {
    font-size: 1.1rem;
    color: rgba(255,255,255,0.85);
    margin-bottom: 30px;
    line-height: 1.9;
}

.hero-badges {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 36px;
}

.hero-badges span {
    background: rgba(212,175,55,0.15);
    border: 1px solid rgba(212,175,55,0.5);
    color: var(--primary-color);
    padding: 6px 18px;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: bold;
    backdrop-filter: blur(4px);
}

.btn-hero {
    display: inline-block;
    background: var(--primary-color);
    color: #000;
    font-weight: bold;
    font-size: 1.15rem;
    padding: 18px 52px;
    border-radius: 50px;
    text-decoration: none;
    box-shadow: 0 8px 28px rgba(212,175,55,0.5);
    transition: var(--transition);
    font-family: 'Outfit', sans-serif;
}

.btn-hero:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 36px rgba(212,175,55,0.65);
}

/* ===== TRUST SECTION ===== */
.trust-section {
    padding: 40px 20px;
    text-align: center;
}

.trust-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 16px;
    max-width: 700px;
    margin: 0 auto;
}

.trust-item {
    background: var(--primary-dim);
    border: 1px solid rgba(212,175,55,0.25);
    border-radius: 14px;
    padding: 22px 10px;
    transition: var(--transition);
}

.trust-item:hover {
    border-color: var(--primary-color);
    transform: translateY(-3px);
}

.trust-num {
    font-size: 1.9rem;
    font-weight: bold;
    color: var(--primary-color);
    font-family: 'Outfit', sans-serif;
    line-height: 1;
}

.trust-unit {
    font-size: 1.2rem;
}

.trust-label {
    font-size: 0.78rem;
    color: var(--text-dim);
    margin-top: 8px;
}

/* ===== HOW IT WORKS ===== */
.how-it-works {
    margin: 0 auto 30px;
}

.hiw-title {
    color: var(--primary-color);
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 20px;
    text-align: center;
}

.hiw-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
}

.hiw-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-align: center;
    flex: 1;
    min-width: 160px;
}

.hiw-num {
    width: 36px;
    height: 36px;
    background: var(--primary-color);
    color: #000;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.9rem;
}

.hiw-text {
    font-size: 0.85rem;
    color: var(--text-dim);
    line-height: 1.5;
}

.hiw-arrow {
    color: var(--primary-color);
    font-size: 1.5rem;
    opacity: 0.6;
}

/* ===== PROGRESS BAR ===== */
.progress-bar {
    width: 100%;
    height: 6px;
    background: #333;
    border-radius: 4px;
    margin-bottom: 36px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(to right, var(--primary-color), #f0d060);
    width: 33.33%;
    transition: width 0.5s ease;
    border-radius: 4px;
}

/* ===== CARD ===== */
.card {
    background: var(--card-bg);
    border-radius: 14px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(255,255,255,0.05);
}

/* ===== STEP CARD ===== */
.step-card {
    display: none;
    animation: fadeInUp 0.4s ease;
}

.step-card.active {
    display: block;
}

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

.step-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(212,175,55,0.15);
}

.step-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--primary-color);
}

.step-desc {
    font-size: 0.9rem;
    color: var(--text-dim);
    margin-bottom: 22px;
    margin-top: 12px;
}

/* ===== MODE CARDS (STEP 1) ===== */
.mode-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 14px;
    margin-bottom: 10px;
}

.mode-card {
    background: #252525;
    border: 2px solid var(--border-color);
    border-radius: 14px;
    padding: 22px 16px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    user-select: none;
}

.mode-card input[type="radio"] {
    display: none;
}

.mode-card:has(input:checked) {
    border-color: var(--primary-color);
    background: var(--primary-dim);
}

.mode-card:hover {
    border-color: rgba(212,175,55,0.5);
    transform: translateY(-3px);
}

.mode-icon {
    font-size: 2rem;
}

.mode-label {
    font-weight: bold;
    color: var(--text-light);
    font-size: 0.95rem;
}

.mode-desc {
    font-size: 0.75rem;
    color: var(--text-dim);
}

/* ===== FORM ===== */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
    font-weight: bold;
    color: var(--primary-color);
    font-size: 0.9rem;
}

.required-badge {
    background: #e74c3c;
    color: white;
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: bold;
}

input[type="number"],
input[type="text"],
select {
    width: 100%;
    padding: 13px 16px;
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-light);
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s, box-shadow 0.3s;
}

input:focus, select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(212,175,55,0.15);
}

select option {
    background: var(--card-bg);
}

/* ===== DYNAMIC INPUT SECTION ===== */
.dynamic-input-section {
    background: #1a1a1a;
    padding: 10px 0;
    border-radius: 12px;
}

.dynamic-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 4px;
}

.dynamic-label {
    font-weight: bold;
    color: var(--primary-color);
    font-size: 0.95rem;
}

.dynamic-sub {
    font-size: 0.75rem;
    color: var(--text-dim);
    margin-bottom: 12px;
}

.input-rows-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 12px;
}

.input-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.input-row input {
    flex: 1;
    background: #111 !important;
    border: 1px solid #333 !important;
}

.btn-remove-row {
    background: #333;
    color: #888;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.btn-remove-row:hover {
    background: #444;
    color: #fff;
}

.btn-add-row {
    width: 100%;
    padding: 12px;
    background: transparent;
    border: 1px dashed var(--accent-blue);
    color: var(--accent-blue);
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: var(--transition);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn-add-row:hover {
    background: rgba(52, 152, 219, 0.05);
    border-color: #5dade2;
}

/* ===== NAV BUTTONS ===== */
.nav-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 36px;
    gap: 14px;
}

.btn-back {
    background: #2a2a2a;
    color: var(--text-dim);
    border: 1px solid var(--border-color);
    padding: 13px 26px;
    border-radius: 10px;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.95rem;
}

.btn-back:hover {
    background: #333;
    color: var(--text-light);
}

.btn-next {
    flex: 1;
    background: var(--primary-color);
    color: #000;
    border: none;
    padding: 14px 28px;
    border-radius: 10px;
    font-weight: bold;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 16px var(--primary-glow);
}

.btn-next:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px var(--primary-glow);
}

.btn-submit-final {
    font-size: 1.05rem;
}

/* ===== LOADING ===== */
.loading-card {
    text-align: center;
}

.loader-container {
    padding: 40px 0;
}

.loader {
    width: 52px;
    height: 52px;
    border: 5px solid #333;
    border-top: 5px solid var(--primary-color);
    border-radius: 50%;
    display: inline-block;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.typing-text {
    font-family: 'Courier New', Courier, monospace;
    color: var(--text-dim);
    margin-top: 10px;
    font-size: 0.9rem;
}

/* ===== RESULT ===== */
.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid var(--primary-color);
    margin-bottom: 20px;
    padding-bottom: 10px;
}

.result-header h2 {
    color: var(--primary-color);
    font-family: 'Outfit', sans-serif;
}

.result-timestamp {
    font-size: 0.8rem;
    color: var(--text-dim);
}

.result-content {
    white-space: pre-wrap;
    font-size: 1.05rem;
    margin-bottom: 30px;
    background: rgba(0,0,0,0.2);
    padding: 22px;
    border-radius: 10px;
    line-height: 1.8;
}

/* ===== AFFILIATE ===== */
.affiliate-section h3,
.dynamic-ad-title {
    margin-bottom: 20px;
    color: var(--primary-color);
    font-size: 1.1rem;
    font-weight: bold;
}

.dynamic-ad-title {
    text-align: center;
    margin-top: 30px;
    border-top: 1px dashed rgba(212, 175, 55, 0.2);
    padding-top: 24px;
}

.affiliate-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 14px;
}

.affiliate-card {
    display: flex;
    align-items: center;
    gap: 14px;
    background: #2a2a2a;
    padding: 16px;
    border-radius: 12px;
    text-decoration: none;
    color: var(--text-light);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.affiliate-card:hover {
    transform: scale(1.02);
    border-color: rgba(212,175,55,0.4);
    background: #303030;
}

.affiliate-card .icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.affiliate-card strong {
    display: block;
    color: var(--primary-color);
    font-size: 0.9rem;
}

.affiliate-card p {
    font-size: 0.8rem;
    color: var(--text-dim);
    margin-top: 2px;
}

/* ===== Dynamic Ads ===== */
.ad-item {
    background: rgba(255, 255, 255, 0.03);
    padding: 15px;
    border-radius: 12px;
    border: 1px solid rgba(212, 175, 55, 0.2);
    text-align: center;
    min-width: 260px;
    max-width: 340px;
    flex: 1 1 280px;
    transition: var(--transition);
}

.ad-item:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
}

.ad-label {
    font-size: 0.85rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 12px;
    letter-spacing: 0.5px;
    border-bottom: 1px solid rgba(212, 175, 55, 0.3);
    padding-bottom: 6px;
}

.ad-item img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

/* ===== RESULT ACTIONS ===== */
.result-actions {
    text-align: center;
    margin-top: 30px;
}

.btn-secondary {
    background: #2a2a2a;
    color: var(--text-light);
    border: 1px solid var(--border-color);
    padding: 13px 32px;
    border-radius: 24px;
    cursor: pointer;
    font-size: 0.95rem;
    transition: var(--transition);
}

.btn-secondary:hover {
    background: #333;
    border-color: rgba(212,175,55,0.4);
}

/* ===== FOOTER ===== */
.site-footer {
    color: var(--text-dim);
    font-size: 0.85rem;
}

.site-footer a {
    color: var(--text-dim);
    text-decoration: none;
}

.site-footer a:hover {
    color: var(--primary-color);
}

.hidden {
    display: none;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 600px) {
    .container {
        padding: 0 14px;
    }

    .hero {
        min-height: 380px;
        padding: 80px 16px 60px;
    }

    .card {
        padding: 20px;
        margin-bottom: 20px;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .mode-grid {
        grid-template-columns: 1fr;
    }

    .hiw-steps {
        flex-direction: column;
    }

    .hiw-arrow {
        transform: rotate(90deg);
    }

    .nav-buttons {
        flex-direction: column-reverse;
    }

    .btn-next {
        width: 100%;
    }

    .btn-back {
        width: 100%;
        text-align: center;
    }

    .trust-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
