/* --- USER DASHBOARD --- */
.dashboard-container {
    padding: 2rem;
}
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}
.dashboard-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-soft);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-height: 180px;
    transition: box-shadow 0.2s;
}
.dashboard-card:hover {
    box-shadow: var(--shadow-hover);
}
.dashboard-card h2 {
    margin-top: 0;
    font-size: 1.3rem;
    color: var(--primary-color);
}
.dashboard-action {
    margin-top: 1rem;
    display: inline-block;
    background: var(--primary-color);
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    text-decoration: none;
    transition: background 0.2s;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
}
.dashboard-action:hover {
    background: var(--primary-hover);
}
/* koko/static/css/style.css */

/* --- 1. DESIGN VARIABLES (The Brand Soul) --- */
:root {
    /* Brand Colors */
    --primary-color: #ff4757;
    /* Koko Red: Energetic, Japanese Sun */
    --primary-hover: #ff6b81;
    --secondary-color: #2f3542;
    /* Slate: Professional text */
    --accent-color: #7bed9f;
    /* Green: Success/Nature */
    --warning-color: #ffa502;

    /* Backgrounds & Surfaces */
    --bg-body: #f1f2f6;
    /* Very light grey, easier on eyes than white */
    --bg-card: #ffffff;
    --bg-glass: rgba(255, 255, 255, 0.95);

    /* Typography */
    --font-main: 'Noto Sans JP', sans-serif;

    /* Shadows & Radius */
    --shadow-soft: 0 10px 25px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 15px 35px rgba(0, 0, 0, 0.1);
    --radius-md: 12px;
    --radius-lg: 20px;
    --navbar-height: 80px;

    /* Bright & Modern accents */
    --primary-glow: rgba(255, 71, 87, 0.35);
    --accent-sun: #ffb703;
    --accent-sky: #56ccf2;
    --accent-violet: #7c5cff;
    --accent-mint: #2ed573;
    --bg-gradient: radial-gradient(circle at 10% 10%, #fff7f8 0%, #ffffff 45%, #f4f8ff 100%);
    --glass-border: rgba(255, 255, 255, 0.6);
    --text-muted: #6c7a89;
}

/* --- 2. GLOBAL RESET & TYPOGRAPHY --- */
body {
    background-color: var(--bg-body);
    color: var(--secondary-color);
    font-family: var(--font-main);
    padding-top: var(--navbar-height);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    background-image: var(--bg-gradient);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    letter-spacing: -0.5px;
    color: var(--secondary-color);
}

a {
    text-decoration: none;
    transition: all 0.3s ease;
}

/* --- 2.1 MICRO-ANIMATIONS --- */
.enter-fade {
    opacity: 0;
    transform: translateY(10px);
    animation: enterFade 0.8s ease forwards;
}

.delay-1 {
    animation-delay: 0.1s;
}

.delay-2 {
    animation-delay: 0.25s;
}

.delay-3 {
    animation-delay: 0.4s;
}

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

/* --- 3. PROFESSIONAL NAVBAR (Sticky & Glassy) --- */
.navbar-koko {
    background-color: var(--bg-glass);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.03);
    height: var(--navbar-height);
    padding: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.8);
}

.navbar-brand {
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--primary-color) !important;
    letter-spacing: -1px;
}

.nav-link {
    font-weight: 500;
    color: var(--secondary-color) !important;
    margin: 0 10px;
    position: relative;
}

.nav-link:hover {
    color: var(--primary-color) !important;
}

/* --- 4. CARDS & CONTAINERS --- */
.card {
    border: none;
    border-radius: var(--radius-md);
    background: var(--bg-card);
    box-shadow: var(--shadow-soft);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
}

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

.card-header {
    background-color: transparent;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    font-weight: 600;
    padding: 1.5rem;
}

/* --- 5. BUTTONS & INPUTS --- */
.btn {
    border-radius: 8px;
    padding: 10px 24px;
    font-weight: 600;
    letter-spacing: 0.3px;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    box-shadow: 0 4px 15px rgba(255, 71, 87, 0.3);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
    transform: translateY(-2px);
}

.btn-google {
    background-color: #ffffff;
    color: #757575;
    border: 1px solid #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-google:hover {
    background-color: #f8f9fa;
    border-color: #ccc;
}

.form-control {
    border-radius: 8px;
    border: 1px solid #dfe4ea;
    padding: 12px 15px;
}

.form-control:focus {
    box-shadow: 0 0 0 3px rgba(255, 71, 87, 0.15);
    border-color: var(--primary-color);
}

/* --- 6. HERO SECTION --- */
.hero-section {
    background: linear-gradient(135deg, #fff0f1 0%, #ffffff 100%);
    padding: 80px 0;
    border-bottom-left-radius: 50px;
    border-bottom-right-radius: 50px;
    margin-bottom: 40px;
    position: relative;
    overflow: hidden;
}

.hero-section .hero-bg {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 80% 20%, rgba(255, 183, 3, 0.18) 0%, rgba(255, 183, 3, 0) 50%),
        radial-gradient(circle at 10% 80%, rgba(86, 204, 242, 0.18) 0%, rgba(86, 204, 242, 0) 55%);
    pointer-events: none;
    z-index: 0;
}

.hero-section .container {
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: clamp(2.4rem, 3vw + 1rem, 3.4rem);
}

.japan-highlight {
    background: linear-gradient(90deg, #ff4757, #ffb703);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.search-card {
    background: linear-gradient(135deg, rgba(255, 71, 87, 0.92), rgba(124, 92, 255, 0.9));
    border: 1px solid rgba(255, 255, 255, 0.3);
    position: relative;
}

.search-card::after {
    content: '';
    position: absolute;
    inset: -30px;
    background: radial-gradient(circle at top left, rgba(255, 255, 255, 0.2), transparent 55%);
    pointer-events: none;
}

.search-grid {
    display: grid;
    grid-template-columns: 1.3fr 0.7fr;
    gap: 24px;
    align-items: stretch;
    position: relative;
    z-index: 1;
}

.search-col {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.search-weather {
    display: flex;
    align-items: stretch;
}

@media (max-width: 991px) {
    .search-grid {
        grid-template-columns: 1fr;
    }
}

.location-search-form .form-control {
    font-weight: 500;
}

.card--festival {
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.7);
}

.card--festival-soft {
    border-radius: 28px;
    box-shadow: 0 25px 60px rgba(124, 92, 255, 0.2);
}

.glow-accent {
    box-shadow: 0 18px 40px rgba(255, 71, 87, 0.18);
}

/* --- 6.1 CATEGORY CARDS --- */
.categories-section .card {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid var(--glass-border);
}

.icon-bubble {
    width: 56px;
    height: 56px;
    border-radius: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: #ffffff;
    margin-bottom: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
}

.grad-food {
    background: linear-gradient(135deg, #ff7b7b, #ffb703);
}

.grad-sports {
    background: linear-gradient(135deg, #2ed573, #1dd1a1);
}

.grad-culture {
    background: linear-gradient(135deg, #7c5cff, #5f27cd);
}

.grad-others {
    background: linear-gradient(135deg, #56ccf2, #2f80ed);
}

.hover-shadow:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.12);
}

.transition {
    transition: all 0.3s ease;
}

/* --- 7. EVENT SPECIFIC --- */
.event-img-wrapper {
    height: 220px;
    overflow: hidden;
    position: relative;
}

.event-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.card:hover .event-img-wrapper img {
    transform: scale(1.05);
}

.category-tag {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.9);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--secondary-color);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.event-img-wrapper::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.35));
    opacity: 0.4;
    pointer-events: none;
}

.confetti {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.confetti span {
    position: absolute;
    width: 8px;
    height: 14px;
    border-radius: 4px;
    animation: confettiFloat 4s linear infinite;
    opacity: 0.8;
}

.confetti span:nth-child(1) {
    left: 15%;
    top: -10px;
    background: #ff4757;
    animation-delay: 0s;
}

.confetti span:nth-child(2) {
    left: 40%;
    top: -18px;
    background: #7bed9f;
    animation-delay: 1s;
}

.confetti span:nth-child(3) {
    left: 70%;
    top: -12px;
    background: #56ccf2;
    animation-delay: 2s;
}

.confetti span:nth-child(4) {
    left: 85%;
    top: -16px;
    background: #ffb703;
    animation-delay: 0.6s;
}

@keyframes confettiFloat {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 0.9;
    }

    100% {
        transform: translateY(240px) rotate(180deg);
        opacity: 0;
    }
}

/* --- 8.1 WEATHER WIDGET --- */
.weather-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(244, 248, 255, 0.95));
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 22px;
    position: relative;
    overflow: hidden;
}

.weather-card::after {
    content: '';
    position: absolute;
    inset: -20px;
    background: radial-gradient(circle at 80% 20%, rgba(86, 204, 242, 0.18), transparent 60%);
    z-index: 0;
}

.weather-card>* {
    position: relative;
    z-index: 1;
}

.weather-eyebrow {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.weather-location {
    font-weight: 700;
    margin-bottom: 2px;
}

.weather-subtitle {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.weather-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #ffb703, #ff7b7b);
    color: #ffffff;
    font-size: 1.5rem;
    box-shadow: 0 10px 25px rgba(255, 183, 3, 0.3);
}

.weather-temp {
    font-size: 2.6rem;
    font-weight: 800;
    color: var(--secondary-color);
    display: flex;
    align-items: flex-start;
    gap: 4px;
}

.weather-temp .deg {
    font-size: 1.2rem;
    margin-top: 6px;
    color: var(--text-muted);
}

.weather-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}

.weather-chip {
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(0, 0, 0, 0.05);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--secondary-color);
}

.weather-footer {
    margin-top: 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.weather-card--compact {
    padding: 18px;
    min-height: 100%;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.weather-card--compact .weather-eyebrow,
.weather-card--compact .weather-subtitle,
.weather-card--compact .weather-note {
    color: rgba(255, 255, 255, 0.8);
}

.weather-card--compact .weather-location,
.weather-card--compact .weather-temp,
.weather-card--compact .weather-chip {
    color: #ffffff;
}

.weather-card--compact .weather-chip {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.15);
}

.weather-card--compact .weather-icon {
    background: linear-gradient(135deg, rgba(255, 183, 3, 0.95), rgba(255, 123, 123, 0.95));
    box-shadow: 0 12px 30px rgba(255, 183, 3, 0.35);
}

.weather-card--compact .btn {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.35);
    color: #ffffff;
}

.weather-card--compact .btn:hover {
    background: rgba(255, 255, 255, 0.35);
    color: #ffffff;
}

.weather-note {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.weather-skeleton {
    height: 12px;
    border-radius: 8px;
    background: linear-gradient(90deg, #f2f3f7 25%, #e6e9f0 37%, #f2f3f7 63%);
    background-size: 400% 100%;
    animation: skeleton 1.4s ease infinite;
}

@keyframes skeleton {
    0% {
        background-position: 100% 0;
    }

    100% {
        background-position: 0 0;
    }
}

/* --- 8.2 FESTIVAL STRIP --- */
.festival-strip {
    height: 6px;
    background: linear-gradient(90deg, #ff4757, #ffb703, #2ed573, #56ccf2, #7c5cff);
    box-shadow: 0 10px 30px rgba(255, 71, 87, 0.25);
}

/* --- 8. UTILITIES --- */
.text-gradient {
    background: linear-gradient(45deg, var(--primary-color), #ff9f43);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.avatar-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

#map-canvas,
#map-canvas-all {
    width: 100%;
    height: 400px;
    min-height: 400px;
    max-height: 400px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-soft);
}