:root {
    --bg: #FAF8F5;
    --surface: #FFFFFF;
    --surface-alt: #F0EDE8;
    --primary: #8B2635;
    --primary-light: #A84050;
    --primary-hover: #721E2B;
    --secondary: #2C5F2D;
    --secondary-light: #3A7D3B;
    --accent: #D4A574;
    --accent-light: #E8C9A8;
    --text: #1A1A2E;
    --text-muted: #6B7280;
    --text-light: #9CA3AF;
    --border: #E5E1DC;
    --border-light: #F0EDE8;
    --danger: #DC2626;
    --success: #16A34A;
    --warning: #F59E0B;
    --info: #3B82F6;
    --radius: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.07), 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);
    --font-body: 'Inter', system-ui, sans-serif;
    --font-heading: 'Playfair Display', Georgia, serif;
    --transition: 0.2s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

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

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

a:hover {
    color: var(--primary-hover);
}

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.3;
    color: var(--text);
}

h1 { font-size: 2.25rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.35rem; }
h4 { font-size: 1.1rem; }

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

/* ====== NAVBAR ====== */
.navbar {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow);
}

.navbar-inner {
    display: flex;
    align-items: center;
    height: 64px;
    gap: 24px;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
    flex-shrink: 0;
}

.brand-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    font-size: 1.1rem;
    font-weight: 700;
}

.navbar-nav {
    display: flex;
    list-style: none;
    gap: 4px;
    flex: 1;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    padding: 8px 14px;
    border-radius: var(--radius);
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 500;
    transition: all var(--transition);
}

.nav-link:hover {
    color: var(--primary);
    background: var(--surface-alt);
}

.nav-admin {
    color: var(--danger);
}

.navbar-auth {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.nav-user {
    color: var(--text) !important;
    font-weight: 600;
}

.navbar-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.navbar-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: var(--transition);
}

/* ====== MAIN ====== */
.main-content {
    flex: 1;
    padding: 32px 0;
}

/* ====== FOOTER ====== */
.footer {
    background: var(--surface);
    border-top: 1px solid var(--border);
    padding: 32px 0;
    margin-top: auto;
}

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

.footer-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--text);
    flex-wrap: wrap;
}

.footer-copy {
    width: 100%;
    font-size: 0.85rem;
    color: var(--text-muted);
    font-family: var(--font-body);
    font-weight: 400;
    margin-top: 4px;
}

.footer-links {
    display: flex;
    gap: 20px;
}

.footer-links a {
    color: var(--text-muted);
    font-size: 0.9rem;
}

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

/* ====== HERO ====== */
.hero {
    text-align: center;
    padding: 80px 20px;
    background: linear-gradient(135deg, var(--surface-alt) 0%, var(--surface) 50%, var(--accent-light) 100%);
    border-radius: var(--radius-xl);
    margin-bottom: 48px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '合気道';
    position: absolute;
    right: -20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12rem;
    font-weight: 700;
    color: var(--primary);
    opacity: 0.04;
    font-family: var(--font-heading);
    pointer-events: none;
}

.hero h1 {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 12px;
}

.hero p {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 32px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ====== SECTION ====== */
.section {
    margin-bottom: 48px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.section-header h2 {
    position: relative;
    padding-left: 16px;
}

.section-header h2::before {
    content: '';
    position: absolute;
    left: 0;
    top: 4px;
    bottom: 4px;
    width: 4px;
    background: var(--primary);
    border-radius: 2px;
}

/* ====== GRID ====== */
.grid {
    display: grid;
    gap: 24px;
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* ====== FLASH MESSAGES ====== */
.flash-messages {
    margin-bottom: 24px;
}

.alert {
    padding: 14px 20px;
    border-radius: var(--radius);
    font-size: 0.95rem;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.alert-success { background: #ECFDF5; color: #065F46; border-left: 4px solid var(--success); }
.alert-danger { background: #FEF2F2; color: #991B1B; border-left: 4px solid var(--danger); }
.alert-warning { background: #FFFBEB; color: #92400E; border-left: 4px solid var(--warning); }
.alert-info { background: #EFF6FF; color: #1E40AF; border-left: 4px solid var(--info); }

.alert-close {
    background: none;
    border: none;
    font-size: 1.3rem;
    cursor: pointer;
    color: inherit;
    opacity: 0.5;
    padding: 0 4px;
}

.alert-close:hover { opacity: 1; }

/* ====== FEATURES ====== */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    margin-bottom: 48px;
}

.feature-card {
    text-align: center;
    padding: 32px 24px;
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    transition: transform var(--transition), box-shadow var(--transition);
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    display: block;
}

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

.feature-card:hover h3 {
    color: var(--primary);
}

.feature-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface-alt);
    border-radius: 50%;
    margin: 0 auto 16px;
    font-size: 1.5rem;
}

.feature-card h3 {
    margin-bottom: 8px;
}

.feature-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* ====== RESPONSIVE ====== */
@media (max-width: 768px) {
    .navbar-toggle {
        display: flex;
    }

    .navbar-nav {
        display: none;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        flex-direction: column;
        background: var(--surface);
        border-bottom: 1px solid var(--border);
        padding: 12px 20px;
        box-shadow: var(--shadow-md);
    }

    .navbar-nav.active {
        display: flex;
    }

    .navbar-auth {
        display: none;
    }

    .navbar-nav.active + .navbar-auth {
        display: flex;
    }

    .navbar-inner {
        flex-wrap: wrap;
        position: relative;
    }

    .hero h1 { font-size: 2rem; }
    .hero { padding: 48px 16px; }
    .hero::before { display: none; }

    .grid-2, .grid-3, .grid-4 {
        grid-template-columns: 1fr;
    }

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

    .footer-inner {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }

    .section-header {
        flex-direction: column;
        gap: 8px;
        align-items: flex-start;
    }

    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.4rem; }
}

@media (max-width: 480px) {
    .container {
        padding: 0 12px;
    }

    .hero h1 { font-size: 1.6rem; }
}
