:root {
    --bg-dark: #0f1115;
    --bg-panel: rgba(25, 27, 34, 0.6);
    --primary-red: #ea2e49;
    --primary-hover: #c42036;
    --accent-gold: #f4c542;
    --text-main: #f0f0f4;
    --text-muted: #8b92a5;
    --border-color: rgba(255, 255, 255, 0.1);
    --glass-blur: 16px;
    --font-primary: 'Outfit', sans-serif;
    --font-jp: 'Noto Sans JP', sans-serif;
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

/* Background elements */
.background-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    background: url('bg.png') no-repeat center center;
    background-size: cover;
}

.bg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(15, 17, 21, 0.95) 0%, rgba(15, 17, 21, 0.8) 50%, rgba(26, 8, 12, 0.85) 100%);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 5%;
}

.glass-panel {
    background: var(--bg-panel);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--border-color);
    border-radius: 20px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.5);
}

.highlight {
    color: var(--primary-red);
}

/* Typography */
h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    background: linear-gradient(to right, #fff, #bbb);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

h2 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 10px;
}

h3 {
    font-size: 1.2rem;
    margin-bottom: 0.8rem;
    color: var(--accent-gold);
}

.subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
    max-width: 600px;
    margin-bottom: 2rem;
}

.jp-logo {
    font-family: var(--font-jp);
    font-size: 0.8rem;
    color: var(--accent-gold);
    background: rgba(244, 197, 66, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 5px;
}

/* Nav */
.navbar {
    padding: 1.5rem 0;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 100;
    transition: background 0.3s ease;
}

.navbar.scrolled {
    background: rgba(15, 17, 21, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    text-decoration: none;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo i {
    color: var(--primary-red);
}

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

.nav-links a {
    color: var(--text-main);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--primary-red);
}

/* Buttons */
.btn-primary {
    background: var(--primary-red);
    color: white;
    border: none;
    padding: 0.8rem 1.8rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    font-family: var(--font-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(234, 46, 73, 0.3);
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(234, 46, 73, 0.4);
}

.btn-secondary {
    background: transparent;
    border: 1px solid var(--primary-red);
    color: var(--primary-red);
    padding: 0.8rem 1.8rem;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-secondary:hover {
    background: rgba(234, 46, 73, 0.1);
}

.full-width {
    width: 100%;
}

/* Hero Section */
.hero {
    min-height: 80vh;
    display: flex;
    align-items: center;
    padding-top: 80px;
}

.hero-text {
    padding: 3rem;
    max-width: 650px;
    animation: fadeInUp 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Form Panel */
.reservation-section {
    padding: 5rem 0;
}

.reservation-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.form-panel,
.status-panel {
    padding: 2.5rem;
}

.form-desc {
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #e0e0e0;
}

.form-group label i {
    width: 20px;
    color: var(--accent-gold);
}

.row {
    display: flex;
    gap: 1rem;
}

.half {
    flex: 1;
}

input {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: white;
    padding: 1rem;
    border-radius: 10px;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s, box-shadow 0.3s;
}

input:focus {
    outline: none;
    border-color: var(--primary-red);
    box-shadow: 0 0 0 3px rgba(234, 46, 73, 0.2);
}

input[type="date"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator {
    filter: invert(1);
    cursor: pointer;
}

.counter-input {
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    overflow: hidden;
}

.counter-btn {
    background: transparent;
    border: none;
    color: white;
    padding: 1rem 1.5rem;
    cursor: pointer;
    transition: background 0.2s;
}

.counter-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.counter-input input {
    background: transparent;
    border: none;
    text-align: center;
    width: 60px;
    padding: 1rem 0;
    -moz-appearance: textfield;
}

.counter-input input::-webkit-outer-spin-button,
.counter-input input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.form-separator {
    height: 1px;
    background: var(--border-color);
    margin: 2rem 0;
}

.small-text {
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
}

.text-muted {
    color: var(--text-muted);
}

.submit-btn {
    width: 100%;
    margin-top: 1rem;
    padding: 1.2rem;
    font-size: 1.1rem;
}

/* Status Panel */
.status-panel {
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.terminal-header {
    display: flex;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.terminal-dots {
    display: flex;
    gap: 6px;
    margin-right: 15px;
}

.terminal-dots span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ff5f56;
}

.terminal-dots span:nth-child(2) {
    background: #ffbd2e;
}

.terminal-dots span:nth-child(3) {
    background: #27c93f;
}

.terminal-title {
    font-family: monospace;
    color: var(--text-muted);
    font-size: 0.9rem;
    letter-spacing: 1px;
}

.agent-avatar-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 0;
    flex: 1;
}

.ring-container {
    position: relative;
    width: 120px;
    height: 120px;
    margin-bottom: 1rem;
}

.circle {
    width: 100px;
    height: 100px;
    background-color: rgba(25, 27, 34, 0.9);
    border: 2px solid var(--accent-gold);
    border-radius: 50%;
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: var(--accent-gold);
    z-index: 2;
    box-shadow: inset 0 0 20px rgba(244, 197, 66, 0.2);
    transition: all 0.3s;
}

.ringring {
    border: 3px solid rgba(244, 197, 66, 0.5);
    border-radius: 50%;
    height: 120px;
    width: 120px;
    position: absolute;
    left: 0;
    top: 0;
    opacity: 0;
}

.calling .ringring {
    animation: pulsate 1.5s ease-out infinite;
}

.calling .circle {
    color: var(--primary-red);
    border-color: var(--primary-red);
    box-shadow: inset 0 0 30px rgba(234, 46, 73, 0.4);
}

.calling .ringring {
    border-color: rgba(234, 46, 73, 0.8);
}

.agent-status-text {
    font-family: monospace;
    font-size: 1.1rem;
    letter-spacing: 1px;
    color: var(--text-main);
}

.calling .agent-status-text {
    color: var(--primary-red);
    animation: blink 1.5s infinite;
}

.call-log {
    background: rgba(0, 0, 0, 0.4);
    border-radius: 10px;
    padding: 1rem;
    height: 180px;
    overflow-y: auto;
    font-family: monospace;
    font-size: 0.9rem;
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 8px;
    scrollbar-width: thin;
    scrollbar-color: var(--accent-gold) rgba(0, 0, 0, 0.2);
}

.call-log::-webkit-scrollbar {
    width: 6px;
}

.call-log::-webkit-scrollbar-thumb {
    background-color: var(--accent-gold);
    border-radius: 10px;
}

.log-entry {
    padding-bottom: 6px;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.1);
}

.log-entry.system {
    color: var(--text-muted);
}

.log-entry.agent {
    color: var(--accent-gold);
}

.log-entry.restaurant {
    color: #27c93f;
}

.log-entry.error {
    color: var(--primary-red);
}

.call-log .log-entry:last-child {
    border-bottom: none;
}

/* Result Card */
.result-card {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 17, 21, 0.95);
    backdrop-filter: blur(10px);
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    text-align: center;
    opacity: 1;
    transition: opacity 0.4s ease;
}

.result-card.hidden {
    opacity: 0;
    pointer-events: none;
}

.result-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
}

.result-icon.success {
    color: #27c93f;
}

.result-icon.error {
    color: var(--primary-red);
}

#resultDesc {
    color: var(--text-muted);
    margin: 1rem 0 2rem;
    font-size: 1.1rem;
}

/* Loading Dots Animation */
.btn-loader {
    display: flex;
    gap: 4px;
}

.dot {
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
    animation: bounce 1.4s infinite ease-in-out both;
}

.dot:nth-child(1) {
    animation-delay: -0.32s;
}

.dot:nth-child(2) {
    animation-delay: -0.16s;
}

.hidden {
    display: none !important;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

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

@keyframes pulsate {
    0% {
        transform: scale(0.8, 0.8);
        opacity: 0.0;
    }

    50% {
        opacity: 1.0;
    }

    100% {
        transform: scale(1.3, 1.3);
        opacity: 0.0;
    }
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

@keyframes bounce {

    0%,
    80%,
    100% {
        transform: scale(0);
    }

    40% {
        transform: scale(1);
    }
}

/* Footer Section */
footer {
    background: rgba(10, 11, 14, 0.95);
    padding: 3rem 0;
    border-top: 1px solid var(--border-color);
    margin-top: 4rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-brand p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}

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

/* Modal Styling */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.modal-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.modal {
    width: 100%;
    max-width: 450px;
    padding: 2.5rem;
    position: relative;
    transform: translateY(0);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-overlay.hidden .modal {
    transform: translateY(-50px);
}

.close-btn {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.2s;
}

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

.modal h2 {
    margin-bottom: 0.5rem;
}

.modal p {
    color: var(--text-muted);
    margin-bottom: 2rem;
    font-size: 0.95rem;
}

.modal-footer {
    margin-top: 2rem;
    text-align: center;
    font-size: 0.9rem;
}

.lang-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: var(--text-main);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.3s;
    margin-left: 10px;
}

.lang-btn:hover {
    border-color: var(--primary-red);
    color: var(--primary-red);
}

/* Responsiveness */
@media (max-width: 900px) {
    .reservation-wrapper {
        grid-template-columns: 1fr;
    }

    .nav-links a,
    .nav-links .login-btn {
        display: none;
        /* Hide main links on mobile to save space for language btn */
    }
}

.lang-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: var(--text-main);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.3s;
    margin-left: 10px;
}

.lang-btn:hover {
    border-color: var(--primary-red);
    color: var(--primary-red);
}