/* Mattcool - Main Stylesheet */

:root {
    --color-primary: #2563eb;
    --color-primary-dark: #1d4ed8;
    --color-secondary: #64748b;
    --color-accent: #06b6d4;
    --color-success: #22c55e;
    --color-danger: #ef4444;
    --color-warning: #f59e0b;

    --color-bg: #f8fafc;
    --color-bg-alt: #ffffff;
    --color-text: #1e293b;
    --color-text-muted: #64748b;
    --color-border: #e2e8f0;

    --color-cold: #3b82f6;
    --color-mattcool: #06b6d4;
    --color-room: #a3a3a3;
    --color-lukewarm: #f59e0b;
    --color-hot: #ef4444;

    --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-mono: 'SF Mono', Monaco, 'Cascadia Code', monospace;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1), 0 2px 4px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1), 0 4px 6px rgba(0, 0, 0, 0.05);

    --radius-sm: 0.25rem;
    --radius: 0.5rem;
    --radius-lg: 1rem;
}

/* Reset */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    line-height: 1.5;
}

body {
    font-family: var(--font-sans);
    color: var(--color-text);
    background: var(--color-bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

img {
    max-width: 100%;
    height: auto;
}

a {
    color: var(--color-primary);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Header */
.site-header {
    background: var(--color-bg-alt);
    border-bottom: 1px solid var(--color-border);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.logo {
    display: flex;
    flex-direction: column;
    text-decoration: none;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-text);
}

.logo-tagline {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.main-nav {
    display: flex;
    gap: 1.5rem;
}

.main-nav a {
    color: var(--color-text);
    font-weight: 500;
    padding: 0.5rem 0;
    border-bottom: 2px solid transparent;
}

.main-nav a:hover {
    color: var(--color-primary);
    text-decoration: none;
    border-bottom-color: var(--color-primary);
}

.admin-link {
    background: var(--color-primary);
    color: white !important;
    padding: 0.5rem 1rem !important;
    border-radius: var(--radius);
}

.admin-link:hover {
    background: var(--color-primary-dark);
}

/* Main */
.site-main {
    flex: 1;
    padding: 2rem 0;
}

/* Footer */
.site-footer {
    background: var(--color-text);
    color: white;
    padding: 2rem 0;
    text-align: center;
}

.footer-tagline {
    color: var(--color-accent);
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
    color: white;
    padding: 4rem 2rem;
    border-radius: var(--radius-lg);
    margin-bottom: 3rem;
    text-align: center;
}

.hero h1 {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

.hero .highlight {
    color: var(--color-warning);
}

.hero-definition {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.hero-meaning {
    font-size: 1rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto 1rem;
}

.hero-etymology {
    font-size: 0.875rem;
    opacity: 0.8;
    font-style: italic;
}

/* Sections */
section {
    margin-bottom: 3rem;
}

section h2 {
    font-size: 1.75rem;
    margin-bottom: 1rem;
    color: var(--color-text);
}

.section-intro {
    color: var(--color-text-muted);
    margin-bottom: 1.5rem;
}

/* Intro Section */
.intro {
    background: var(--color-bg-alt);
    padding: 2rem;
    border-radius: var(--radius);
    border: 1px solid var(--color-border);
}

.intro p {
    margin-bottom: 1rem;
    line-height: 1.8;
}

.usage-examples {
    background: var(--color-bg);
    padding: 1.5rem;
    border-radius: var(--radius);
    margin-top: 1.5rem;
}

.usage-examples h3 {
    font-size: 1rem;
    margin-bottom: 0.75rem;
}

.usage-examples ul {
    list-style-position: inside;
}

.usage-examples li {
    margin-bottom: 0.5rem;
    font-style: italic;
    color: var(--color-text-muted);
}

/* Entry Grid */
.entry-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

.entry-card {
    background: var(--color-bg-alt);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.2s, box-shadow 0.2s;
}

.entry-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.entry-image {
    aspect-ratio: 16/10;
    overflow: hidden;
    background: var(--color-bg);
}

.entry-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.entry-image.placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-muted);
}

.entry-content {
    padding: 1.25rem;
}

.entry-content h3 {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
}

.entry-content h3 a {
    color: var(--color-text);
}

.entry-location {
    font-size: 0.875rem;
    color: var(--color-primary);
    margin-bottom: 0.25rem;
}

.entry-date {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    margin-bottom: 0.75rem;
}

.entry-excerpt {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.read-more {
    font-size: 0.875rem;
    font-weight: 500;
}

/* Country Tags */
.country-tags,
.country-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.country-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--color-bg-alt);
    border: 1px solid var(--color-border);
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.875rem;
    color: var(--color-text);
    transition: all 0.2s;
}

.country-tag:hover,
.country-tag.active {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: white;
    text-decoration: none;
}

.country-tag .count {
    background: rgba(0, 0, 0, 0.1);
    padding: 0.125rem 0.5rem;
    border-radius: 1rem;
    font-size: 0.75rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    background: var(--color-primary);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
    text-decoration: none;
}

.btn:hover {
    background: var(--color-primary-dark);
    text-decoration: none;
}

.btn-secondary {
    background: var(--color-secondary);
}

.btn-secondary:hover {
    background: #475569;
}

.btn-danger {
    background: var(--color-danger);
}

.btn-danger:hover {
    background: #dc2626;
}

.btn-small {
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
}

.btn-full {
    width: 100%;
}

.view-all {
    text-align: center;
    margin-top: 2rem;
}

/* Full Entry Page */
.entry-full {
    max-width: 800px;
    margin: 0 auto;
}

.breadcrumb {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    margin-bottom: 1.5rem;
}

.entry-header {
    margin-bottom: 2rem;
}

.entry-header h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.entry-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    color: var(--color-text-muted);
    font-size: 0.875rem;
}

.entry-meta span::before {
    content: '|';
    margin-right: 1rem;
    color: var(--color-border);
}

.entry-meta span:first-child::before {
    display: none;
}

.draft-notice {
    background: var(--color-warning);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    font-size: 0.875rem;
    margin-top: 1rem;
    display: inline-block;
}

.admin-actions {
    margin-top: 1rem;
}

.entry-main-image {
    margin: 0 0 2rem 0;
}

.entry-main-image img {
    width: 100%;
    border-radius: var(--radius);
}

.entry-body {
    font-size: 1.125rem;
    line-height: 1.8;
    margin-bottom: 2rem;
}

.entry-footer {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    padding-top: 2rem;
    border-top: 1px solid var(--color-border);
}

/* About Page */
.about-page {
    max-width: 800px;
    margin: 0 auto;
}

.about-section {
    margin-bottom: 2.5rem;
}

.about-section h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--color-primary);
}

.about-section p {
    margin-bottom: 1rem;
    line-height: 1.8;
}

/* Temperature Scale */
.temperature-scale {
    background: var(--color-bg-alt);
    padding: 2rem;
    border-radius: var(--radius);
    border: 1px solid var(--color-border);
}

.temp-spectrum {
    display: flex;
    justify-content: space-between;
    margin-top: 1.5rem;
    gap: 0.5rem;
}

.temp-item {
    flex: 1;
    padding: 1rem 0.5rem;
    text-align: center;
    border-radius: var(--radius);
    color: white;
}

.temp-item.cold { background: var(--color-cold); }
.temp-item.mattcool { background: var(--color-mattcool); }
.temp-item.room { background: var(--color-room); }
.temp-item.lukewarm { background: var(--color-lukewarm); }
.temp-item.hot { background: var(--color-hot); }

.temp-label {
    display: block;
    font-weight: 600;
    font-size: 0.875rem;
}

.temp-desc {
    display: block;
    font-size: 0.75rem;
    opacity: 0.9;
}

/* Travels Page */
.travels-page h1 {
    margin-bottom: 0.5rem;
}

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

.country-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--color-border);
}

.country-description {
    color: var(--color-text-muted);
    margin-top: 0.5rem;
}

.no-entries {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--color-bg-alt);
    border-radius: var(--radius);
}

/* Error Page */
.error-page {
    text-align: center;
    padding: 4rem 2rem;
}

.error-page h1 {
    margin-bottom: 1rem;
}

.error-page p {
    margin-bottom: 1.5rem;
    color: var(--color-text-muted);
}

/* Alerts */
.alert {
    padding: 1rem 1.5rem;
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
}

.alert-error {
    background: #fef2f2;
    color: var(--color-danger);
    border: 1px solid #fecaca;
}

.alert-success {
    background: #f0fdf4;
    color: var(--color-success);
    border: 1px solid #bbf7d0;
}

/* Forms */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="date"],
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--color-primary);
}

.form-help {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    margin-top: 0.5rem;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: normal;
    cursor: pointer;
}

.checkbox-group input[type="checkbox"] {
    width: 1.25rem;
    height: 1.25rem;
}

.hidden {
    display: none !important;
}

/* Responsive */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }

    .header-content {
        flex-direction: column;
        text-align: center;
    }

    .main-nav {
        gap: 1rem;
    }

    .entry-grid {
        grid-template-columns: 1fr;
    }

    .temp-spectrum {
        flex-direction: column;
    }
}
