:root {
    --primary-gradient: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    --secondary-gradient: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    --surface-color: #ffffff;
    --background-color: #f3f4f6;
    --text-primary: #1f2937;
    --text-secondary: #4b5563;
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
}

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

body {
    font-family: 'Inter', 'Noto Sans JP', sans-serif;
    background-color: var(--background-color);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

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

header {
    background: var(--surface-color);
    padding: 1.25rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.9);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: center;
}

h1 {
    font-size: 1.5rem;
    font-weight: 800;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.025em;
}

.hero-section {
    background: var(--primary-gradient);
    color: white;
    padding: 3rem 0 4rem;
    text-align: center;
    margin-bottom: -2rem;
}

.hero-title {
    font-size: 2.25rem;
    font-weight: 800;
    margin-bottom: 1rem;
    letter-spacing: -0.025em;
}

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

.main-content {
    position: relative;
    z-index: 10;
    margin-top: -2rem;
    padding-bottom: 3rem;
}

/* Modern Style CSS */

/* Search Section - Floating Card Style */
.filter-section {
    background: var(--surface-color);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    margin-bottom: 2rem;
    border: 1px solid var(--border-color);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.filter-section:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.filter-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Inputs & Buttons */
.search-input-container {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.keyword-input {
    flex: 1;
    min-width: 250px;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 1rem;
    outline: none;
    transition: all 0.2s ease;
    background: #f9fafb;
}

.keyword-input:focus {
    border-color: #8b5cf6;
    background: white;
    box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.1);
}

.search-btn {
    padding: 0.75rem 2rem;
    background: var(--primary-gradient);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 6px -1px rgba(124, 58, 237, 0.3);
}

.search-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 8px -1px rgba(124, 58, 237, 0.4);
}

.reset-btn {
    padding: 0.75rem 1.5rem;
    background: #e5e7eb;
    color: var(--text-secondary);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
}

.reset-btn:hover {
    background: #d1d5db;
}

.search-hint {
    margin-top: 0.75rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Accordion */
.accordion-header {
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
    padding: 0.5rem 0;
}

.accordion-icon {
    font-size: 0.875rem;
    color: #8b5cf6;
    background: #f3f4f6;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: transform 0.3s ease;
}

.accordion-header:not(.collapsed) .accordion-icon {
    transform: rotate(180deg);
}

.accordion-content {
    margin-top: 1rem;
    animation: slideDown 0.3s ease-out;
}

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

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

/* Prefecture Grid */
.subsection-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
}

.prefecture-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 0.75rem;
}

.prefecture-link {
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    background: white;
    color: var(--text-primary);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
    font-size: 0.9375rem;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.prefecture-link:hover {
    border-color: #8b5cf6;
    color: #8b5cf6;
    background: #f5f3ff;
}

.prefecture-link.active {
    background: var(--primary-gradient);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 6px -1px rgba(124, 58, 237, 0.3);
}

.toggle-all-btn {
    width: 100%;
    padding: 1rem;
    margin-top: 1rem;
    background: white;
    border: 2px dashed var(--border-color);
    color: var(--text-secondary);
    border-radius: var(--radius-md);
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
}

.toggle-all-btn:hover {
    border-color: #8b5cf6;
    color: #8b5cf6;
}

/* Date Selection */
.date-buttons {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.75rem;
    margin-bottom: 1rem;
}

@media (max-width: 768px) {
    .date-buttons {
        grid-template-columns: repeat(4, 1fr);
    }
}

.date-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem 0.5rem;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s;
    min-height: 90px;
    position: relative;
    overflow: hidden;
}

.date-btn:hover {
    transform: translateY(-2px);
    border-color: #8b5cf6;
    box-shadow: var(--shadow-md);
}

.date-btn .date-day {
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 0.25rem;
}

.date-btn .date-weekday {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.date-btn.active {
    background: var(--primary-gradient);
    border-color: transparent;
    color: white;
    box-shadow: var(--shadow-md);
}

.date-btn.active .date-weekday {
    color: rgba(255, 255, 255, 0.9);
}

.date-btn.today::before {
    content: "TODAY";
    position: absolute;
    top: 0;
    left: 0;
    background: #ef4444;
    color: white;
    font-size: 0.6rem;
    font-weight: 800;
    padding: 2px 6px;
    border-bottom-right-radius: 6px;
}

.date-btn.sunday .date-weekday {
    color: #ef4444;
}

.date-btn.saturday .date-weekday {
    color: #3b82f6;
}

.date-btn.active.sunday .date-weekday,
.date-btn.active.saturday .date-weekday {
    color: white;
}

/* Event Cards */
.events-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.event-card {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
}

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

.event-card-header {
    background: white;
    padding: 1.25rem;
    border-bottom: 1px solid var(--border-color);
    position: relative;
}

.event-card-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--primary-gradient);
}

.event-store-name {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    line-height: 1.4;
}

.event-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

.event-meta-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    background: #f3f4f6;
    padding: 2px 8px;
    border-radius: 4px;
}

.event-card-body {
    padding: 1.25rem;
    flex: 1;
}

.event-title {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    line-height: 1.5;
}



.badge,
.event-type-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 9999px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    vertical-align: middle;
}

.badge-special,
.event-type-old {
    background: linear-gradient(135deg, #ef4444 0%, #f43f5e 100%);
    color: white;
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.3);
}

.badge-rainbow,
.event-type-anniversary {
    background: linear-gradient(45deg, #ff3333, #ffaa33, #33cc33, #3399ff, #cc33ff);
    background-size: 200% 200%;
    animation: rainbow-animation 3s ease infinite;
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

@keyframes rainbow-animation {
    0% {
        background-position: 0% 50%
    }

    50% {
        background-position: 100% 50%
    }

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

.event-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--border-color);
    background: #f9fafb;
    font-size: 0.75rem;
    color: var(--text-secondary);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.event-link {
    color: #8b5cf6;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    transition: color 0.2s;
}

.event-link:hover {
    color: #7c3aed;
}

/* Pagination */
.pagination-container {
    margin-top: 3rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.pagination-buttons {
    display: flex;
    gap: 0.5rem;
}

.pagination-numbers {
    display: flex;
    gap: 0.5rem;
}

.pagination-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: white;
    color: var(--text-primary);
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
}

.pagination-btn:hover:not(:disabled) {
    border-color: #8b5cf6;
    color: #8b5cf6;
    background: #f5f3ff;
}

.pagination-btn.active {
    background: var(--primary-gradient);
    color: white;
    border-color: transparent;
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Status & Skeleton */
.status {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.skeleton-loader {
    background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 50%, #f3f4f6 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-lg);
    width: 100%;
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }

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

/* SNS Share */
.sns-share-section {
    margin-top: 4rem;
    text-align: center;
    padding: 3rem 1rem;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.sns-share-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.5rem;
}

.sns-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 9999px;
    border: none;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s;
}

.sns-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.sns-x {
    background: #000;
}

.sns-facebook {
    background: #1877f2;
}

.sns-line {
    background: #00c300;
}

/* Responsive adjustments */
@media (max-width: 640px) {
    .hero-title {
        font-size: 1.75rem;
    }

    .hero-section {
        padding: 2rem 0 3rem;
    }

    .search-input-container {
        flex-direction: column;
    }

    .keyword-input {
        min-width: 100%;
    }

    .search-btn {
        width: 100%;
    }

    .events-container {
        grid-template-columns: 1fr;
    }

    /* .nav-menu display: none removed to allow hamburger menu */
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1001;
    padding: 0;
}

.mobile-menu-btn span {
    width: 100%;
    height: 3px;
    background: var(--text-primary);
    border-radius: 3px;
    transition: all 0.3s ease;
}

/* Mobile Nav Styles */
@media (max-width: 768px) {
    .mobile-menu-btn {
        display: flex;
    }

    .nav-menu {
        display: flex;
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background: rgba(255, 255, 255, 0.98);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2rem;
        transition: right 0.3s ease;
        z-index: 1000;
        padding: 2rem;
        backdrop-filter: blur(10px);
    }

    .nav-menu.active {
        right: 0;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    }

    .nav-link {
        font-size: 1.25rem;
    }

    /* Animation for hamburger icon */
    .mobile-menu-btn.active span:nth-child(1) {
        transform: translateY(9px) rotate(45deg);
    }

    .mobile-menu-btn.active span:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-btn.active span:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);
    }
}

/* Navigation */
.nav-brand {
    font-size: 1.5rem;
    font-weight: 800;
    text-decoration: none;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-menu {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9375rem;
    transition: color 0.2s;
    position: relative;
}

.nav-link:hover {
    color: #8b5cf6;
}

.nav-link.active {
    color: #8b5cf6;
}

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

/* Footer */
footer {
    background: white;
    border-top: 1px solid var(--border-color);
    padding: 3rem 0;
    margin-top: 4rem;
    color: var(--text-secondary);
}

.footer-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    text-align: center;
}

.footer-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
}

.footer-nav a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9375rem;
    transition: color 0.2s;
}

.footer-nav a:hover {
    color: #8b5cf6;
}

.copyright {
    font-size: 0.875rem;
    color: #9ca3af;
}