/* ========================================
   haka.run - Volume Checker
   Professional Crypto Analytics Platform
   Ultra High-Quality Design
   ======================================== */

/* CSS Variables */
:root {
    --bg-color: #0a0a0a;
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --accent-primary: #6366f1;
    --accent-secondary: #8b5cf6;
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-cosmic: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    --gradient-success: linear-gradient(135deg, #10b981 0%, #34d399 100%);
    --gradient-danger: linear-gradient(135deg, #ef4444 0%, #f87171 100%);
    --nav-bg: rgba(10, 10, 10, 0.8);
    --card-bg: rgba(20, 20, 20, 0.6);
    --border-color: rgba(255, 255, 255, 0.1);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Volume Checker specific */
    --container-bg: rgba(20, 20, 20, 0.4);
    --table-bg: rgba(15, 15, 15, 0.3);
    --table-header-bg: rgba(30, 30, 30, 0.4);
    --table-row-hover: rgba(99, 102, 241, 0.08);
    --table-row-even: rgba(255, 255, 255, 0.01);
    --positive-color: #10b981;
    --negative-color: #ef4444;
    --neutral-color: #64748b;
    --tab-active-color: #6366f1;
    --glow-color: rgba(99, 102, 241, 0.5);
    --glow-intense: rgba(99, 102, 241, 0.8);
}

[data-theme="light"] {
    --bg-color: #ffffff;
    --text-primary: #1a1a1a;
    --text-secondary: #333333;
    --nav-bg: rgba(255, 255, 255, 0.9);
    --card-bg: rgba(248, 248, 248, 0.5);
    --border-color: rgba(0, 0, 0, 0.1);
    
    /* Volume Checker specific */
    --container-bg: rgba(255, 255, 255, 0.7);
    --table-bg: rgba(250, 250, 250, 0.5);
    --table-header-bg: rgba(248, 248, 248, 0.6);
    --table-row-hover: rgba(99, 102, 241, 0.04);
    --table-row-even: rgba(0, 0, 0, 0.01);
    --glow-color: rgba(99, 102, 241, 0.3);
    --glow-intense: rgba(99, 102, 241, 0.6);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', 'Montserrat', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    overflow-x: hidden;
    line-height: 1.6;
    transition: var(--transition);
    min-height: 100vh;
    padding: 0;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes glow {
    0% {
        box-shadow: 0 0 5px var(--glow-color);
    }
    50% {
        box-shadow: 0 0 20px var(--glow-color), 0 0 30px var(--glow-color);
    }
    100% {
        box-shadow: 0 0 5px var(--glow-color);
    }
}

@keyframes ripple {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    100% {
        transform: scale(4);
        opacity: 0;
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% center;
    }
    100% {
        background-position: 200% center;
    }
}

/* Gradient Overlay */
.gradient-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, 
        transparent 0%, 
        rgba(10, 10, 10, 0.4) 40%, 
        rgba(10, 10, 10, 0.8) 100%);
    z-index: 2;
    pointer-events: none;
}

[data-theme="light"] .gradient-overlay {
    background: radial-gradient(ellipse at center, 
        transparent 0%, 
        rgba(255, 255, 255, 0.1) 40%, 
        rgba(255, 255, 255, 0.3) 100%);
}

/* Cosmic overlay */
.gradient-overlay::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 50%, rgba(120, 119, 198, 0.3), transparent 50%),
                radial-gradient(circle at 80% 50%, rgba(255, 119, 198, 0.3), transparent 50%),
                radial-gradient(circle at 40% 80%, rgba(255, 119, 198, 0.1), transparent 50%);
    opacity: 0.5;
}

[data-theme="light"] .gradient-overlay::before {
    background: radial-gradient(circle at 20% 50%, rgba(120, 119, 198, 0.1), transparent 50%),
                radial-gradient(circle at 80% 50%, rgba(255, 119, 198, 0.1), transparent 50%),
                radial-gradient(circle at 40% 80%, rgba(255, 119, 198, 0.05), transparent 50%);
    opacity: 0.3;
}

/* Geometric Shapes Animation */
.geometric-shapes {
    position: fixed;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 3;
    pointer-events: none;
}

.shape {
    position: absolute;
    border: 2px solid;
    opacity: 0.1;
    animation: float 20s infinite ease-in-out;
}

.shape-1 {
    width: 300px;
    height: 300px;
    top: -150px;
    left: -150px;
    border-color: rgba(102, 126, 234, 0.5);
    transform: rotate(45deg);
    animation-duration: 25s;
    box-shadow: 0 0 50px rgba(102, 126, 234, 0.3);
}

.shape-2 {
    width: 200px;
    height: 200px;
    top: 50%;
    right: -100px;
    border-color: rgba(255, 119, 198, 0.5);
    border-radius: 50%;
    animation-duration: 30s;
    animation-delay: -5s;
    box-shadow: 0 0 50px rgba(255, 119, 198, 0.3);
}

.shape-3 {
    width: 150px;
    height: 150px;
    bottom: -75px;
    left: 20%;
    border-color: rgba(139, 92, 246, 0.5);
    transform: rotate(30deg);
    animation-duration: 35s;
    animation-delay: -10s;
    box-shadow: 0 0 40px rgba(139, 92, 246, 0.3);
}

.shape-4 {
    width: 250px;
    height: 250px;
    top: 20%;
    right: 20%;
    border-color: rgba(167, 139, 250, 0.5);
    border-radius: 30%;
    animation-duration: 40s;
    animation-delay: -15s;
    box-shadow: 0 0 60px rgba(167, 139, 250, 0.3);
}

.shape-5 {
    width: 100px;
    height: 100px;
    top: 70%;
    left: 10%;
    border-color: rgba(196, 181, 253, 0.5);
    transform: rotate(60deg);
    animation-duration: 28s;
    animation-delay: -8s;
    box-shadow: 0 0 30px rgba(196, 181, 253, 0.3);
}

.shape-6 {
    width: 180px;
    height: 180px;
    bottom: 20%;
    right: 30%;
    border-color: rgba(165, 180, 252, 0.5);
    border-radius: 20%;
    animation-duration: 32s;
    animation-delay: -20s;
    box-shadow: 0 0 45px rgba(165, 180, 252, 0.3);
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) translateX(0) rotate(0deg) scale(1);
        opacity: 0.1;
    }
    25% {
        transform: translateY(-30px) translateX(20px) rotate(90deg) scale(1.1);
        opacity: 0.2;
    }
    50% {
        transform: translateY(20px) translateX(-30px) rotate(180deg) scale(0.9);
        opacity: 0.15;
    }
    75% {
        transform: translateY(-20px) translateX(30px) rotate(270deg) scale(1.05);
        opacity: 0.25;
    }
}

/* Navigation */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: var(--nav-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
}

[data-theme="light"] .nav {
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.nav-logo:hover {
    transform: scale(1.05);
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

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

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

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

/* Theme Toggle */
.theme-toggle {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.theme-toggle::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: var(--gradient-primary);
    transform: translate(-50%, -50%);
    transition: width 0.4s ease, height 0.4s ease;
    opacity: 0.1;
}

.theme-toggle:hover::before {
    width: 200%;
    height: 200%;
}

.theme-icon {
    display: inline-block;
    font-size: 1.3rem;
    transition: all 0.3s ease;
    z-index: 1;
    position: relative;
}

[data-theme="dark"] .theme-icon {
    color: var(--accent-primary);
    filter: drop-shadow(0 0 8px rgba(99, 102, 241, 0.5));
}

[data-theme="light"] .theme-icon {
    color: var(--accent-secondary);
    filter: drop-shadow(0 0 8px rgba(139, 92, 246, 0.5));
}

.theme-toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.2);
    background: rgba(99, 102, 241, 0.05);
}

.theme-toggle:hover .theme-icon {
    transform: scale(1.15) rotate(15deg);
}

.theme-toggle:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(99, 102, 241, 0.2);
}

/* Main Container */
.container {
    max-width: 1200px;
    margin: 80px auto 2rem;
    background: var(--container-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    padding: 32px;
    position: relative;
    border: 1px solid var(--border-color);
    z-index: 10;
    animation: fadeIn 0.6s ease;
}

[data-theme="light"] .container {
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
}

/* Header */
h1 {
    font-size: 2.5rem;
    font-weight: 900;
    margin-bottom: 1rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-align: center;
    animation: slideIn 0.8s ease;
}

/* Update Time */
.update-time {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    animation: fadeIn 0.8s ease 0.2s both;
}

/* Stats Bar */
.stats-bar {
    display: flex;
    justify-content: space-around;
    align-items: center;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, var(--card-bg) 0%, transparent 100%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 15px;
    border: 1px solid var(--border-color);
    gap: 2rem;
    animation: fadeIn 0.8s ease 0.3s both;
    flex-wrap: wrap;
}

[data-theme="light"] .stats-bar {
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
}

.stat-item {
    text-align: center;
    transition: var(--transition);
    flex: 1;
    min-width: 120px;
}

.stat-item:hover {
    transform: translateY(-2px);
}

.stat-value {
    display: block;
    font-size: clamp(1rem, 2.5vw, 1.5rem);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: clamp(0.7rem, 1.5vw, 0.85rem);
    color: var(--text-secondary);
}

/* Controls Container */
.controls-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 1rem;
    width: 100%;
    animation: fadeIn 0.8s ease 0.4s both;
}

/* Exchange Tabs */
.exchange-tabs {
    display: flex;
    gap: 0;
    border-radius: 50px;
    overflow: hidden;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    flex: 1;
    max-width: 400px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.exchange-tab {
    padding: 10px 20px;
    cursor: pointer;
    border: none;
    font-weight: 600;
    background: transparent;
    color: var(--text-secondary);
    transition: var(--transition);
    position: relative;
    flex: 1;
    text-align: center;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
}

.exchange-tab::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    transition: left 0.3s ease;
    z-index: -1;
}

.exchange-tab.active {
    color: white;
}

[data-theme="light"] .exchange-tab.active {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
    color: white;
    font-weight: 700;
}

.exchange-tab.active::before {
    left: 0;
}

.exchange-tab:hover:not(.active) {
    color: var(--text-primary);
}

/* Settings Button removed */

/* Table Styles - Ultra Modern */
.table-container {
    overflow-x: auto;
    border-radius: 15px;
    margin-top: 1rem;
    animation: fadeIn 0.8s ease 0.5s both;
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.95rem;
    background: var(--table-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

[data-theme="light"] table {
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
}

thead {
    background: var(--table-header-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 10;
}

[data-theme="light"] thead {
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
}

th {
    padding: 1.2rem 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    position: relative;
    user-select: none;
    transition: var(--transition);
}

th.sortable {
    cursor: pointer;
}

th.sortable:hover {
    color: var(--accent-primary);
}

th::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

th:hover::after {
    transform: scaleX(1);
}

tbody tr {
    transition: var(--transition);
    animation: slideIn 0.5s ease both;
}

tbody tr:nth-child(1) { animation-delay: 0.05s; }
tbody tr:nth-child(2) { animation-delay: 0.1s; }
tbody tr:nth-child(3) { animation-delay: 0.15s; }
tbody tr:nth-child(4) { animation-delay: 0.2s; }
tbody tr:nth-child(5) { animation-delay: 0.25s; }

tbody tr {
    position: relative;
}

/* tbody tr::before removed to fix cell alignment issue */

tbody tr:hover {
    background: var(--table-row-hover);
}

/* tbody tr:hover::before removed to fix cell alignment issue */

tbody tr:hover td {
    color: var(--text-primary);
}

td {
    padding: 1rem;
    transition: var(--transition);
    border-bottom: 1px solid var(--border-color);
}

tbody tr:last-child td {
    border-bottom: none;
}

/* Rank Column */
.rank-col {
    font-weight: 700;
    color: var(--accent-primary);
    font-size: 1.1rem;
    text-align: center;
    width: 60px;
}

/* Symbol Column - Interactive */
.symbol-col {
    cursor: pointer;
    font-weight: 600;
    color: var(--text-primary);
    transition: var(--transition);
}

td.symbol-col {
    position: relative;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

td.symbol-col:hover {
    color: var(--accent-primary);
    background-color: var(--table-row-hover);
}

/* New Badge Style */
.new-badge {
    display: inline-block;
    margin-left: 8px;
    padding: 2px 6px;
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: #000;
    font-size: 10px;
    font-weight: 700;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    animation: pulseGlow 2s ease-in-out infinite;
    box-shadow: 0 0 8px rgba(251, 191, 36, 0.5);
}

@keyframes pulseGlow {
    0% {
        box-shadow: 0 0 8px rgba(251, 191, 36, 0.5);
    }
    50% {
        box-shadow: 0 0 16px rgba(251, 191, 36, 0.8), 0 0 24px rgba(251, 191, 36, 0.4);
    }
    100% {
        box-shadow: 0 0 8px rgba(251, 191, 36, 0.5);
    }
}

[data-theme="light"] .new-badge {
    background: linear-gradient(135deg, #f59e0b 0%, #dc2626 100%);
    color: #fff;
    box-shadow: 0 0 8px rgba(245, 158, 11, 0.5);
}

/* Ripple Effect */
.ripple {
    position: absolute;
    border-radius: 50%;
    background: var(--accent-primary);
    transform: scale(0);
    animation: ripple 0.6s ease-out;
    pointer-events: none;
    opacity: 0.6;
}

@keyframes ripple {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* Price Change Styling - Enhanced */
.price-change {
    font-weight: 600;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    display: inline-block;
    min-width: 70px;
    text-align: center;
    transition: var(--transition);
}

.positive {
    color: var(--positive-color);
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(16, 185, 129, 0.1) 100%);
    box-shadow: 0 2px 10px rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.positive:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.25);
}

.negative {
    color: var(--negative-color);
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15) 0%, rgba(239, 68, 68, 0.1) 100%);
    box-shadow: 0 2px 10px rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.negative:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.25);
}

.neutral {
    color: var(--text-primary);
    background: transparent;
}

.very-positive {
    color: var(--positive-color);
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.25) 0%, rgba(16, 185, 129, 0.15) 100%);
    box-shadow: 0 2px 12px rgba(16, 185, 129, 0.25);
    border: 1px solid rgba(16, 185, 129, 0.3);
    font-weight: 600;
}

.very-negative {
    color: var(--negative-color);
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.25) 0%, rgba(239, 68, 68, 0.15) 100%);
    box-shadow: 0 2px 12px rgba(239, 68, 68, 0.25);
    border: 1px solid rgba(239, 68, 68, 0.3);
    font-weight: 600;
}

/* TD要素に対してもスタイルを適用 */
td.slight-positive {
    color: var(--positive-color);
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.05) 0%, rgba(16, 185, 129, 0.03) 100%);
}

td.slight-negative {
    color: var(--negative-color);
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.05) 0%, rgba(239, 68, 68, 0.03) 100%);
}

td.positive {
    color: var(--positive-color);
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(16, 185, 129, 0.1) 100%);
}

td.negative {
    color: var(--negative-color);
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15) 0%, rgba(239, 68, 68, 0.1) 100%);
}

td.very-positive {
    color: var(--positive-color);
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.25) 0%, rgba(16, 185, 129, 0.15) 100%);
    font-weight: 600;
}

td.very-negative {
    color: var(--negative-color);
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.25) 0%, rgba(239, 68, 68, 0.15) 100%);
    font-weight: 600;
}

td.neutral {
    color: var(--text-primary);
    background: transparent;
}

/* Volume Bar - Ultra Enhanced */
.volume-bar-container {
    width: 100%;
    height: 8px;
    background: linear-gradient(90deg, 
        rgba(99, 102, 241, 0.1) 0%, 
        rgba(139, 92, 246, 0.1) 100%);
    border-radius: 10px;
    overflow: hidden;
    margin-top: 6px;
    position: relative;
}

.volume-bar-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
}

.volume-bar {
    height: 100%;
    background: var(--gradient-primary);
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 10px;
    position: relative;
    box-shadow: 0 0 10px var(--glow-color);
}

.volume-bar::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 4px;
    height: 100%;
    background: white;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
    border-radius: 2px;
}

/* Divergence Styling - Premium */
.divergence {
    font-weight: 600;
    padding: 0.4rem 1rem;
    border-radius: 25px;
    font-size: 0.85em;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.divergence::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.3s ease;
}

.divergence:hover::before {
    transform: translate(-50%, -50%) scale(2);
}

.divergence.strong {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.2) 0%, rgba(239, 68, 68, 0.1) 100%);
    color: var(--negative-color);
    border: 1px solid rgba(239, 68, 68, 0.3);
    animation: pulse 2s infinite;
}

.divergence.moderate {
    background: linear-gradient(135deg, rgba(251, 146, 60, 0.2) 0%, rgba(251, 146, 60, 0.1) 100%);
    color: #fb923c;
    border: 1px solid rgba(251, 146, 60, 0.3);
}

.divergence.weak {
    background: linear-gradient(135deg, rgba(100, 116, 139, 0.2) 0%, rgba(100, 116, 139, 0.1) 100%);
    color: var(--neutral-color);
    border: 1px solid rgba(100, 116, 139, 0.3);
}

/* Chart Container */
.chart-container {
    position: relative;
    height: 400px;
    margin-top: 2rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, var(--card-bg) 0%, transparent 100%);
    border-radius: 15px;
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.chart-container::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, var(--glow-color) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.chart-container:hover::before {
    opacity: 0.3;
}

/* Loading State - Premium */
.loading {
    text-align: center;
    padding: 4rem;
    color: var(--text-secondary);
    position: relative;
}

.loading::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 3px solid var(--border-color);
    border-top: 3px solid var(--accent-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Footer */
.footer {
    margin-top: 3rem;
    padding: 1.5rem;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.75rem;
    opacity: 0.7;
}

/* Warning/Normal title styles */
.warning-title {
    color: #ef4444;
    font-weight: bold;
    display: none;
    animation: pulse 2s infinite;
}

.normal-title {
    display: block;
}

.subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-size: 1.1rem;
    animation: fadeIn 0.8s ease 0.2s both;
}

/* Settings Modal removed */

/* Dialog (Modal) Styles - Ultra Modern */
.dialog {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 1000;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.dialog.active {
    display: block;
    opacity: 1;
}

.dialog-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    background: var(--container-bg);
    padding: 2rem;
    border-radius: 20px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    animation: dialogOpen 0.3s ease forwards;
}

@keyframes dialogOpen {
    to {
        transform: translate(-50%, -50%) scale(1);
    }
}

.dialog-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.dialog-header h2 {
    font-size: 1.5rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

.dialog-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-secondary);
    transition: var(--transition);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.dialog-close:hover {
    color: var(--text-primary);
    background: rgba(99, 102, 241, 0.1);
    transform: rotate(90deg);
}

/* Dialog Tabs */
.dialog-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.dialog-tab {
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    border: none;
    background: none;
    color: var(--text-secondary);
    font-weight: 600;
    position: relative;
    transition: var(--transition);
}

.dialog-tab:hover {
    color: var(--text-primary);
}

.dialog-tab.active {
    color: var(--text-primary);
}

.dialog-tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gradient-primary);
    animation: slideIn 0.3s ease;
}

/* Dialog Tab Content */
.dialog-tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.dialog-tab-content.active {
    display: block;
}

.dialog-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.dialog-button {
    flex: 1;
    padding: 1rem 1.5rem;
    background: var(--gradient-primary);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    text-align: center;
    font-weight: 600;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
    position: relative;
    overflow: hidden;
}

.dialog-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.4s ease, height 0.4s ease;
}

.dialog-button:hover::before {
    width: 300%;
    height: 300%;
}

.dialog-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
}

/* Dialog Link Tabs - Exchange tabs style */
.dialog-link-tabs {
    display: flex;
    gap: 0.5rem;
    background: var(--card-bg);
    padding: 0.5rem;
    border-radius: 30px;
    margin-bottom: 1rem;
}

.dialog-link-tab {
    padding: 10px 20px;
    cursor: pointer;
    border: none;
    font-weight: 600;
    background: transparent;
    color: var(--text-secondary);
    text-decoration: none;
    text-align: center;
    flex: 1;
    border-radius: 25px;
    transition: var(--transition);
    font-size: 0.9rem;
}

.dialog-link-tab:hover {
    background: rgba(99, 102, 241, 0.1);
    color: var(--accent-primary);
}

/* チャートタイプボタン */
.chart-type-tab.active {
    background: var(--gradient-primary);
    color: white;
}

/* ダイアログセクション */
.dialog-section {
    margin-bottom: 1.5rem;
}

.dialog-section:last-child {
    margin-bottom: 0;
}

/* Chart Type Tabs */
.chart-type-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.chart-type-tab {
    padding: 0.6rem 1.2rem;
    border: 1px solid var(--border-color);
    background: var(--card-bg);
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: 25px;
    font-size: 0.9rem;
    transition: var(--transition);
}

.chart-type-tab:hover {
    background: rgba(99, 102, 241, 0.1);
    color: var(--text-primary);
    transform: translateY(-2px);
}

.chart-type-tab.active {
    background: var(--gradient-primary);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

/* Chart Container in Dialog */
.chart-container {
    position: relative;
    height: 300px;
    background: var(--table-bg);
    border-radius: 12px;
    padding: 1rem;
    margin-top: 1rem;
}

/* Chart Loading/Error */
.chart-loading,
.chart-error {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
}

.chart-error {
    color: var(--negative-color);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
}

/* Chart Type Tabs */
.chart-type-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.chart-type-tab {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    background: var(--card-bg);
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: 20px;
    font-size: 0.9rem;
    transition: var(--transition);
}

.chart-type-tab.active {
    background: var(--gradient-primary);
    color: white;
    border-color: transparent;
}

/* Chart Loading/Error */
.chart-loading,
.chart-error {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
}

.chart-error {
    color: var(--negative-color);
}

/* Spa Chart Styles */
.spa-chart-container {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--card-bg);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.chart-header h3 {
    font-size: 1.2rem;
    color: var(--text-primary);
}

.chart-controls {
    display: flex;
    gap: 0.5rem;
}

.chart-control-btn {
    padding: 0.5rem 1rem;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: 20px;
    font-size: 0.85rem;
    transition: var(--transition);
}

.chart-control-btn:hover {
    background: rgba(99, 102, 241, 0.1);
    color: var(--text-primary);
}

.chart-wrapper {
    position: relative;
    height: 300px;
}

.chart-legend {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 0.5rem;
    margin-top: 1rem;
    max-height: 200px;
    overflow-y: auto;
}

/* Legend Item */
.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 20px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.85rem;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
}

.legend-item:hover {
    background: rgba(99, 102, 241, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.15);
}

.legend-item.hot-symbol {
    font-weight: 600;
}

.legend-color {
    width: 20px;
    height: 3px;
    border-radius: 2px;
    flex-shrink: 0;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .container {
        margin-top: 70px;
        padding: 1rem;
        border-radius: 15px;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .update-time {
        font-size: 0.75rem;
        margin-bottom: 1rem;
    }
    
    .controls-container {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }
    
    .exchange-tabs {
        justify-content: center;
        max-width: 100%;
    }
    
    .exchange-tab {
        padding: 8px 12px;
        font-size: 0.8rem;
    }
    
    
    .stats-bar {
        padding: 1rem;
        gap: 1rem;
    }
    
    .stat-item {
        min-width: 100px;
    }
    
    .table-container {
        overflow-x: scroll;
    }
    
    th, td {
        padding: 0.5rem;
        font-size: 0.85rem;
    }
    
    .footer {
        font-size: 0.65rem;
        padding: 1rem;
    }
    
    tbody tr:hover {
        transform: translateX(2px);
    }
    
    /* ダイアログのリンクタブをモバイルで調整 */
    .dialog-link-tabs {
        flex-wrap: wrap;
        gap: 0.3rem;
        padding: 0.4rem;
    }
    
    .dialog-link-tab {
        padding: 8px 12px;
        font-size: 0.8rem;
        min-width: 80px;
        flex: 1 1 auto;
    }
    
    /* ダイアログコンテンツの調整 */
    .dialog-content {
        width: 95%;
        max-width: 400px;
        padding: 1rem;
    }
    
    .dialog-header h2 {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .exchange-tab {
        padding: 8px 10px;
        font-size: 0.75rem;
    }
    
    .nav-container {
        padding: 0.75rem 1rem;
    }
    
    .nav-logo {
        font-size: 1.25rem;
    }
    
    h1 {
        font-size: 1.75rem;
    }
    
    .subtitle {
        font-size: 0.9rem;
    }
    
    .shape {
        opacity: 0.03;
    }
    
    /* 480px以下でさらに小さく調整 */
    .dialog-link-tabs {
        gap: 0.25rem;
        padding: 0.3rem;
    }
    
    .dialog-link-tab {
        padding: 6px 10px;
        font-size: 0.75rem;
        min-width: 70px;
    }
}

/* Scroll to Top Button */
.scroll-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--gradient-primary);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 100;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.4);
}

/* Momentum Ranking Styles */
.momentum-ranking {
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(99, 102, 241, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(99, 102, 241, 0.1);
}

.ranking-title {
    margin: 0 0 0.75rem 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-color);
}

.ranking-list {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.ranking-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--surface);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.ranking-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.ranking-position {
    font-weight: 700;
    color: var(--accent);
    font-size: 0.9rem;
}

.ranking-symbol {
    font-weight: 600;
    color: var(--text-color);
}

.ranking-rate {
    font-size: 0.85rem;
    font-weight: 500;
}

.ranking-rate.positive {
    color: #10b981;
}

.ranking-rate.negative {
    color: #ef4444;
}