/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans JP', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fef7f7;
}

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

/* Header */
.header {
    background: linear-gradient(135deg, #ff69b4, #ff91c7);
    color: white;
    padding: 20px 0;
    text-align: center;
    box-shadow: 0 2px 10px rgba(255, 105, 180, 0.3);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    position: relative;
}

.mascot-container {
    position: relative;
    display: flex;
    align-items: center;
}

.mascot {
    width: 100px;
    height: 100px;
    border-radius: 15px;
    border: 3px solid white;
    background: white;
    padding: 8px;
    object-fit: contain;
    object-position: center;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.mascot.spinning {
    animation: spin 1s linear;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.header-text h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 5px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.header-text p {
    font-size: 1.2rem;
    font-weight: 300;
    opacity: 0.9;
}

.countdown-timer {
    background-color: white;
    color: #ff69b4;
    border-radius: 25px;
    padding: 10px 20px;
    margin-top: 15px;
    display: inline-block;
    font-size: 1.1rem;
    font-weight: 700;
    border: 2px solid #ffc1d6;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.countdown-timer .countdown-days {
    font-size: 1.5rem;
    margin: 0 5px;
}

.header-text h1, .header-text p {
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.header-text h1:hover, .header-text p:hover {
    opacity: 0.8;
}

.omikuji-result {
    position: absolute;
    top: 50%;
    left: 100%;
    transform: translateY(-50%);
    margin-left: 20px;
    background: rgba(255, 255, 255, 0.95);
    padding: 15px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    font-family: 'Times New Roman', 'Hiragino Mincho ProN', serif;
    font-size: 1rem;
    color: #333;
    width: 320px;
    opacity: 0;
    transition: opacity 0.5s ease;
    z-index: 1000;
    border: 2px solid #ff69b4;
    cursor: pointer;
    white-space: normal;
}

.omikuji-result.show {
    opacity: 1;
}

.omikuji-result:hover {
    background: rgba(255, 255, 255, 1);
    transform: translateY(-50%) scale(1.02);
}

.omikuji-result .fortune {
    font-size: 1.3rem;
    font-weight: bold;
    color: #ff69b4;
    margin-bottom: 10px;
}

.omikuji-result .message {
    line-height: 1.4;
}

/* Navigation */
.navigation {
    background: white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-menu {
    display: flex;
    justify-content: center;
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-menu li {
    margin: 0 10px;
}

.nav-menu a {
    display: block;
    padding: 15px 20px;
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: all 0.3s ease;
    border-radius: 5px;
}

.nav-menu a:hover {
    background: #ff69b4;
    color: white;
    transform: translateY(-2px);
}

/* Main Content */
.main {
    padding: 20px 0;
}

.section {
    margin-bottom: 40px;
}

.section h2 {
    text-align: center;
    font-size: 2rem;
    color: #ff69b4;
    margin-bottom: 30px;
    font-weight: 700;
}

/* Cards */
.card {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 5px 20px rgba(255, 105, 180, 0.15);
    border: 2px solid #ffebef;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(255, 105, 180, 0.25);
}

.card h3 {
    color: #ff69b4;
    font-size: 1.5rem;
    margin-bottom: 15px;
    font-weight: 600;
}

.card p {
    margin-bottom: 20px;
    color: #555;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

/* Buttons */
.btn {
    display: inline-block;
    background: linear-gradient(135deg, #ff69b4, #ff91c7);
    color: white;
    padding: 12px 25px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    text-align: center;
    box-shadow: 0 3px 10px rgba(255, 105, 180, 0.3);
}

.btn:hover {
    background: linear-gradient(135deg, #ff1493, #ff69b4);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 105, 180, 0.4);
}

.btn-secondary {
    background: linear-gradient(135deg, #dda0dd, #ff91c7);
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #ba55d3, #dda0dd);
}

.btn-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Flyer Section */
.flyer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.flyer {
    text-align: center;
    padding: 20px;
    border: 2px solid #ffebef;
    border-radius: 10px;
    background: #fef7f7;
}

.flyer-image {
    width: 100%;
    max-width: 200px;
    height: auto;
    border-radius: 10px;
    margin-bottom: 10px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.flyer-image:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 20px rgba(255, 105, 180, 0.3);
}

.flyer p {
    color: #ff69b4;
    font-weight: 500;
    margin: 0;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    overflow: auto; /* Allow scroll on modal */
}

.modal-content {
    position: relative;
    background-color: white;
    margin: auto;
    padding: 0; /* Remove padding */
    border-radius: 15px;
    width: auto;
    max-width: 90vw; /* 90% of viewport width */
    max-height: 90vh; /* 90% of viewport height */
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    top: 50%;
    transform: translateY(-50%);
}

#modalImage {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 15px;
}

.close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    z-index: 1001;
}

.close:hover,
.close:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
}

.close {
    position: absolute;
    top: 10px;
    right: 20px;
    color: #ff69b4;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
    z-index: 1001;
}

.close:hover {
    color: #ff1493;
}

#modalImage {
    width: 100%;
    max-width: 600px;
    height: auto;
    border-radius: 10px;
    margin-bottom: 15px;
}

#modalCaption {
    color: #ff69b4;
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0;
}

/* Footer */
.footer {
    background: #333;
    color: white;
    text-align: center;
    padding: 30px 0;
    margin-top: 50px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 15px;
    }
    
    .header-text h1 {
        font-size: 2rem;
    }
    
    .mascot {
        width: 80px;
        height: 80px;
    }
    
    .omikuji-result {
        position: fixed;
        top: 30%;
        left: 50%;
        right: auto;
        transform: translate(-50%, -50%);
        max-width: 90%;
        z-index: 1000;
        margin-left: 0;
    }
    
    .omikuji-result.show {
        right: auto;
    }
    
    .omikuji-result:hover {
        transform: translate(-50%, -50%) scale(1.02);
    }
    
    .nav-menu {
        flex-direction: column;
        align-items: center;
    }
    
    .nav-menu li {
        margin: 5px 0;
    }
    
    .nav-menu a {
        padding: 10px 15px;
    }
    
    .section h2 {
        font-size: 1.5rem;
    }
    
    .card {
        padding: 20px;
    }
    
    .card-grid {
        grid-template-columns: 1fr;
    }
    
    .btn-group {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        margin-bottom: 10px;
    }
    
    .flyer-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .header-text h1 {
        font-size: 1.8rem;
    }
    
    .header-text p {
        font-size: 1rem;
    }
    
    .nav-menu a {
        padding: 8px 12px;
        font-size: 0.9rem;
    }
    
    .section h2 {
        font-size: 1.3rem;
    }
    
    .card {
        padding: 15px;
    }
    
    .card h3 {
        font-size: 1.2rem;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section {
    animation: fadeIn 0.6s ease-out;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Focus styles for accessibility */
.btn:focus,
.nav-menu a:focus {
    outline: 3px solid #ff69b4;
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .navigation,
    .footer {
        display: none;
    }
    
    .card {
        break-inside: avoid;
    }
}