/* =================================
   氷見の旬カレンダー - スタイル
   ================================= */

/* CSS Variables */
:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-card: rgba(20, 25, 35, 0.9);
    --bg-card-hover: rgba(30, 40, 55, 0.95);

    --text-primary: #e8edf5;
    --text-secondary: #8899bb;
    --text-muted: #5a6a8a;

    --accent-cyan: #00ffff;
    --accent-blue: #4a9eff;
    --accent-green: #22c55e;
    --accent-orange: #ff8c42;
    --accent-pink: #ff6b9d;

    --border-color: rgba(0, 255, 255, 0.15);
    --border-color-hover: rgba(0, 255, 255, 0.3);

    --shadow-glow: 0 0 30px rgba(0, 255, 255, 0.2);
    --shadow-card: 0 10px 40px rgba(0, 0, 0, 0.4);

    --font-main: 'Noto Sans JP', sans-serif;
    --font-display: 'Oswald', sans-serif;

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100svh;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* Background Pattern */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(ellipse at 20% 20%, rgba(0, 255, 255, 0.05) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(74, 158, 255, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

/* Container */
.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px 16px;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 32px;
}

.header-badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
    color: var(--bg-primary);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.header h1 {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 6vw, 2.4rem);
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
}

.header-subtitle {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Section */
.section {
    margin-bottom: 40px;
}

.section-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-title::before {
    content: '';
    width: 4px;
    height: 20px;
    background: linear-gradient(180deg, var(--accent-cyan), var(--accent-blue));
    border-radius: 2px;
}

/* =================================
   Gacha Section
   ================================= */
.gacha-container {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 24px;
    border: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
}

.gacha-slot {
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.gacha-slot.spinning {
    animation: slotGlow 0.3s ease-in-out infinite;
}

@keyframes slotGlow {
    0%, 100% { box-shadow: inset 0 0 20px rgba(0, 255, 255, 0.1); }
    50% { box-shadow: inset 0 0 30px rgba(0, 255, 255, 0.2); }
}

.slot-item {
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slotSlide 0.08s ease-out;
}

@keyframes slotSlide {
    from { transform: translateY(-20px); opacity: 0.5; }
    to { transform: translateY(0); opacity: 1; }
}

.slot-emoji {
    font-size: 2rem;
}

.slot-name {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--accent-cyan);
}

.slot-placeholder {
    color: var(--text-muted);
    font-size: 1rem;
}

.gacha-button {
    width: 100%;
    padding: 16px 24px;
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
    border: none;
    border-radius: var(--radius-md);
    color: var(--bg-primary);
    font-family: var(--font-main);
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.gacha-button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.gacha-button:active:not(:disabled) {
    transform: translateY(0);
}

.gacha-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.gacha-button.spinning {
    animation: buttonPulse 0.5s ease-in-out infinite;
}

@keyframes buttonPulse {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

/* Gacha Result */
.gacha-result {
    margin-top: 24px;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s ease;
}

.gacha-result.show {
    opacity: 1;
    transform: translateY(0);
}

/* Fish Card */
.fish-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.fish-image-container {
    position: relative;
    width: 100%;
    height: 180px;
    overflow: hidden;
}

.fish-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.fish-image-container .badge {
    position: absolute;
    top: 12px;
    right: 12px;
}

.fish-info {
    padding: 20px;
}

.fish-name {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.fish-name-en {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.fish-season {
    display: inline-block;
    background: rgba(0, 255, 255, 0.1);
    color: var(--accent-cyan);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    margin-bottom: 12px;
}

.fish-description {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 16px;
    line-height: 1.7;
}

.fish-trivia {
    background: rgba(74, 158, 255, 0.1);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    border-left: 3px solid var(--accent-blue);
}

.trivia-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--accent-blue);
    margin-bottom: 6px;
}

.fish-trivia p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Badge */
.badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
}

.badge.season-now {
    background: linear-gradient(135deg, var(--accent-green), #10b981);
    color: white;
    animation: badgePulse 2s ease-in-out infinite;
}

@keyframes badgePulse {
    0%, 100% { box-shadow: 0 0 10px rgba(34, 197, 94, 0.3); }
    50% { box-shadow: 0 0 20px rgba(34, 197, 94, 0.5); }
}

/* =================================
   Countdown Section
   ================================= */
.countdown-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.countdown-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 16px 12px;
    border: 1px solid var(--border-color);
    text-align: center;
    transition: all 0.3s ease;
}

.countdown-card:hover {
    border-color: var(--border-color-hover);
    transform: translateY(-2px);
}

.countdown-header {
    margin-bottom: 12px;
}

.countdown-name {
    display: block;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.countdown-name-en {
    display: block;
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.countdown-value {
    font-family: var(--font-display);
}

.countdown-value strong {
    font-size: 1.8rem;
    color: var(--accent-cyan);
    text-shadow: 0 0 20px rgba(0, 255, 255, 0.3);
}

.countdown-days {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.countdown-soon {
    color: var(--accent-orange);
    font-size: 0.9rem;
}

.countdown-soon strong {
    color: var(--accent-orange);
    text-shadow: 0 0 20px rgba(255, 140, 66, 0.3);
}

.in-season {
    display: inline-block;
    background: linear-gradient(135deg, var(--accent-green), #10b981);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 0.95rem;
    font-weight: 700;
    animation: seasonGlow 2s ease-in-out infinite;
}

@keyframes seasonGlow {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.2); }
}

/* =================================
   Calendar Section
   ================================= */
.month-buttons {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 8px;
    margin-bottom: 20px;
}

.month-button {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 10px 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.month-button:hover {
    border-color: var(--border-color-hover);
    background: var(--bg-card-hover);
}

.month-button.active {
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
    border-color: transparent;
}

.month-number {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
}

.month-button.active .month-number {
    color: var(--bg-primary);
}

.month-label {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.month-button.active .month-label {
    color: var(--bg-primary);
}

.fish-count {
    font-size: 0.65rem;
    color: var(--accent-cyan);
    background: rgba(0, 255, 255, 0.1);
    padding: 2px 6px;
    border-radius: 10px;
    margin-top: 2px;
}

.month-button.active .fish-count {
    background: rgba(0, 0, 0, 0.2);
    color: var(--bg-primary);
}

/* Fish List */
.fish-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.fish-list-item {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.3s ease;
}

.fish-list-item:hover {
    border-color: var(--border-color-hover);
    background: var(--bg-card-hover);
    transform: translateX(4px);
}

.fish-list-image {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    flex-shrink: 0;
}

.fish-list-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.fish-list-info {
    flex: 1;
}

.fish-list-name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.fish-list-name-en {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.fish-list-arrow {
    font-size: 1.5rem;
    color: var(--text-muted);
    transition: all 0.3s ease;
}

.fish-list-item:hover .fish-list-arrow {
    color: var(--accent-cyan);
    transform: translateX(4px);
}

.no-fish {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}

/* =================================
   Modal
   ================================= */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.modal-container {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    max-width: 440px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    position: relative;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal-overlay.show .modal-container {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    color: var(--text-secondary);
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.modal-close:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
    border-color: var(--border-color-hover);
}

/* Modal Fish Card */
.modal-fish-card {
    text-align: center;
}

.modal-fish-image {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.modal-fish-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.modal-fish-image .badge {
    position: absolute;
    top: 12px;
    right: 12px;
}

.modal-fish-name {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 20px 20px 4px;
}

.modal-fish-name-en {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin: 0 20px 16px;
}

.modal-fish-season {
    display: inline-flex;
    flex-direction: column;
    background: rgba(0, 255, 255, 0.1);
    padding: 12px 24px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
}

.season-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.season-months {
    font-size: 1rem;
    font-weight: 700;
    color: var(--accent-cyan);
}

.modal-fish-description {
    padding: 0 20px;
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 20px;
}

.modal-fish-trivia {
    margin: 0 20px 24px;
    background: rgba(74, 158, 255, 0.1);
    border-radius: var(--radius-sm);
    padding: 16px;
    border-left: 3px solid var(--accent-blue);
    text-align: left;
}

.modal-fish-trivia .trivia-label {
    margin-bottom: 8px;
}

.modal-fish-trivia p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* =================================
   Footer
   ================================= */
.footer {
    text-align: center;
    padding: 24px 0;
    color: var(--text-muted);
    font-size: 0.8rem;
    border-top: 1px solid var(--border-color);
    margin-top: 40px;
}

.footer a {
    color: var(--accent-cyan);
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

/* =================================
   Responsive
   ================================= */
@media (max-width: 480px) {
    .container {
        padding: 16px 12px;
    }

    .countdown-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    .countdown-card {
        padding: 12px 8px;
    }

    .countdown-name {
        font-size: 0.85rem;
    }

    .countdown-value strong {
        font-size: 1.4rem;
    }

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

    .fish-image-container {
        height: 150px;
    }
}

@media (min-width: 768px) {
    .container {
        padding: 32px 24px;
    }

    .month-buttons {
        grid-template-columns: repeat(12, 1fr);
    }

    .month-button {
        padding: 12px 8px;
    }
}
