/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    --bg-color: linear-gradient(135deg, #ffffff 0%, #e0f7fa 100%);
    --text-color: #1f2937;
    --card-bg: #ffffff;
    --card-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --header-bg: rgba(255, 255, 255, 0.9);
    --input-bg: #ffffff;
    --input-border: #d1d5db;
    --input-text: #1f2937;
    --button-bg: #2563eb;
    --button-hover: #1d4ed8;
    --button-text: #ffffff;
    --link-color: #2563eb;
    --gray-text: #6b7280;
    --footer-bg: linear-gradient(to right, #eff6ff, #f5e8ff);
    --version-bg: #e5e7eb;
    --version-text: #4b5563;
    background: var(--bg-color);
    color: var(--text-color);
}

/* Dark mode */
body.dark-mode {
    --bg-color: linear-gradient(135deg, #111827 0%, #1f2937 100%);
    --text-color: #e5e7eb;
    --card-bg: #1f2937;
    --card-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    --header-bg: rgba(17, 24, 39, 0.9);
    --input-bg: #374151;
    --input-border: #4b5563;
    --input-text: #e5e7eb;
    --button-bg: #3b82f6;
    --button-hover: #2563eb;
    --button-text: #1c2526;
    --link-color: #60a5fa;
    --gray-text: #9ca3af;
    --footer-bg: linear-gradient(to right, #111827, #1f2937);
    --version-bg: #4b5563;
    --version-text: #e5e7eb;
}

/* Layout */
.min-h-screen {
    min-height: 100vh;
}

.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.container {
    /* Increased max-width to stretch more, reduced padding */
    max-width: 1400px; /* Increased from 1200px */
    width: 100%; /* Ensures it stretches to max-width or full screen */
    margin: 0 auto;
}

.px-2 {
    padding-left: 0.5rem; /* Reduced from 1rem */
    padding-right: 0.5rem; /* Reduced from 1rem */
}

.py-4 {
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.py-10 {
    padding-top: 2.5rem;
    padding-bottom: 2.5rem;
}

.gap-4 {
    gap: 1rem;
}

.gap-8 {
    gap: 2rem;
}

.space-x-6 > * + * {
    margin-left: 1.5rem;
}

.space-y-4 > * + * {
    margin-top: 1rem;
}

.md\:flex-row {
    @media (min-width: 768px) {
        flex-direction: row;
    }
}

.md\:w-2\/3 {
    @media (min-width: 768px) {
        width: 66.666667%;
    }
}

.md\:w-1\/3 {
    @media (min-width: 768px) {
        width: 33.333333%;
    }
}

.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

/* Header */
.header {
    position: sticky;
    top: 0;
    z-index: 10;
    backdrop-filter: blur(10px);
    background: var(--header-bg);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.logoText {
    background-image: linear-gradient(to right, #2563eb, #9333ea);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-weight: 800;
}

.text-3xl {
    font-size: 1.875rem;
    line-height: 2.25rem;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.nav-link {
    color: #1f2937;
    padding: 0.25rem 0.75rem;
    border-radius: 0.375rem;
    text-decoration: none;
    font-weight: 600;
}

body.dark-mode .nav-link {
    color: #e5e7eb;
}

.nav-link-home:hover {
    color: #ffffff;
    background-color: #9333ea;
}

.nav-link-about:hover,
.nav-link-contact:hover {
    color: #ffffff;
    background-color: #2563eb;
}

.nav-link-privacy:hover {
    color: #ffffff;
    background-color: #9333ea;
}

.hidden {
    display: none;
}

@media (min-width: 768px) {
    .md\:flex {
        display: flex;
    }
}

/* Theme toggle button */
.theme-toggle {
    padding: 0.5rem 1rem;
    background: var(--version-bg);
    color: var(--version-text);
    border-radius: 0.375rem;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s;
}

.theme-toggle:hover {
    background: #d1d5db;
}

body.dark-mode .theme-toggle:hover {
    background: #6b7280;
}

.light-icon {
    display: inline;
}

.dark-icon {
    display: none;
}

body.dark-mode .light-icon {
    display: none;
}

body.dark-mode .dark-icon {
    display: inline;
}

/* Main */
.card {
    background: var(--card-bg);
    border-radius: 0.5rem;
    box-shadow: var(--card-shadow);
    padding: 1.5rem;
}

.text-2xl {
    font-size: 1.5rem;
    line-height: 2rem;
}

.font-bold {
    font-weight: 700;
}

.mb-4 {
    margin-bottom: 1rem;
}

/* Form */
.input,
.textarea,
.select {
    padding: 0.75rem;
    border: 1px solid var(--input-border);
    border-radius: 0.375rem;
    background: var(--input-bg);
    color: var(--input-text);
    font-size: 1rem;
    width: 100%; /* Ensure full width within the card */
}

.input:focus,
.textarea:focus,
.select:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}

.textarea {
    height: 10rem;
    resize: vertical;
}

.select-small {
    padding: 0.5rem;
}

.button {
    padding: 0.75rem 1.5rem;
    background: var(--button-bg);
    color: #ffffff;
    border: none;
    border-radius: 0.375rem;
    cursor: pointer;
    font-size: 1rem;
}

.button:hover {
    background: var(--button-hover);
}

.text-sm {
    font-size: 0.875rem;
    line-height: 1.25rem;
}

.flex-wrap {
    flex-wrap: wrap;
}

/* Snaps list */
.snap-link {
    color: var(--link-color);
    text-decoration: none;
    font-weight: 600;
}

.snap-link:hover {
    text-decoration: underline;
}

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

/* Footer */
.footer {
    background: var(--footer-bg);
    padding: 1.5rem 0;
}

.version {
    font-size: 0.875rem;
    background: var(--version-bg);
    color: var(--version-text);
    padding: 0.25rem 0.5rem;
    border-radius: 9999px;
}

.footer-link {
    color: #9333ea;
    text-decoration: none;
}

body.dark-mode .footer-link {
    color: #c084fc;
}

.footer-link-about,
.footer-link-contact {
    color: #2563eb;
}

body.dark-mode .footer-link-about,
body.dark-mode .footer-link-contact {
    color: #60a5fa;
}

.footer-link:hover {
    text-decoration: underline;
}

.mt-4 {
    margin-top: 1rem;
}

@media (min-width: 768px) {
    .md\:mt-0 {
        margin-top: 0;
    }
}

/* Animations */
.fade-in {
    opacity: 0; /* Keep initial opacity 0 for animation */
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Add this to ensure content is visible on load until observed */
.fade-in:not(.visible) {
    opacity: 1 !important; /* Force visibility until IntersectionObserver adds .visible */
}

/* Raw button style */
.raw-button {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: var(--button-bg);
    color: var(--button-text);
    border: none;
    border-radius: 0.375rem;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}

.raw-button:hover {
    background: var(--button-hover);
}

/* Raw content style */
.raw-content {
    font-family: 'Courier New', Courier, monospace; /* Monospace for code-like appearance */
    line-height: 1.5;
    margin-bottom: 1rem;
}
/* Toolbar styles */
.toolbar-container {
    background-color: var(--card-bg); /* Match the card background */
    border-bottom: 1px solid var(--input-border); /* Subtle border matching input borders */
}

.toolbar {
    max-width: 1400px; /* Match container max-width */
    margin: 0 auto;
    padding: 0 0.5rem; /* Reduced padding */
    display: flex;
    justify-content: flex-end;
}

.toolbar-actions {
    display: flex;
    gap: 0.5rem;
}

.toolbar-item {
    display: flex;
    align-items: center;
    padding: 0.25rem 0.5rem;
    color: var(--text-color); /* Default text/icon color */
    text-decoration: none;
    font-size: 14px;
    border: 1px solid transparent;
    border-radius: 6px;
    transition: background-color 0.2s, color 0.2s;
}

.toolbar-item:hover {
    background-color: var(--input-bg); /* Subtle hover background from input style */
    color: var(--link-color); /* Match link color for hover */
}

/* Ensure dark mode has better initial contrast */
body.dark-mode .toolbar-item {
    color: #c9d1d9; /* Lighter gray for better contrast against dark background */
}

body.dark-mode .toolbar-item:hover {
    background-color: #2d3748; /* Darker hover for dark mode contrast */
    color: #58a6ff; /* Slightly brighter link color for hover in dark mode */
}

.toolbar-item i {
    margin-right: 0.25rem;
}

.toolbar-item:disabled {
    color: var(--gray-text); /* Use gray text for disabled state */
    cursor: not-allowed;
}