
:root {
    --bg-color: #fff;
    --text-color: #333;
    --section-bg-light: #c9cddf;
    --section-bg-dark: #1a202c;
    --card-bg: #fff;
    --card-shadow: rgba(0, 0, 0, 0.1);
    --hero-gradient-start: #667eea;
    --hero-gradient-end: #764ba2;
    --logo-gradient-start: #667eea;
    --logo-gradient-end: #764ba2;
    --text-muted: #666;
    --border-color: rgba(0, 0, 0, 0.1);
    --navbar-bg: rgba(224, 247, 250, 0.95);
    --input-bg: rgba(255, 255, 255, 0.8);
    --input-text-color: #222222;
    --input-placeholder-color: #888888;
    --input-border-color: rgba(0, 0, 0, 0.15);
    --footer-bg: #0f172a;
    --footer-text: white;
}
[data-theme="dark"] {
    --bg-color: #111827;
    --text-color: #e5e7eb;
    --section-bg-light: #1f2937;
    --section-bg-dark: #0f172a;
    --card-bg: #1f2937;
    --card-shadow: rgba(255, 255, 255, 0.05);
    --hero-gradient-start: #a2a3a5;
    --hero-gradient-end: #4410d1;
    --logo-gradient-start: #a7afe2;
    --logo-gradient-end: #9d7cfa;
    --text-muted: #9ca3af;
    --border-color: rgba(255, 255, 255, 0.1);
    --navbar-bg: rgba(30, 41, 59, 0.95);
    --input-bg: rgba(55, 65, 81, 0.5);
    --input-text-color: #e5e7eb;
    --input-placeholder-color: rgba(229, 231, 235, 0.5);
    --footer-bg: #000;
    --footer-text: #9ca3af;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

html, body {
    overflow-x: hidden;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: var(--navbar-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 1000;
    padding: 0.5rem 0; /* Reduced padding for navbar height */
    transition: all 0.3s ease;
    border-bottom: 1px solid transparent;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.navbar.navbar-scrolled {
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid var(--border-color);
}
[data-theme="dark"] .navbar.navbar-scrolled {
    box-shadow: 0 2px 20px rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .logo-img {
    filter: invert(1) hue-rotate(180deg);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between; /* Adjusted from space-evenly */
    padding: 0 0.75rem; /* Reduced side padding */
    gap: 0.5rem; /* Added gap for spacing */
}

.nav-left {
    display: flex;
    align-items: center;
}

.logo-img {
    height: 96px; /* Adjusted height */
    object-fit: contain;
    display: block;
    margin-right: 0.3rem; /* Space between image and text logo */
}

.logo {
    font-size: 1.4rem; /* Adjusted size */
    font-weight: 700;
    background: linear-gradient(135deg, var(--logo-gradient-start), var(--logo-gradient-end));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 1.5rem; 
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-color);
    font-size: 1.1rem;
    font-weight: 700;
    transition: color 0.3s ease;
    position: relative;
    padding: 0.5rem 0;
}

.nav-links a:hover {
    color: var(--hero-gradient-start);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(135deg, var(--hero-gradient-start) 0%, var(--hero-gradient-end) 100%);
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-controls-desktop {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.nav-controls-mobile-only { /* For controls inside mobile menu */
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    margin-top: 2rem;
    padding-bottom: 2rem;
}


.lang-switcher button, .theme-toggle-btn {
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-color);
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}
.lang-switcher button.active,
.lang-switcher button:hover,
.theme-toggle-btn:hover {
    background: linear-gradient(135deg, var(--hero-gradient-start) 0%, var(--hero-gradient-end) 100%);
    color: white;
    border-color: transparent;
}
.theme-toggle-btn {
    width: 40px; height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}
.theme-toggle-btn svg {
    width: 20px; height: 20px;
    fill: currentColor;
}


.mobile-menu-toggle {
    display: none; 
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 0.25rem;
    cursor: pointer;
    z-index: 1001; 
}
.mobile-menu-toggle .icon-menu,
.mobile-menu-toggle .icon-close { display: block; }
.mobile-menu-toggle .icon-close { display: none; }
.mobile-menu-toggle.active .icon-menu { display: none; }
.mobile-menu-toggle.active .icon-close { display: block; }


/* Hero Section */
.hero {
    min-height: 100vh;
    /* background: linear-gradient(135deg, var(--hero-gradient-start) 0%, var(--hero-gradient-end) 100%); */
    background: linear-gradient(135deg, rgba(224, 247, 250, 0.7), #87ceeb 30%, var(--hero-gradient-start) 60%, var(--hero-gradient-end));
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding: 100px 20px;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><defs><radialGradient id="a" cx="50%" cy="50%"><stop offset="0%" stop-color="%23ffffff" stop-opacity="0.1"/><stop offset="100%" stop-color="%23ffffff" stop-opacity="0"/></radialGradient></defs><circle cx="200" cy="200" r="150" fill="url(%23a)"/><circle cx="800" cy="300" r="200" fill="url(%23a)"/><circle cx="600" cy="700" r="100" fill="url(%23a)"/></svg>');
    animation: float 20s ease-in-out infinite;
    z-index: 1;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

.hero-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    text-align: center;
    color: white;
    z-index: 2;
    position: relative;
}

.hero h1 {
    font-size: clamp(2.5rem, 7vw, 5rem);
    font-weight: 700;
    margin-bottom: 1rem;
    animation: slideUp 1s ease-out;
    word-break: keep-all;
    overflow-wrap: break-word;
    hyphens: none;
    line-height: 1.4;
}

.hero h1[data-lang-ja] {
    font-size: clamp(2.5rem, 9vw, 3rem);
    letter-spacing: -0.02em;
}
.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    animation: slideUp 1s ease-out 0.2s both;
    max-width: 700px; 
    margin-left: auto;
    margin-right: auto;
}

.cta-button {
    display: inline-block;
    padding: 1rem 2rem;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    font-weight: 600;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    animation: slideUp 1s ease-out 0.4s both;
}

.cta-button:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Common Section Styles */
.section {
    padding: 6rem 0;
    min-height: 100vh;
}
.section-light { background: var(--section-bg-light); }
.section-dark { background: var(--section-bg-dark); color: white; }
.section-gradient { background: linear-gradient(135deg, var(--hero-gradient-start) 0%, var(--hero-gradient-end) 100%); color: white;}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 3rem;
    color: var(--text-color); 
}
.section-title.gradient-text {
    background: linear-gradient(135deg, var(--hero-gradient-start) 0%, var(--hero-gradient-end) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.section-dark .section-title, .section-gradient .section-title {
    color: white; 
}

/* Features Section */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}
.feature-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px var(--card-shadow);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}
.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 50px var(--card-shadow);
}
[data-theme="dark"] .feature-card:hover {
    box-shadow: 0 20px 50px rgba(255, 255, 255, 0.1);
}
.feature-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--hero-gradient-start) 0%, var(--hero-gradient-end) 100%);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    font-size: 1.5rem;
    color: white;
}
.feature-card h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-color);
}
.feature-card p {
    color: var(--text-muted);
    line-height: 1.7;
}

/* About Section */
#about {
    background: linear-gradient(135deg, rgba(120,180,255,0.15), rgba(0,100,200,0.1));
    min-height: 100vh;
    padding: 40px 20px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    min-height: 100vh;
}

#about p {
    background: rgba(245, 9, 9, 0.3);
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}
[data-theme="dark"] #about p { color: var(--text-muted); }

/* Stats Section */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    text-align: center;
}
.stat-item h3 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}
.stat-item p {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Contact Section */
.contact-content { text-align: center; }
.contact h2 { font-size: 2.5rem; margin-bottom: 2rem; }
.contact p.contact-intro { font-size: 1.2rem; margin-bottom: 2rem; opacity: 0.9; }
.contact-form {
    max-width: 600px;
    margin: 0 auto;
    display: grid;
    gap: 1rem;
}
.form-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}
.contact-form input,
.contact-form textarea {
    padding: 1rem;
    border: 1px solid var(--input-border-color);
    border-radius: 10px;
    background: var(--input-bg);
    color: var(--input-text-color);
    font-size: 1rem;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}
.contact-form input::placeholder,
.contact-form textarea::placeholder {
color: var(--input-placeholder-color);
}
.contact-form textarea {
grid-column: 1 / -1;
resize: vertical;
min-height: 120px;
}
[data-theme="dark"] .contact-form input,
[data-theme="dark"] .contact-form textarea {
    border: 1px solid rgba(255, 255, 255, 0.1); 
}
.contact-form input::placeholder,
.contact-form textarea::placeholder { color: var(--input-placeholder-color); }
.contact-form textarea {
    grid-column: 1 / -1;
    resize: vertical;
    min-height: 120px;
}
.submit-btn {
    padding: 1rem 2rem;
    background: linear-gradient(135deg, var(--hero-gradient-start) 0%, var(--hero-gradient-end) 100%);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    justify-self: center;
    min-width: 200px;
}
.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}
[data-theme="dark"] .submit-btn:hover {
     box-shadow: 0 10px 30px rgba(102, 126, 234, 0.2);
}

/* Footer */
.footer {
    background: var(--footer-bg);
    color: var(--footer-text);
    padding: 2rem 0;
    text-align: center;
    transition: background-color 0.3s ease, color 0.3s ease;
}
.footer p { opacity: 0.7; }

/* Back to Top Button */
#backToTopBtn {
    position: fixed;
    bottom: 20px; /* Default, will be adjusted by JS if chatbot is present */
    right: 20px;
    background: linear-gradient(135deg, var(--hero-gradient-start) 0%, var(--hero-gradient-end) 100%);
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
    cursor: pointer;
    display: none; 
    align-items: center;
    justify-content: center;
    z-index: 999;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transition: opacity 0.3s, transform 0.3s, background-color 0.3s, bottom 0.3s ease;
}
#backToTopBtn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}
body:has(.chatbot-widget.active) #backToTopBtn,
body:has(.chatbot-widget) #backToTopBtn { /* Move up if chatbot toggle is visible or window active */
     bottom: 90px;
}
@media (max-width: 768px) {
    body:has(.chatbot-widget.active) #backToTopBtn,
    body:has(.chatbot-widget) #backToTopBtn {
        bottom: 70px;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: clamp(1.8rem, 6vw, 2.5rem);
    }
    .hero p {
        font-size: 0.95rem;
        margin-bottom: 1.5rem;
    }
    .cta-button {
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
    }
    .section {
        padding: 4rem 0;
    }
    .section-title {
        font-size: 2rem;
        margin-bottom: 2rem;
    }
}


/* Chatbot Widget */
.chatbot-widget {
    position: fixed;
    bottom: 10px;
    right: 10px;
    z-index: 1010; /* Above back-to-top, below potential full-screen modals */
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.chatbot-toggle {
    background: linear-gradient(135deg, var(--hero-gradient-start) 0%, var(--hero-gradient-end) 100%);
    color: white;
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
    /* margin-top: 10px; remove fixed margin, window appears above */
}
.chatbot-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}
.chatbot-toggle svg {
    transition: opacity 0.2s ease-in-out;
    width: 28px; height: 28px;
}
.chatbot-toggle .icon-close-chat { display: none; }
.chatbot-widget.active .chatbot-toggle .icon-chat { display: none; }
.chatbot-widget.active .chatbot-toggle .icon-close-chat { display: block; }

.chatbot-window {
    max-width: calc(100vw - 20px); /* Ensure padding from screen edges */
    max-width: 320px; 
    height: 60vh;
    max-height: calc(100vh - 100px); /* Ensure padding from screen top/bottom */
    margin-bottom: 5px;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    display: none; 
    flex-direction: column;
    overflow: hidden; 
    transform-origin: bottom right;
    transition: transform 0.3s ease-out, opacity 0.3s ease-out;
    opacity: 0;
    transform: scale(0.8) translateY(20px);
    margin-bottom: 10px; /* Space between window and toggle button */
}

.chatbot-widget.active .chatbot-window {
    display: flex;
    opacity: 1;
    transform: scale(1) translateY(0);
}

.chatbot-header {
    background: linear-gradient(135deg, var(--hero-gradient-start) 0%, var(--hero-gradient-end) 100%);
    color: white;
    padding: 0.8rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0; /* Prevent header from shrinking */
}
.chatbot-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
}
.chatbot-close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    opacity: 0.8;
    padding: 0 0.5rem;
}
.chatbot-close-btn:hover { opacity: 1; }

.chatbot-messages {
    flex-grow: 1;
    padding: 0.75rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    background-color: var(--bg-color); /* Ensure message area has a background */
}
.message {
    padding: 0.6rem 0.9rem;
    border-radius: 10px;
    max-width: 80%;
    line-height: 1.4;
    word-wrap: break-word;
}
.user-message {
    background-color: var(--hero-gradient-start);
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 2px;
}
.bot-message {
    background-color: var(--section-bg-light); /* Matches light section bg */
    color: var(--text-color); /* Uses standard text color */
    align-self: flex-start;
    border-bottom-left-radius: 2px;
}
[data-theme="dark"] .bot-message {
    background-color: #2d3748; /* A bit lighter than card-bg in dark for contrast */
}

.chatbot-input-area {
    display: flex;
    padding: 0.75rem;
    border-top: 1px solid var(--border-color);
    background-color: var(--card-bg); 
    flex-shrink: 0; /* Prevent input area from shrinking */
}
.chatbot-input-area input {
    flex-grow: 1;
    padding: 0.6rem 0.8rem;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    margin-right: 0.5rem;
    font-size: 0.9rem;
    background-color: var(--bg-color); 
    color: var(--text-color);
}
.chatbot-input-area input:focus {
    outline: none;
    border-color: var(--hero-gradient-start);
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
}
.chatbot-send-btn {
    background: linear-gradient(135deg, var(--hero-gradient-start) 0%, var(--hero-gradient-end) 100%);
    color: white;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: opacity 0.3s;
    flex-shrink: 0;
}
.chatbot-send-btn:hover { opacity: 0.9; }
.chatbot-send-btn svg { width: 16px; height: 16px; }


/* Mobile Responsive */
@media (max-width: 768px) {
    .nav-container {
        padding: 0 1rem; /* Keep consistent padding */
    }
    .nav-links {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: var(--navbar-bg); 
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 1rem; /* Reduced gap for mobile menu items */
        transform: translateX(100%);
        transition: transform 0.3s ease-in-out;
        padding-top: 60px; 
        z-index: 1005; /* Below chatbot toggle, above most other things */
        overflow-y: auto; /* Allow scrolling if content overflows */
    }
    .nav-links.active { transform: translateX(0); }
    .nav-links li {
        width: 90%;
        display: flex;
        justify-content: center;
    }
    .nav-links a {
         padding: 0.8rem 1rem;
         font-size: 1.2rem;
         display: block;
         width: 100%;
         text-align: center;
     } /* Slightly smaller for mobile */
    
    .nav-controls-desktop { display: none; }
    .nav-controls-mobile-only {
        gap: 1rem;
        padding-bottom: 60px;
    }

    .mobile-menu-toggle { display: block; margin-left: auto; } /* Ensure it's on the right */
    .nav-left { flex-grow: 1; } /* Allow logo area to take space */
    
    .hero h1 { font-size: 2.2rem; }
    .hero p { font-size: 1.1rem; }
    
    .form-group { grid-template-columns: 1fr; }
    .features-grid { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }

    .chatbot-toggle { width: 48px; height: 48px; }
    .chatbot-toggle svg { width: 22px; height: 22px; }
}

/* Scroll animations */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Floating button */
.open-modal-btn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: #667eea;
  color: white;
  border: none;
  padding: 0.8rem 1.2rem;
  font-size: 1rem;
  border-radius: 50px;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

/* Modal overlay */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background-color: rgba(0,0,0,0.5);
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal {
  background-color: white;
  padding: 2rem;
  border-radius: 10px;
  max-width: 500px;
  width: 90%;
  box-shadow: 0 10px 25px rgba(0,0,0,0.3);
  animation: fadeIn 0.3s ease-out;
}

.modal h2 {
  margin-top: 0;
}

.modal input[type="text"] {
  width: 100%;
  padding: 0.8rem;
  font-size: 1rem;
  margin: 1rem 0;
  border: 1px solid #ccc;
  border-radius: 5px;
}

.modal button {
  padding: 0.6rem 1.2rem;
  font-size: 1rem;
  border: none;
  background: #667eea;
  color: white;
  border-radius: 5px;
  cursor: pointer;
}

.modal .result {
  margin-top: 1rem;
  background-color: #eef2ff;
  padding: 1rem;
  border-radius: 5px;
  font-size: 0.95rem;
  white-space: pre-wrap;
}

.close-btn {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 1.2rem;
  background: none;
  border: none;
  cursor: pointer;
  color: #555;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Optional: Animated Gradient Background */
.api {
background: linear-gradient(-45deg, #2c3e50, #3498db, #2980b9, #8e44ad);
background-size: 400% 400%;
animation: gradientBG 15s ease infinite;
color: white;
/* ... other api styles ... */
}
@keyframes gradientBG {
0% { background-position: 0% 50%; }
50% { background-position: 100% 50%; }
100% { background-position: 0% 50%; }
}

/* .api:hover {
    background: linear-gradient(45deg, #3498db, #2c3e50); Optional: change on hover 
}*/

.section-title {
font-size: 3rem; /* Larger, more impactful title */
text-transform: uppercase;
letter-spacing: 2px;
margin-bottom: 2rem;
text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
opacity: 0; /* For fade-in animation */
animation: fadeInTitle 1s ease-out forwards;
animation-delay: 0.2s; /* Delay title appearance */
}

@keyframes fadeInTitle {
from { opacity: 0; transform: translateY(-20px); }
to { opacity: 1; transform: translateY(0); }
}

#domainInput {
width: 100%;
padding: 1rem; /* Increased padding */
font-size: 1.1rem; /* Slightly larger font */
border: 2px solid transparent; /* Transparent border initially */
border-radius: 10px; /* More rounded */
background-color: rgba(255, 255, 255, 0.1); /* Translucent background */
color: white; /* Text color */
box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
transition: all 0.3s ease-in-out;
outline: none; /* Remove default outline */
opacity: 0;
animation: fadeInInput 0.8s ease-out 0.5s forwards; /* Delay input appearance */
}

@keyframes fadeInInput {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}


/* Pulsing effect for the input field before typing */
#domainInput.pulse-placeholder::placeholder {
    animation: pulsePlaceholder 2s ease-in-out infinite;
}

@keyframes pulsePlaceholder {
0%, 100% { opacity: 0.6; }
50% { opacity: 1; }
}

#domainInput:focus {
border-color: #8a9eff; /* Highlight color on focus */
background-color: rgba(255, 255, 255, 0.2);
box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.3), 0 6px 20px rgba(0,0,0,0.2); /* Glow effect */
}

.search-button { /* Added a class for easier targeting */
margin-top: 1.5rem; /* Adjusted margin */
padding: 1rem 2rem; /* Increased padding */
font-size: 1.1rem;
background-color: #667eea;
color: white;
border: none;
border-radius: 10px;
cursor: pointer;
text-transform: uppercase;
letter-spacing: 1px;
font-weight: bold;
box-shadow: 0 4px 10px rgba(102, 126, 234, 0.4);
transition: all 0.3s ease-in-out;
opacity: 0;
animation: fadeInButton 0.8s ease-out 0.8s forwards; /* Delay button appearance */
}

@keyframes fadeInButton {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.search-button:hover {
background-color: #5a6cc2;
transform: translateY(-3px) scale(1.03); /* Slight lift and scale */
box-shadow: 0 6px 15px rgba(102, 126, 234, 0.5);
}

.search-button:active {
transform: translateY(-1px) scale(0.98); /* Press down effect */
box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}
/* Loading spinner for the button */
.search-button.loading::after {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 3px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
    margin-left: 10px;
    vertical-align: middle;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

#lookupResult {
margin-top: 2rem;
font-size: 1.1rem;
padding: 1rem;
background-color: rgba(0, 0, 0, 0.2);
border-radius: 8px;
min-height: 50px; /* So it doesn't jump too much when empty */
opacity: 0; /* Initially hidden for animation */
transform: translateY(20px);
transition: opacity 0.5s ease-out, transform 0.5s ease-out;
border-left: 4px solid #667eea; /* Accent border */
}

#lookupResult.visible { /* Class to trigger animation */
    opacity: 1;
    transform: translateY(0);
}

#lookupResult pre { /* If you format results with <pre> */
    white-space: pre-wrap;
    word-wrap: break-word;
    color: #e0e0e0;
}

.company-profile {
    width: 100%;
    max-width: 1400px;
    border-collapse: collapse;
    margin-top: 20px;
    font-size: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.company-profile th {
    text-align: left;
    background: linear-gradient(135deg, #d0f2ff 0%, #c6f7e9 100%);
    padding: 12px;
    width: 30%;
    color: #0369a1;
    font-weight: 600;
    border-left: 4px solid #0ea5e9;
    font-size: 1.45rem;
    white-space: nowrap; 
}

.company-profile td {
    padding: 8px 10px;
    background-color: #f8f9fa;
    color: #555;
    border-bottom: 1px solid #e9ecef;
    font-size: 1.45rem;
    line-height: 1.6;
}

.company-profile tr:nth-child(even) td {
    background-color: #ffffff;
}

[data-theme="dark"] .company-profile {
    box-shadow: 0 2px 8px rgba(255, 255, 255, 0.05);
    background-color: #1e293b;
}

[data-theme="dark"] .company-profile th {
    background: linear-gradient(135deg, #334155 0%, #475569 100%);
    color: #e0f2fe;
    border-left: 4px solid #38bdf8;
}

[data-theme="dark"] .company-profile td {
    background-color: #0f172a;
    color: #f1f5f9;
    border-bottom: 1px solid #334155;
}

[data-theme="dark"] .company-profile tr:nth-child(even) td {
    background-color: #1e293b;
}