:root {
    /* Light Theme (Default) */
    --bg-gradient-1: #e8f4f8;
    --bg-gradient-2: #d4e8f0;
    --bg-gradient-3: #c5dde8;
    --accent-warm: #ff6b35;
    --accent-gold: #f7c948;
    --accent-cyan: #00b4d8;
    --accent-purple: #667eea;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(0, 0, 0, 0.08);
    --text-primary: #1a2b3c;
    --text-secondary: rgba(26, 43, 60, 0.65);
    --bot-bubble: rgba(255, 255, 255, 0.85);
    --user-bubble: rgba(255, 255, 255, 0.85);
    --shadow-glow: 0 8px 32px rgba(102, 126, 234, 0.2);
    --shadow-soft: 0 4px 15px rgba(0, 0, 0, 0.08);
    --header-bg: rgba(255, 255, 255, 0.5);
    --input-bg: rgba(255, 255, 255, 0.6);
    --aurora-1: rgba(102, 126, 234, 0.12);
    --aurora-2: rgba(0, 180, 216, 0.1);
    --aurora-3: rgba(118, 75, 162, 0.08);
    --particle-color: rgba(102, 126, 234, 0.3);
    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-sm: 12px;
}

/* Dark Theme */
[data-theme="dark"] {
    --bg-gradient-1: #0f0c29;
    --bg-gradient-2: #302b63;
    --bg-gradient-3: #24243e;
    --accent-cyan: #00d9ff;
    --glass-bg: rgba(255, 255, 255, 0.08);
    --glass-border: rgba(255, 255, 255, 0.15);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --bot-bubble: rgba(255, 255, 255, 0.12);
    --user-bubble: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --shadow-glow: 0 8px 32px rgba(102, 126, 234, 0.3);
    --shadow-soft: 0 4px 15px rgba(0, 0, 0, 0.3);
    --header-bg: rgba(0, 0, 0, 0.2);
    --input-bg: rgba(255, 255, 255, 0.08);
    --aurora-1: rgba(102, 126, 234, 0.15);
    --aurora-2: rgba(0, 217, 255, 0.08);
    --aurora-3: rgba(118, 75, 162, 0.12);
    --particle-color: rgba(255, 255, 255, 0.3);
}

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

html,
body {
    height: 100%;
    overflow: hidden;
    overflow-x: hidden;
}

/* Allow scrolling on specific pages (like TOS) */
html.is-scrollable,
html.is-scrollable body {
    overflow-y: auto;
    height: auto;
    -webkit-overflow-scrolling: touch;
}

/* Auto height for scrollable pages like TOS */
body.scrollable {
    height: 100%;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

body {
    font-family: 'Outfit', sans-serif;
    background: linear-gradient(135deg, var(--bg-gradient-1) 0%, var(--bg-gradient-2) 50%, var(--bg-gradient-3) 100%);
    color: var(--text-primary);
    min-height: 100dvh;
    position: relative;
    transition: background 0.4s ease, color 0.3s ease;
}

/* Aurora Background Animation */
.aurora-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
    pointer-events: none;
}

.aurora-layer {
    position: absolute;
    width: 200%;
    height: 200%;
    top: -50%;
    left: -50%;
    background: radial-gradient(ellipse at center,
            var(--aurora-1) 0%,
            transparent 50%);
    animation: aurora-drift 20s ease-in-out infinite;
}

.aurora-layer:nth-child(2) {
    background: radial-gradient(ellipse at center,
            var(--aurora-3) 0%,
            transparent 45%);
    animation: aurora-drift 25s ease-in-out infinite reverse;
    animation-delay: -5s;
}

.aurora-layer:nth-child(3) {
    background: radial-gradient(ellipse at center,
            var(--aurora-2) 0%,
            transparent 40%);
    animation: aurora-drift 30s ease-in-out infinite;
    animation-delay: -10s;
}

@keyframes aurora-drift {

    0%,
    100% {
        transform: translate(0, 0) rotate(0deg);
    }

    33% {
        transform: translate(5%, -5%) rotate(3deg);
    }

    66% {
        transform: translate(-3%, 3%) rotate(-2deg);
    }
}

/* Floating particles */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--particle-color);
    border-radius: 50%;
    animation: float-up 15s linear infinite;
}

@keyframes float-up {
    0% {
        transform: translateY(100vh) scale(0);
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        transform: translateY(-10vh) scale(1);
        opacity: 0;
    }
}

/* Main Chat Container */
.chat-container {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    height: 100dvh;
    max-width: 480px;
    margin: 0 auto;
    padding: 0;
}

/* Tablet */
@media (min-width: 768px) {
    .chat-container {
        padding: 20px;
        height: 100vh;
        width: 95%;
        max-width: 700px;
    }
}

/* Desktop */
@media (min-width: 1024px) {
    .chat-container {
        padding: 24px;
        width: 90%;
        max-width: 900px;
    }
}

/* Large Desktop */
@media (min-width: 1400px) {
    .chat-container {
        max-width: 1100px;
    }
}

.chat-wrapper {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    overflow: hidden;
}

@media (min-width: 768px) {
    .chat-wrapper {
        border-radius: var(--radius-lg);
        box-shadow: var(--shadow-glow);
    }
}

/* Header */
.chat-header {
    padding: 20px 24px;
    background: var(--header-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
}

.header-info {
    flex: 1;
}

.theme-toggle {
    width: 44px;
    height: 44px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: all 0.3s ease;
    color: var(--text-primary);
}

.theme-toggle:hover {
    background: var(--bot-bubble);
    transform: scale(1.08);
    box-shadow: var(--shadow-soft);
}

.theme-toggle:active {
    transform: scale(0.95);
}

.theme-toggle .icon-sun,
.theme-toggle .icon-moon {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.theme-toggle .icon-moon {
    display: none;
}

[data-theme="dark"] .theme-toggle .icon-sun {
    display: none;
}

[data-theme="dark"] .theme-toggle .icon-moon {
    display: block;
}

.header-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--accent-gold) 0%, var(--accent-warm) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.4);
    animation: pulse-glow 3s ease-in-out infinite;
}

@keyframes pulse-glow {

    0%,
    100% {
        box-shadow: 0 4px 15px rgba(255, 107, 53, 0.4);
    }

    50% {
        box-shadow: 0 4px 25px rgba(255, 107, 53, 0.6);
    }
}

.header-info h1 {
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.header-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #4ade80;
    border-radius: 50%;
    animation: blink 2s ease-in-out infinite;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

/* Messages Area */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    scroll-behavior: smooth;
}

.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
    background: transparent;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

/* Desktop: scrollbar più evidente */
@media (min-width: 768px) {
    .chat-messages::-webkit-scrollbar {
        width: 10px;
    }

    .chat-messages::-webkit-scrollbar-track {
        background: var(--glass-bg);
        border-radius: 5px;
        margin: 8px 0;
    }

    .chat-messages::-webkit-scrollbar-thumb {
        background: var(--accent-purple);
        border-radius: 5px;
        border: 2px solid transparent;
        background-clip: padding-box;
    }

    .chat-messages::-webkit-scrollbar-thumb:hover {
        background: var(--accent-cyan);
        border: 2px solid transparent;
        background-clip: padding-box;
    }

    .chat-messages {
        scrollbar-width: auto;
        scrollbar-color: var(--accent-purple) var(--glass-bg);
    }
}

/* Message Bubbles */
.message {
    display: flex;
    gap: 12px;
    max-width: 85%;
    animation: message-appear 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes message-appear {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }

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

.message.bot {
    align-self: flex-start;
}

.message.user {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.message-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.bot .message-avatar {
    background: linear-gradient(135deg, var(--accent-cyan) 0%, #667eea 100%);
}

.user .message-avatar {
    background: linear-gradient(135deg, var(--accent-warm) 0%, var(--accent-gold) 100%);
}

.message-content {
    padding: 14px 18px;
    border-radius: var(--radius-md);
    line-height: 1.5;
    font-size: 1.1rem;
    /* Increased from 0.95rem */
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Markdown Styles within Message Content */
.message-content p {
    margin-bottom: 8px;
}

.message-content p:last-child {
    margin-bottom: 0;
}

.message-content h1,
.message-content h2,
.message-content h3,
.message-content h4 {
    margin-top: 12px;
    margin-bottom: 6px;
    font-weight: 600;
    line-height: 1.3;
}

.message-content h1 {
    font-size: 1.3em;
}

.message-content h2 {
    font-size: 1.2em;
}

.message-content h3 {
    font-size: 1.1em;
}

.message-content ul,
.message-content ol {
    margin-left: 20px;
    margin-bottom: 8px;
}

.message-content li {
    margin-bottom: 4px;
}

.message-content strong {
    font-weight: 700;
}

.message-content em {
    font-style: italic;
}

.message-content code {
    font-family: 'Space Mono', monospace;
    background: rgba(0, 0, 0, 0.1);
    /* Darker for light mode */
    padding: 2px 5px;
    border-radius: 4px;
    font-size: 0.9em;
}

[data-theme="dark"] .message-content code {
    background: rgba(255, 255, 255, 0.15);
}

.message-content pre {
    background: rgba(0, 0, 0, 0.05);
    padding: 12px;
    border-radius: 8px;
    overflow-x: auto;
    margin-top: 8px;
    margin-bottom: 8px;
    border: 1px solid var(--glass-border);
}

[data-theme="dark"] .message-content pre {
    background: rgba(0, 0, 0, 0.3);
}

.message-content pre code {
    background: transparent;
    padding: 0;
    color: inherit;
    white-space: pre;
}

.message-content blockquote {
    border-left: 3px solid var(--accent-purple);
    margin: 8px 0;
    padding-left: 12px;
    opacity: 0.8;
    font-style: italic;
}

.message-content a {
    color: var(--accent-cyan);
    text-decoration: underline;
}

.bot .message-content {
    background: var(--bot-bubble);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-bottom-left-radius: 4px;
    box-shadow: var(--shadow-soft);
}

.user .message-content {
    background: var(--user-bubble);
    border: 1px solid var(--glass-border);
    border-bottom-right-radius: 4px;
    box-shadow: var(--shadow-soft);
    color: var(--text-primary);
}

[data-theme="dark"] .user .message-content {
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    color: #ffffff;
}

.message-time {
    font-size: 0.6rem;
    color: var(--text-secondary);
    margin-top: 6px;
    text-align: right;
    opacity: 0.7;
}

.bot .message-time {
    text-align: left;
}

/* Weather Card */
.weather-card {
    background: var(--glass-bg);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-top: 12px;
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-soft);
}

.weather-main {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.weather-icon {
    font-size: 48px;
    animation: weather-bounce 2s ease-in-out infinite;
}

@keyframes weather-bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-5px);
    }
}

.weather-temp {
    font-family: 'Space Mono', monospace;
    font-size: 3rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent-purple) 0%, var(--accent-cyan) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

[data-theme="dark"] .weather-temp {
    background: linear-gradient(135deg, #fff 0%, var(--accent-cyan) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.weather-details {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.weather-detail {
    text-align: center;
    padding: 12px 8px;
    background: var(--input-bg);
    border-radius: var(--radius-sm);
    border: 1px solid var(--glass-border);
}

.weather-detail-icon {
    font-size: 20px;
    margin-bottom: 4px;
}

.weather-detail-value {
    font-family: 'Space Mono', monospace;
    font-size: 1rem;
    font-weight: 600;
}

.weather-detail-label {
    font-size: 0.7rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Icons Showcase */
.icons-showcase {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-top: 12px;
    padding: 12px;
    background: var(--glass-bg);
    border-radius: var(--radius-sm);
    border: 1px solid var(--glass-border);
}

.icon-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 4px;
    background: var(--input-bg);
    border-radius: 8px;
    border: 1px solid var(--glass-border);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.icon-item:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-soft);
}

.icon-preview {
    font-size: 24px;
    line-height: 1;
}

.icon-label {
    font-size: 0.65rem;
    color: var(--text-secondary);
    text-align: center;
    line-height: 1.2;
}

@media (max-width: 400px) {
    .icons-showcase {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Typing Indicator */
.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 8px 0;
}

.typing-dot {
    width: 8px;
    height: 8px;
    background: var(--accent-purple);
    border-radius: 50%;
    animation: typing-bounce 1.4s ease-in-out infinite;
    opacity: 0.7;
    transition: background 0.3s ease;
}

.typing-dot.green {
    background: #22c55e !important;
    /* Green for DB/AI */
    box-shadow: 0 0 10px rgba(34, 197, 94, 0.4);
    opacity: 1;
}

.typing-dot.blue {
    background: #3b82f6 !important;
    /* Blue for Web */
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.4);
    opacity: 1;
}

[data-theme="dark"] .typing-dot {
    background: var(--text-secondary);
    opacity: 1;
}

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

.typing-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing-bounce {

    0%,
    60%,
    100% {
        transform: translateY(0);
    }

    30% {
        transform: translateY(-8px);
    }
}

/* Quick Actions */
.quick-actions {
    display: flex;
    gap: 8px;
    padding: 12px 16px;
    overflow-x: auto;
    flex-shrink: 0;
    border-top: 1px solid var(--glass-border);
    background: var(--header-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* Notification Toast */
.notification-toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    padding: 12px 24px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-glow);
    color: var(--text-primary);
    font-size: 0.95rem;
    font-weight: 500;
    z-index: 1000;
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    display: flex;
    align-items: center;
    gap: 10px;
}

.notification-toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.notification-toast.error {
    border-left: 4px solid var(--accent-warm);
}

.notification-toast.success {
    border-left: 4px solid #4ade80;
}

-webkit-overflow-scrolling: touch;
}

.quick-actions::-webkit-scrollbar {
    display: none;
}

.quick-btn {
    flex-shrink: 0;
    padding: 10px 16px;
    background: var(--bot-bubble);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    color: var(--text-primary);
    font-family: 'Outfit', sans-serif;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    box-shadow: var(--shadow-soft);
}

.quick-btn:hover {
    background: var(--glass-bg);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.2);
}

.quick-btn:active {
    transform: scale(0.95);
}

/* Input Area */
.chat-input-area {
    padding: 16px;
    background: var(--header-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid var(--glass-border);
    flex-shrink: 0;
}

.input-wrapper {
    display: flex;
    gap: 12px;
    align-items: flex-end;
}

.input-field {
    flex: 1;
    background: var(--input-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 14px 18px;
    color: var(--text-primary);
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    resize: vertical;
    min-height: 48px;
    max-height: 150px;
    transition: all 0.3s ease;
    transition: all 0.3s ease;
    overflow-y: auto;
    scrollbar-width: thin;
    max-height: 150px;
}

.input-field::-webkit-scrollbar {
    width: 6px;
}

.input-field::-webkit-scrollbar-thumb {
    background-color: var(--text-secondary);
    border-radius: 4px;
    opacity: 0.5;
}

.input-field::-webkit-scrollbar-track {
    background: transparent;
}

.input-field::placeholder {
    color: var(--text-secondary);
}

.input-field:focus {
    outline: none;
    border-color: var(--accent-cyan);
    background: var(--bot-bubble);
    box-shadow: 0 0 0 3px rgba(0, 180, 216, 0.15);
}

.send-btn {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.send-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.send-btn:active {
    transform: scale(0.95);
}

.send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Safe area for mobile */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    .chat-input-area {
        padding-bottom: calc(16px + env(safe-area-inset-bottom));
    }
}

/* Desktop enhancements */
@media (min-width: 768px) {
    .message {
        max-width: 80%;
    }

    .quick-actions {
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* Landscape phone */
@media (max-height: 500px) and (orientation: landscape) {
    .chat-header {
        padding: 12px 16px;
    }

    .header-icon {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }

    .chat-messages {
        padding: 12px;
    }

    .quick-actions {
        padding: 8px 12px;
    }

    .chat-input-area {
        padding: 10px 12px;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Theme transition */
.chat-wrapper,
.chat-header,
.chat-messages,
.message-content,
.quick-actions,
.quick-btn,
.chat-input-area,
.input-field,
.weather-card,
.weather-detail,
.theme-toggle,
.privacy-section,
.content-wrapper,
.page-header,
.back-btn {
    transition: background 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease, color 0.3s ease;
}

.disclaimer-text {
    font-size: 0.7rem;
    color: var(--text-secondary);
    text-align: left;
    margin-top: 8px;
    opacity: 0.8;
    font-family: 'Outfit', sans-serif;
    padding-left: 4px;
}

@media (min-width: 768px) {
    .disclaimer-text {
        text-align: center;
        padding-left: 0;
    }
}

/* Cookie Modal - Centered Popup */
.cookie-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.85);
    width: 90%;
    max-width: 320px;
    background: var(--glass-bg);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 20px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.cookie-modal.show {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.cookie-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
}

.cookie-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.cookie-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.cookie-btn {
    background: var(--accent-cyan);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
    box-shadow: 0 4px 15px rgba(0, 180, 216, 0.3);
}

.cookie-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 180, 216, 0.4);
    background: #009ec0;
}

[data-theme="dark"] .cookie-modal {
    background: rgba(20, 20, 30, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* 
           =========================================================
           TOS / PRIVACY SPECIFIC STYLES 
           =========================================================
        */

/* Main Container - Document Style */
.container {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    min-height: 100vh;
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    height: auto;
}

@media (min-width: 768px) {
    .container {
        padding: 40px 24px;
    }
}

/* Content Card */
.content-wrapper {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-glow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    /* Allow height to grow with content */
    height: auto;
}

/* Header */
.page-header {
    padding: 20px 24px;
    background: var(--header-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 20;
}

.back-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--glass-bg);
    border: 1px solid rgba(255, 255, 255, 0.5);
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.back-btn svg {
    width: 22px;
    height: 22px;
    stroke-width: 2.5;
    transition: transform 0.3s ease;
}

.back-btn:hover {
    background: var(--bot-bubble);
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.25);
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
}

.back-btn:hover svg {
    transform: translateX(-3px);
}

/* Dark mode specific hover adjustment */
[data-theme="dark"] .back-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: var(--accent-cyan);
    border-color: var(--accent-cyan);
    box-shadow: 0 8px 24px rgba(0, 217, 255, 0.2);
}

.header-title h1 {
    font-size: 1.25rem;
    font-weight: 600;
    text-align: center;
    color: var(--text-primary);
}

/* Main Content */
.scrollable-content {
    padding: 30px;
    /* Natural flow, no internal overflow */
}

@media (max-width: 600px) {
    .scrollable-content {
        padding: 20px 16px;
    }
}

.privacy-section {
    background: var(--bot-bubble);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-soft);
    transition: background 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease, color 0.3s ease;
}

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

.privacy-section h2 {
    font-size: 1.5rem;
    margin-bottom: 16px;
    color: var(--accent-purple);
    border-bottom: 2px solid var(--aurora-1);
    padding-bottom: 8px;
}

.privacy-section h3 {
    font-size: 1.2rem;
    margin-top: 20px;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.privacy-section p {
    margin-bottom: 12px;
    line-height: 1.6;
    color: var(--text-primary);
}

.privacy-section ul {
    margin-left: 20px;
    margin-bottom: 16px;
}

.privacy-section li {
    margin-bottom: 8px;
    line-height: 1.5;
}

.updated-date {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
    font-style: italic;
}

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

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

.privacy-section {
    animation: fadeIn 0.5s ease-out forwards;
}

.privacy-section:nth-child(2) {
    animation-delay: 0.1s;
}

.privacy-section:nth-child(3) {
    animation-delay: 0.2s;
}

.privacy-section:nth-child(4) {
    animation-delay: 0.3s;
}