:root {
    --bg-color: #030a18;
    --card-bg: #0d1a33;
    --primary-color: #007aff;
    --primary-glow: rgba(0, 122, 255, 0.5);
    --secondary-color: #00d2ff;
    --text-main: #ffffff;
    --text-dim: #a0aec0;
    --border-color: rgba(255, 255, 255, 0.1);
    --success-color: #4cd137;
    --up-color: #ff4757;
    --grid-color: rgba(0, 122, 255, 0.05);
    --font-jp: 'Noto Sans JP', sans-serif;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: var(--font-jp);
    overflow-x: hidden;
    line-height: 1.6;
}

/* Grid Overlay Background */
.grid-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(var(--grid-color) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-color) 1px, transparent 1px);
    background-size: 40px 40px;
    z-index: -1;
    pointer-events: none;
}

.grid-overlay::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 50%, transparent 0%, var(--bg-color) 80%);
}

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

/* Hero Section */
.hero-section {
    padding: 60px 0 60px;
    text-align: center;
}

.hero-logo {
    width: 180px;
    margin: 0 auto 20px;
    display: block;
    filter: drop-shadow(0 0 15px var(--primary-glow));
    border-radius: 12px;
}

.trust-tags {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 25px;
}

.tag {
    font-size: 13px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    padding: 5px 15px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-dim);
}

.hero-title {
    font-size: clamp(32px, 8vw, 56px);
    font-weight: 900;
    margin-bottom: 20px;
    background: linear-gradient(to bottom, #fff, #a0aec0);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.1));
}

.hero-subtitle {
    font-size: 14px;
    color: var(--text-dim);
    margin-bottom: 30px;
}

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

.badge {
    background: rgba(0, 122, 255, 0.1);
    color: var(--primary-color);
    border: 1px solid rgba(0, 122, 255, 0.2);
    padding: 6px 16px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
}

.scroll-cta {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 18px 40px;
    border-radius: 40px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 0 20px var(--primary-glow);
    transition: all 0.3s ease;
}

.scroll-cta:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 30px var(--primary-glow);
    background: #0084ff;
}

/* Search Section */
.main-content {
    margin-bottom: 60px;
}

.search-card {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
}

.card-glow {
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    border-radius: 22px;
    z-index: 1;
    opacity: 0.3;
    filter: blur(10px);
}

.card-inner {
    position: relative;
    z-index: 2;
    background: var(--card-bg);
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    border: 1px solid var(--border-color);
}

.card-inner h2 {
    font-size: 22px;
    margin-bottom: 10px;
}

.hint-text {
    font-size: 14px;
    color: var(--text-dim);
    margin-bottom: 25px;
}

.search-box-wrapper {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.input-group {
    position: relative;
}

input[type="text"] {
    width: 100%;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 18px 20px;
    color: white;
    font-size: 16px;
    transition: all 0.3s;
}

input[type="text"]:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 10px var(--primary-glow);
}

.analyze-btn {
    background: #fff;
    color: #030a1a;
    border: none;
    padding: 18px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
}

.analyze-btn:hover {
    background: var(--primary-color);
    color: white;
}

.legal-fine-print {
    margin-top: 25px;
    font-size: 12px;
    color: var(--text-dim);
    line-height: 1.5;
}

/* Compliance Section */
.compliance-section {
    margin-bottom: 60px;
}

.compliance-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 30px;
}

.compliance-card h2 {
    font-size: 20px;
    margin-bottom: 30px;
    text-align: center;
}

.method-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 25px;
}

@media (max-width: 600px) {
    .method-list {
        grid-template-columns: 1fr;
    }
}

.method-item {
    display: flex;
    gap: 20px;
    background: rgba(255, 255, 255, 0.03);
    padding: 20px;
    border-radius: 15px;
}

.method-num {
    font-size: 24px;
    font-weight: 900;
    color: var(--primary-color);
    opacity: 0.5;
}

.method-info h3 {
    font-size: 16px;
    margin-bottom: 8px;
}

.method-info p {
    font-size: 13px;
    color: var(--text-dim);
}

.warning-box {
    background: rgba(255, 107, 107, 0.05);
    border-left: 3px solid #ff6b6b;
    padding: 15px 20px;
    border-radius: 0 10px 10px 0;
    font-size: 12px;
    color: #ff8e8e;
}

.popular-searches {
    margin-top: 20px;
    text-align: left;
}

.popular-searches .label {
    font-size: 13px;
    color: var(--text-dim);
    margin-bottom: 8px;
    display: block;
}

.popular-searches .tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.tag-item:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

/* Demo Section */
.demo-section {
    margin-bottom: 80px;
}

.section-header {
    text-align: center;
    margin-bottom: 40px;
}

.section-header h2 {
    font-size: 24px;
    margin-bottom: 10px;
}

.section-header p {
    color: var(--text-dim);
    font-size: 16px;
}

.demo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.demo-card {
    background: #000;
    border-radius: 20px;
    padding: 25px;
    border: 1px solid var(--border-color);
    transition: transform 0.3s;
}

.demo-card:hover {
    transform: translateY(-5px);
}

.demo-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.demo-header .name {
    font-size: 16px;
    font-weight: 700;
}

.demo-label {
    background: #333;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 10px;
    color: #ccc;
}

.demo-content .price {
    font-size: 28px;
    font-weight: 900;
    margin-bottom: 5px;
}

.demo-content .change {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 20px;
}

.change.up {
    color: var(--up-color);
}

.change.down {
    color: #00d2ff;
}

.demo-visual {
    margin-top: 15px;
}

.bar-grid {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    height: 60px;
}

.bar {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    height: var(--h);
    border-radius: 4px 4px 0 0;
}

.bar.active {
    background: linear-gradient(to top, var(--primary-color), var(--secondary-color));
}

.demo-footer {
    text-align: center;
    font-size: 12px;
    color: var(--text-dim);
}

.unit {
    font-size: 14px;
    font-weight: 400;
    color: var(--text-dim);
}

/* Footer Styles */
.app-footer {
    padding: 60px 0;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
}

.footer-links a {
    color: var(--text-dim);
    text-decoration: none;
    font-size: 14px;
}

.company-address {
    font-size: 13px;
    color: var(--text-dim);
    margin-bottom: 30px;
}

.legal-disclaimer {
    font-size: 11px;
    color: #fff;
    max-width: 700px;
    margin: 0 auto;
}

/* Dropdown */
.stock-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 0 0 12px 12px;
    z-index: 100;
    max-height: 250px;
    overflow-y: auto;
    display: none;
}

.dropdown-item {
    padding: 12px 20px;
    cursor: pointer;
    text-align: left;
    transition: all 0.2s;
}

.dropdown-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(3, 10, 26, 0.95);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(0, 122, 255, 0.1);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.active {
    display: flex;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    position: relative;
    background: #0d1a33;
    width: 100%;
    max-width: 440px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    max-height: 85vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    animation: modalIn 0.4s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 16px;
    color: var(--text-dim);
}

.close-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 28px;
    cursor: pointer;
    line-height: 1;
}

.modal-body {
    padding: 25px 20px;
    text-align: center;
}

.status-success {
    margin-bottom: 25px;
}

.status-success .icon {
    width: 48px;
    height: 48px;
    background: var(--success-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin: 0 auto 10px;
    color: white;
}

.status-success p {
    color: var(--success-color);
    font-weight: 700;
    font-size: 14px;
}

.found-text {
    margin-bottom: 15px;
    font-size: 15px;
}

.price-summary {
    background: rgba(255, 255, 255, 0.03);
    padding: 20px;
    border-radius: 16px;
    margin-bottom: 25px;
}

.price-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.price-row:last-child {
    margin-bottom: 0;
}

.price-row .label {
    color: var(--text-dim);
}

.price-row .value {
    font-weight: 900;
    font-size: 18px;
}

.cta-message {
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 25px;
    color: var(--text-dim);
}

.line-cta-btn {
    width: 100%;
    background: #06c755;
    color: white;
    border: none;
    padding: 18px;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    margin-bottom: 20px;
}

.line-cta-btn:hover {
    background: #05b04b;
    transform: scale(1.02);
}

.modal-footer-notes {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.3);
    text-align: left;
}

.modal-footer-notes ul {
    list-style: none;
}

.modal-footer-notes li::before {
    content: "• ";
    margin-right: 5px;
}

/* Modal View Management */
#foundView,
#notFoundView {
    width: 100%;
}

.modal-header {
    background: #2f54eb;
    /* Matching the blue header in image */
    padding: 15px 25px;
}

.modal-header h3 {
    color: white;
    font-weight: 700;
}

.not-found-card {
    background: #262933;
    border-radius: 12px;
    padding: 20px;
    text-align: left;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.card-header-icon {
    font-weight: 700;
    font-size: 16px;
    margin-bottom: 12px;
    color: white;
}

.card-desc {
    font-size: 18px;
    line-height: 1.6;
    color: var(--text-dim);
}

.important-notice-card {
    background: #1a1e26;
    border: 1px solid #c67e17;
    /* Golden/Orange border from image */
    border-radius: 12px;
    padding: 20px;
    text-align: left;
    margin-bottom: 20px;
}

.notice-title {
    color: #e6a23c;
    font-weight: 700;
    font-size: 15px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.notice-list {
    list-style: none;
    padding: 0;
}

.notice-list li {
    font-size: 13px;
    color: var(--text-dim);
    margin-bottom: 12px;
    padding-left: 20px;
    position: relative;
}

.notice-list li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: #e6a23c;
}

.notice-list li.check-item::before {
    content: none;
}

.notice-list li.check-item {
    padding-left: 0;
    color: var(--text-dim);
}

.check-icon {
    color: #4cd137;
    margin-right: 5px;
    font-weight: bold;
}

.line-cta-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 18px;
}

.btn-icon {
    font-size: 22px;
}

/* --- Legal Pages (Dark Theme Adaption) --- */
.legal-page {
    position: relative;
    padding: 60px 20px;
}

.legal-container {
    max-width: 800px;
    margin: 0 auto;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 40px;
    border-radius: 24px;
    position: relative;
    z-index: 2;
}

.back-link {
    display: inline-block;
    color: var(--primary-color);
    text-decoration: none;
    margin-bottom: 30px;
    font-size: 14px;
}

.legal-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 20px;
}

.legal-icon {
    font-size: 32px;
}

.last-updated {
    font-size: 12px;
    color: var(--text-dim);
    margin-bottom: 30px;
}

.legal-content section {
    margin-bottom: 35px;
}

.legal-content h2 {
    font-size: 18px;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.legal-content p,
.legal-content li {
    font-size: 14px;
    color: var(--text-dim);
    margin-bottom: 10px;
}

.legal-content ul {
    padding-left: 20px;
    margin-bottom: 15px;
}

.info-box {
    background: rgba(0, 122, 255, 0.05);
    border-left: 4px solid var(--primary-color);
    padding: 20px;
    border-radius: 0 12px 12px 0;
    margin-bottom: 30px;
}

.legal-footer {
    border-top: 1px solid var(--border-color);
    margin-top: 40px;
    padding-top: 20px;
    text-align: center;
    font-size: 12px;
    color: var(--text-dim);
}