/* ===== CSS Variables（ダーク／ライト両対応） ===== */
:root {
    /* カラーパレット（ダーク） */
    --bg-dark: #0a0e27;
    --bg-darker: #05070f;
    --bg-card: #1a1f3a;
    --bg-input: #131829;
    
    --primary: #00d9ff;
    --primary-glow: #00f0ff;
    --secondary: #0066ff;
    --accent: #ff006e;
    
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    
    --text-primary: #e5e7eb;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;
    --border: #2d3748;
    /* 入力欄の文字は常に視認できるように明示 */
    --input-color: #e5e7eb;
    --input-bg: #131829;
    
    --shadow-sm: 0 2px 8px rgba(0, 217, 255, 0.1);
    --shadow-md: 0 8px 24px rgba(0, 217, 255, 0.15);
    --shadow-lg: 0 16px 48px rgba(0, 217, 255, 0.2);
    --glow: 0 0 20px rgba(0, 217, 255, 0.4);
}

/* ライトテーマ（prefers-color-scheme またはブラウザ設定に追従） */
@media (prefers-color-scheme: light) {
    :root {
        --bg-dark: #f0f4f8;
        --bg-darker: #e2e8f0;
        --bg-card: #ffffff;
        --bg-input: #ffffff;
        --text-primary: #1a202c;
        --text-secondary: #4a5568;
        --text-muted: #718096;
        --border: #cbd5e0;
        --input-color: #1a202c;
        --input-bg: #ffffff;
        --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
        --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.08);
        --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.1);
    }
}

/* ===== リセット ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto Mono', monospace;
    background: var(--bg-dark);
    color: var(--text-primary);
    overflow-x: hidden;
}

body {
    background: linear-gradient(135deg, var(--bg-darker) 0%, var(--bg-dark) 100%);
}

/* スクロールバー */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-glow);
}

/* ===== ナビゲーション バー ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 70px;
    background: rgba(10, 14, 39, 0.95);
    border-bottom: 1px solid rgba(0, 217, 255, 0.2);
    backdrop-filter: blur(10px);
    z-index: 1400;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.navbar-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 30px;
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: -1px;
    text-decoration: none;
}

.navbar-logo:hover {
    color: var(--primary-glow);
}

.logo-icon {
    font-size: 2rem;
    filter: drop-shadow(0 0 8px rgba(0, 217, 255, 0.6));
}

.logo-text {
    background: linear-gradient(90deg, var(--primary), var(--primary-glow));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.navbar-links {
    display: flex;
    align-items: center;
    gap: 30px;
}

.navbar-toggle {
    display: none;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    border: 1px solid rgba(0, 217, 255, 0.4);
    background: rgba(0, 217, 255, 0.08);
    cursor: pointer;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    padding: 0;
}

.navbar-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--primary);
    border-radius: 999px;
    transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: var(--primary);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.theme-toggle {
    width: 44px;
    height: 44px;
    border: 1px solid rgba(0, 217, 255, 0.3);
    background: rgba(0, 217, 255, 0.1);
    color: var(--primary);
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-toggle:hover {
    background: rgba(0, 217, 255, 0.2);
    box-shadow: var(--glow);
}

/* ===== ヒーロー セクション ===== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 100px 30px 50px;
    margin-top: 70px;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.grid-pattern {
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(rgba(0, 217, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 217, 255, 0.05) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: moveGrid 20s linear infinite;
}

@keyframes moveGrid {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

.glow-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.3;
    animation: float 20s ease-in-out infinite;
}

.orb-1 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, var(--primary), transparent);
    top: -200px;
    left: -200px;
}

.orb-2 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, var(--secondary), transparent);
    bottom: -150px;
    right: -150px;
    animation-delay: -10s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(30px, -30px); }
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    margin-bottom: 80px;
    animation: slideUp 0.8s ease-out;
}

.hero-title {
    font-size: 4rem;
    font-weight: 900;
    line-height: 1.2;
    margin-bottom: 20px;
    letter-spacing: -2px;
}

.title-highlight {
    display: block;
    color: var(--primary);
    font-size: 2.5rem;
    font-weight: 300;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 10px;
    text-shadow: 0 0 20px rgba(0, 217, 255, 0.5);
}

.title-main {
    display: block;
    background: linear-gradient(90deg, var(--primary), var(--primary-glow), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 5rem;
    font-weight: 900;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
    font-weight: 300;
}

.cta-button {
    padding: 16px 48px;
    font-size: 1rem;
    font-weight: 700;
    color: var(--bg-dark);
    background: linear-gradient(90deg, var(--primary), var(--primary-glow));
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 0 30px rgba(0, 217, 255, 0.4);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 50px rgba(0, 217, 255, 0.6);
}

/* ヒーロー統計 */
.hero-stats {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    width: 100%;
    max-width: 800px;
}

.stat-card {
    padding: 24px;
    background: rgba(26, 31, 58, 0.8);
    border: 1px solid rgba(0, 217, 255, 0.2);
    border-radius: 12px;
    text-align: center;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.stat-card:hover {
    border-color: rgba(0, 217, 255, 0.5);
    background: rgba(26, 31, 58, 1);
    box-shadow: var(--shadow-md);
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 8px;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* ===== 特徴セクション ===== */
.features {
    padding: 100px 30px;
    max-width: 1400px;
    margin: 0 auto;
}

.section-title {
    font-size: 3rem;
    font-weight: 900;
    text-align: center;
    margin-bottom: 60px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.feature-card {
    padding: 40px 30px;
    background: rgba(26, 31, 58, 0.6);
    border: 1px solid rgba(0, 217, 255, 0.2);
    border-radius: 12px;
    text-align: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.feature-card:hover {
    transform: translateY(-10px);
    border-color: rgba(0, 217, 255, 0.5);
    background: rgba(26, 31, 58, 0.9);
    box-shadow: var(--shadow-lg), var(--glow);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 20px;
    display: inline-block;
    animation: bounce 2s ease-in-out infinite;
}

.feature-card:nth-child(2) .feature-icon { animation-delay: 0.2s; }
.feature-card:nth-child(3) .feature-icon { animation-delay: 0.4s; }
.feature-card:nth-child(4) .feature-icon { animation-delay: 0.6s; }
.feature-card:nth-child(5) .feature-icon { animation-delay: 0.8s; }
.feature-card:nth-child(6) .feature-icon { animation-delay: 1s; }

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

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

.feature-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* ===== メインコンテンツ（両替 / ウォレット登録の切替） ===== */
.main-content-section {
    min-height: 50vh;
    padding-top: 70px;
}

.content-view {
    display: block;
}

.content-view-hidden {
    display: none;
}

/* ===== 両替セクション ===== */
.exchange-section {
    padding: 100px 30px;
    max-width: 1400px;
    margin: 0 auto;
}

.exchange-container {
    display: flex;
    justify-content: center;
    align-items: start;
}

#walletView .exchange-container {
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
}

.wallet-panel-wrap {
    width: 100%;
}

/* パネル共通 */
.panel {
    background: rgba(26, 31, 58, 0.8);
    border: 1px solid rgba(0, 217, 255, 0.2);
    border-radius: 16px;
    padding: 28px 24px;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 217, 255, 0.1);
}

@media (min-width: 601px) {
    .exchange-panel.panel {
        padding: 32px 28px;
    }
}

.exchange-panel .panel-header {
    margin-bottom: 20px;
    padding-bottom: 16px;
}

.panel-header-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.panel-header-row .panel-header-left {
    margin-bottom: 0;
}
.panel-header-row .panel-header-right {
    margin: 0;
    text-align: right;
}

.exchange-back-row {
    margin-bottom: 6px;
    min-height: 28px;
}

.exchange-back-row:has(.exchange-back-btn.hidden) {
    margin-bottom: 0;
    min-height: 0;
}

.exchange-back-btn {
    width: 28px;
    height: 28px;
    border: 1px solid rgba(0, 217, 255, 0.3);
    background: rgba(0, 217, 255, 0.1);
    color: var(--primary);
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.exchange-back-btn:hover {
    background: rgba(0, 217, 255, 0.2);
}

.exchange-back-btn.hidden {
    display: none !important;
}

.exchange-step {
    display: block;
}
.exchange-step-hidden {
    display: none !important;
}
.exchange-step-title {
    font-size: 1.1rem;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.panel-header {
    margin-bottom: 30px;
    border-bottom: 1px solid rgba(0, 217, 255, 0.1);
    padding-bottom: 20px;
}

.panel-header h2 {
    font-size: 1.8rem;
    color: var(--primary);
    margin-bottom: 8px;
}

.exchange-panel .panel-header h2 {
    font-size: 1.4rem;
}

.panel-subtitle {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.panel-limits {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-top: 8px;
    margin-bottom: 0;
}

/* フォーム */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-input);
    border: 1px solid rgba(0, 217, 255, 0.2);
    color: var(--input-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: inherit;
}

.form-group input::placeholder,
.form-group select::placeholder {
    color: var(--text-muted);
}

.form-group input:-webkit-autofill,
.form-group input:-webkit-autofill:hover,
.form-group input:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--input-color);
    box-shadow: 0 0 0 1000px var(--bg-input) inset;
}

.form-group select option {
    background: var(--bg-card);
    color: var(--text-primary);
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(0, 217, 255, 0.05);
    box-shadow: 0 0 15px rgba(0, 217, 255, 0.3);
}

/* アドレス入力 */
.address-input-wrapper {
    display: flex;
    gap: 10px;
}

.address-input-wrapper input {
    flex: 1;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
}

.paste-btn {
    width: 44px;
    height: auto;
    padding: 12px;
    background: rgba(0, 217, 255, 0.1);
    border: 1px solid rgba(0, 217, 255, 0.2);
    color: var(--primary);
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.paste-btn:hover {
    background: rgba(0, 217, 255, 0.2);
    box-shadow: var(--glow);
}

/* ウォレットリスト */
.wallets-section {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid rgba(0, 217, 255, 0.1);
}

.wallets-section h3 {
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 15px;
}

.wallets-list {
    display: grid;
    gap: 10px;
}

.wallet-item {
    padding: 15px;
    background: rgba(0, 217, 255, 0.05);
    border: 1px solid rgba(0, 217, 255, 0.2);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.wallet-item:hover {
    border-color: var(--primary);
    background: rgba(0, 217, 255, 0.1);
}

.wallet-name {
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 4px;
}

.wallet-address {
    color: var(--text-muted);
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
    word-break: break-all;
}

.empty-state {
    color: var(--text-secondary);
    text-align: center;
    padding: 20px;
    font-style: italic;
}

/* ボタン */
.submit-btn {
    width: 100%;
    padding: 14px 24px;
    margin-top: 10px;
    background: linear-gradient(90deg, var(--primary), var(--primary-glow));
    color: var(--bg-dark);
    border: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 0 20px rgba(0, 217, 255, 0.3);
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 30px rgba(0, 217, 255, 0.5);
}

/* 両替パネル */
/* 両替ウィジェット: スマホ縦半分幅感・PC/スマホ両対応 */
.exchange-right {
    display: flex;
    justify-content: center;
    width: 100%;
}

.exchange-panel {
    position: sticky;
    top: 100px;
    width: 100%;
    max-width: 420px;
}

@media (max-width: 600px) {
    .exchange-panel {
        max-width: 100%;
    }
}

/* 為替レート表示 */
.rate-display {
    margin-bottom: 30px;
}

.rate-display-compact {
    margin-bottom: 16px;
}

.rate-box {
    padding: 20px;
    background: rgba(0, 217, 255, 0.1);
    border: 1px solid rgba(0, 217, 255, 0.3);
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.rate-box-compact {
    padding: 10px 14px;
}

.rate-label {
    color: var(--text-secondary);
    font-size: 0.85rem;
    display: block;
    margin-bottom: 4px;
}

.rate-value {
    display: flex;
    align-items: center;
    gap: 10px;
}

#exchangeRate {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary);
    font-family: 'Courier New', monospace;
}

.refresh-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: rgba(0, 217, 255, 0.1);
    color: var(--primary);
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.refresh-btn:hover {
    background: rgba(0, 217, 255, 0.2);
    transform: rotate(180deg);
}

.refresh-btn-small {
    width: 28px;
    height: 28px;
    font-size: 0.85rem;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* 両替入力：メイン縦並び＋スワップボタン右端 */
.exchange-inputs {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 20px;
}

.exchange-inputs-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
}

.exchange-inputs .swap-btn-wrap.swap-btn-side {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 28px;
}

.swap-btn-small {
    width: 36px;
    height: 36px;
    font-size: 1rem;
}

.input-group {
    display: flex;
    flex-direction: column;
}

.input-group label {
    margin-bottom: 8px;
    color: var(--text-primary);
}

.currency-input {
    display: flex;
    align-items: center;
    background: var(--bg-input);
    border: 1px solid rgba(0, 217, 255, 0.2);
    border-radius: 8px;
    padding: 0 12px;
    transition: all 0.3s ease;
}

.currency-input:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 15px rgba(0, 217, 255, 0.3);
}

.currency-symbol {
    color: var(--primary);
    font-weight: 700;
    font-size: 1.1rem;
    margin-right: 8px;
}

.currency-input input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 12px 0;
    text-align: right;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--input-color) !important;
    -webkit-text-fill-color: var(--input-color);
}
.currency-input input[type="number"] {
    color: var(--input-color) !important;
    -webkit-text-fill-color: var(--input-color);
}

.currency-input input:focus {
    outline: none;
    box-shadow: none;
}

/* 日本円・USDT のプレースホルダー（0 / 0.00）を薄文字表示 */
.currency-input input::placeholder {
    color: var(--text-muted);
    opacity: 0.85;
}

.currency-input input:-webkit-autofill,
.currency-input input:-webkit-autofill:hover,
.currency-input input:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--input-color);
    box-shadow: 0 0 0 1000px var(--bg-input) inset;
}

.input-group small {
    margin-top: 6px;
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* スワップボタン */
.swap-btn {
    width: 44px;
    height: 44px;
    border: 1px solid rgba(0, 217, 255, 0.3);
    background: rgba(0, 217, 255, 0.1);
    color: var(--primary);
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.2rem;
    font-weight: 700;
    transition: all 0.3s ease;
}

.swap-btn:hover {
    background: rgba(0, 217, 255, 0.2);
    transform: rotate(180deg);
}

.checkbox-group label a {
    color: var(--primary);
    text-decoration: underline;
}
.checkbox-group label a:hover {
    color: var(--primary-glow);
}

/* 手数料内訳 */
.fee-breakdown {
    background: rgba(0, 217, 255, 0.05);
    border: 1px solid rgba(0, 217, 255, 0.2);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 20px;
}

.fee-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.fee-row span:last-child {
    color: var(--text-primary);
    font-weight: 600;
}

.fee-row.total {
    border-top: 1px solid rgba(0, 217, 255, 0.2);
    padding-top: 12px;
    margin-top: 12px;
    color: var(--primary);
    font-weight: 700;
}

.hidden {
    display: none !important;
}

/* チェックボックス */
.checkbox-group {
    margin: 20px 0;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary);
}

/* アクションボタン */
.action-buttons {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 12px;
}

.btn-primary,
.btn-secondary {
    padding: 14px 24px;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.9rem;
}

.btn-primary {
    background: linear-gradient(90deg, var(--primary), var(--primary-glow));
    color: var(--bg-dark);
    box-shadow: 0 0 20px rgba(0, 217, 255, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 30px rgba(0, 217, 255, 0.5);
}

.btn-secondary {
    background: rgba(0, 217, 255, 0.1);
    color: var(--primary);
    border: 1px solid rgba(0, 217, 255, 0.3);
}

.btn-secondary:hover {
    background: rgba(0, 217, 255, 0.2);
    border-color: var(--primary);
}

/* ===== モーダル ===== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    backdrop-filter: blur(4px);
    animation: fadeIn 0.3s ease;
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: var(--bg-card);
    border: 1px solid rgba(0, 217, 255, 0.3);
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 0 50px rgba(0, 217, 255, 0.3);
    animation: slideUp 0.3s ease;
}

.modal-header {
    padding: 24px;
    border-bottom: 1px solid rgba(0, 217, 255, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    color: var(--primary);
    font-size: 1.3rem;
}

.close-btn {
    width: 36px;
    height: 36px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.close-btn:hover {
    color: var(--primary);
}

.modal-body {
    padding: 24px;
}

.auth-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--border);
}
.auth-tab {
    flex: 1;
    padding: 10px 16px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.95rem;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: color 0.2s, border-color 0.2s;
}
.auth-tab:hover {
    color: var(--text-primary);
}
.auth-tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    font-weight: 600;
}

.modal-hint {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 16px;
}

.form-error {
    color: var(--danger, #f44336);
    font-size: 0.85rem;
    margin-bottom: 12px;
}

.form-error.hidden {
    display: none;
}

.confirm-wallet-detail .preview-row strong.address-monospace {
    word-break: break-all;
    font-size: 0.85rem;
}

.preview-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid rgba(0, 217, 255, 0.1);
}

.preview-row:last-child {
    border-bottom: none;
}

.preview-row span {
    color: var(--text-secondary);
}

.preview-row strong {
    color: var(--primary);
    font-family: 'Courier New', monospace;
}

.modal-footer {
    padding: 20px 24px;
    border-top: 1px solid rgba(0, 217, 255, 0.2);
    display: flex;
    gap: 12px;
}

.modal-footer .btn-primary,
.modal-footer .btn-secondary {
    flex: 1;
}

/* ===== ローディング ===== */
.loading-spinner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 2001;
    backdrop-filter: blur(4px);
}

.loading-spinner.hidden {
    display: none;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 3px solid rgba(0, 217, 255, 0.2);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
    box-shadow: 0 0 30px rgba(0, 217, 255, 0.5);
}

.loading-spinner p {
    color: var(--primary);
    font-weight: 600;
    letter-spacing: 1px;
}

/* ===== 通知 ===== */
.notification {
    position: fixed;
    bottom: 30px;
    right: 30px;
    max-width: 400px;
    padding: 16px 24px;
    border-radius: 8px;
    border: 1px solid rgba(0, 217, 255, 0.3);
    background: rgba(26, 31, 58, 0.95);
    color: var(--text-primary);
    box-shadow: 0 0 30px rgba(0, 217, 255, 0.3);
    z-index: 2002;
    animation: slideIn 0.3s ease;
    backdrop-filter: blur(10px);
}

.notification.hidden {
    display: none;
}

.notification.success {
    border-color: rgba(16, 185, 129, 0.5);
    color: #10b981;
}

.notification.error {
    border-color: rgba(239, 68, 68, 0.5);
    color: #ef4444;
}

.notification.warning {
    border-color: rgba(245, 158, 11, 0.5);
    color: #f59e0b;
}

/* ===== アニメーション ===== */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(400px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ===== レスポンシブ ===== */
@media (max-width: 768px) {
    .hero {
        padding: 80px 20px 30px;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .title-highlight {
        font-size: 1.5rem;
    }

    .title-main {
        font-size: 3rem;
    }

    .navbar-container {
        padding: 0 15px;
    }

    .navbar-toggle {
        display: flex;
    }

    .navbar-links {
        position: fixed;
        top: 70px;
        right: 0;
        left: 0;
        padding: 12px 16px 16px;
        background: rgba(10, 14, 39, 0.98);
        border-bottom: 1px solid rgba(0, 217, 255, 0.25);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
        transform: translateY(-120%);
        opacity: 0;
        pointer-events: none;
        transition: transform 0.22s ease-out, opacity 0.22s ease-out;
    }

    .navbar-links.is-open {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }

    .exchange-section {
        padding: 60px 20px;
    }

    .exchange-panel {
        position: static;
    }

    .action-buttons {
        grid-template-columns: 1fr;
    }

    .features {
        padding: 60px 20px;
    }

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

/* スムーズスクロール */
html {
    scroll-behavior: smooth;
}

/* 固定ヘッダー分だけ、アンカー位置を少し下げる */
#exchange,
#features,
#walletSection {
    scroll-margin-top: 80px;
}
