/* ============================================================
   style.css – Mossage (Full Version)
   Hero + Toolbar inside garden + Mossy aesthetic
   ============================================================ */

:root {
    --bg: #0a1208;
    --bg-garden: #0d1f0a;
    --grid-line: rgba(100, 150, 80, 0.08);
    --border-light: #6a8e4a;
    --border-mid: #3a5a2a;
    --border-dark: #1e2a1a;
    --text-primary: #d4e6c3;
    --text-muted: #8aa878;
    --modal-bg: #142010;
    --btn-bg: #1e2e18;
    --btn-hover: #2a4022;
    --accent: #b8e090;
    --font-pixel: 'Press Start 2P', monospace;
    --font-mono: 'VT323', 'Courier New', monospace;
}

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

html {
    font-size: 16px;
}

body {
    background-color: var(--bg);
    background-image: 
        repeating-linear-gradient(45deg, rgba(70, 100, 50, 0.05) 0px, rgba(70, 100, 50, 0.05) 2px, transparent 2px, transparent 8px),
        linear-gradient(var(--grid-line) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
    background-size: 20px 20px;
    color: var(--text-primary);
    font-family: var(--font-mono);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-x: hidden;
    position: relative;
}

/* --- Particles (moss spores) --- */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.particle {
    position: absolute;
    bottom: -10px;
    width: 4px;
    height: 4px;
    background: #8bb86b;
    border-radius: 50%;
    animation: floatUp linear infinite;
    opacity: 0.3;
    filter: blur(1px);
}

@keyframes floatUp {
    0% { transform: translateY(0) scale(1); opacity: 0.2; }
    100% { transform: translateY(-110vh) scale(0.4); opacity: 0; }
}

/* --- Hero Section --- */
.hero {
    width: 100%;
    max-width: 1100px;
    margin: 20px auto 0;
    padding: 20px 16px 10px;
    text-align: center;
    position: relative;
    z-index: 10;
}

.hero-title {
    font-family: var(--font-pixel);
    font-size: 2.2rem;
    color: #d0f0b0;
    text-shadow: 4px 4px 0 #1a2a10, 0 0 20px rgba(160, 200, 100, 0.3);
    letter-spacing: 6px;
    margin-bottom: 12px;
}

.hero-subtitle {
    font-family: var(--font-mono);
    font-size: 1rem;
    color: #b8d0a0;
    letter-spacing: 1px;
    margin-bottom: 20px;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 32px;
    margin-bottom: 20px;
}

.stat {
    background: rgba(20, 32, 16, 0.7);
    border: 2px solid #3a5a2a;
    padding: 8px 16px;
    border-radius: 4px;
    backdrop-filter: blur(2px);
    box-shadow: inset -1px -1px 0 #0a1a08, inset 1px 1px 0 #4a6a3a, 2px 2px 0 #000;
}

.stat-label {
    font-family: var(--font-pixel);
    font-size: 0.55rem;
    color: #8aa878;
    display: block;
    margin-bottom: 6px;
}

.stat-value {
    font-family: var(--font-pixel);
    font-size: 1.1rem;
    color: #e0ffc0;
    letter-spacing: 1px;
}

.info-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 36px;
    height: 36px;
    background: #1e2e18;
    border: 2px solid #6a8e4a;
    border-radius: 50%;
    font-size: 1.4rem;
    font-weight: bold;
    color: #b8e090;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.1s ease;
    box-shadow: inset -2px -2px 0 #0a1a08, inset 2px 2px 0 #3a5a2a, 2px 2px 0 #000;
    font-family: var(--font-pixel);
}

.info-btn:hover {
    background-color: #2a4020;
    border-color: #b8e090;
    color: #e0ffc0;
    transform: scale(1.02);
}

.info-btn:active {
    transform: scale(0.96);
    box-shadow: inset 2px 2px 0 #0a1a08, inset -2px -2px 0 #3a5a2a, 1px 1px 0 #000;
}

/* --- View Controls --- */
.view-controls {
    width: 100%;
    max-width: 1100px;
    display: flex;
    justify-content: center;
    gap: 12px;
    padding: 0 16px 12px;
    z-index: 9;
}

.view-btn {
    font-family: var(--font-pixel);
    font-size: 0.5rem;
    padding: 8px 14px;
    border: 3px solid #3a5a2a;
    background-color: #1e2e18;
    color: #8aa878;
    cursor: pointer;
    letter-spacing: 1px;
    border-radius: 3px;
    box-shadow: inset -2px -2px 0 #0a1a08, inset 2px 2px 0 #3a5a2a, 2px 2px 0 #000;
    transition: all 0.1s ease;
}

.view-btn.active {
    border-color: #b8e090;
    color: #d0f0b0;
    background-color: #2a4a20;
    box-shadow: inset -2px -2px 0 #1a3a10, inset 2px 2px 0 #4a7040, 0 0 12px rgba(160, 200, 100, 0.2);
}

.view-btn:hover:not(.active) {
    border-color: #8aa878;
    color: #c0dcaa;
    background-color: #2a3a20;
}

.view-btn:active {
    transform: scale(0.94);
}

/* --- Garden Container (with toolbar inside) --- */
.garden-container {
    width: 100%;
    max-width: 1100px;
    flex: 1;
    padding: 0 16px 24px;
    position: relative;
    z-index: 5;
}

/* Garden Toolbar – buttons aligned with garden grid */
.garden-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding: 0 20px;  /* matches garden-grid padding */
}

.garden-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: #1e2e18;
    border: 3px solid #3a5a2a;
    border-radius: 4px;
    padding: 8px 14px;
    font-family: var(--font-pixel);
    font-size: 0.55rem;
    color: #b8e090;
    cursor: pointer;
    transition: all 0.1s ease;
    box-shadow: inset -2px -2px 0 #0a1a08, inset 2px 2px 0 #3a5a2a, 2px 2px 0 #000;
}

.garden-btn:hover:not(:disabled) {
    background-color: #2a4020;
    border-color: #b8e090;
    color: #e0ffc0;
    transform: translateY(-2px);
    box-shadow: inset -2px -2px 0 #1a2a10, inset 2px 2px 0 #5a7a4a, 2px 2px 0 #000;
}

.garden-btn:active:not(:disabled) {
    transform: translateY(1px);
    box-shadow: inset 2px 2px 0 #0a1a08, inset -2px -2px 0 #3a5a2a, 1px 1px 0 #000;
}

.garden-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.plus-icon {
    font-size: 1.2rem;
    font-weight: bold;
    line-height: 1;
}

.search-svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
}

/* Garden Grid (default grid view) */
.garden-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 10px;
    padding: 20px;
    background-color: var(--bg-garden);
    border: 4px solid #2a4020;
    border-radius: 4px;
    box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.6), 0 0 0 4px #0a1a08, 0 0 0 8px #1a2a10;
    min-height: 300px;
    position: relative;
}

/* Forest View overrides */
.garden-container.garden-view {
    padding: 0;
    min-height: 300px;
}

.garden-container.garden-view .garden-grid {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    border: none;
    box-shadow: none;
    background: transparent;
    padding: 0;
    overflow: hidden;
    min-height: 0;
}

.garden-container.garden-view .flower-card {
    position: absolute;
    border: none;
    background: transparent;
    box-shadow: none;
    width: auto;
    height: auto;
    padding: 0;
    margin: 0;
    transform: translate(-50%, -50%);
    animation: none;
    overflow: visible;
    transition: transform 0.3s ease, filter 0.3s ease;
}

.garden-container.garden-view .flower-card:hover {
    transform: translate(-50%, -50%) scale(1.15);
    filter: drop-shadow(0 0 15px rgba(180, 220, 120, 0.6));
    z-index: 10;
}

.garden-container.garden-view .flower-inner {
    animation: sway var(--sway-duration, 7s) ease-in-out infinite alternate;
    animation-delay: var(--sway-delay, 0s);
}

.garden-container.garden-view .flower-card-emoji {
    font-size: 2.8rem;
    filter: drop-shadow(0 0 12px rgba(100, 150, 60, 0.4)) drop-shadow(0 4px 6px rgba(0,0,0,0.6));
}

.garden-container.garden-view .flower-card-id {
    display: none;
}

@keyframes sway {
    0% { transform: rotate(-1.5deg); }
    100% { transform: rotate(1.5deg); }
}

/* --- Empty State --- */
.empty-state {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    pointer-events: none;
    z-index: 2;
    transition: opacity 0.3s ease;
}

.empty-state.hidden {
    opacity: 0;
}

.empty-icon {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 10px;
    animation: bob 2s ease-in-out infinite;
}

.empty-state p {
    font-family: var(--font-pixel);
    font-size: 0.65rem;
    color: #6a8a58;
    letter-spacing: 2px;
    margin: 4px 0;
}

.empty-sub {
    font-size: 0.5rem !important;
    color: #4a6038 !important;
}

@keyframes bob {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

/* --- Flower Cards (grid mode) --- */
.flower-card {
    position: relative;
    aspect-ratio: 1 / 1;
    background-color: #142010;
    border: 3px solid #2a4020;
    border-radius: 3px;
    cursor: pointer;
    transition: border-color 0.1s ease, box-shadow 0.1s ease, transform 0.1s ease;
    box-shadow: inset -2px -2px 0 #0a1a08, inset 2px 2px 0 #2a4020;
    animation: plantPop 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    user-select: none;
    overflow: hidden;
}

.flower-card:hover {
    border-color: #b8e090;
    box-shadow: inset -2px -2px 0 #0a1a08, inset 2px 2px 0 #3a5a2a, 0 0 18px rgba(160, 200, 100, 0.15);
    transform: translateY(-3px);
    z-index: 10;
}

.flower-card:active {
    transform: scale(0.94);
}

@keyframes plantPop {
    0% { transform: scale(0); opacity: 0; }
    60% { transform: scale(1.08); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}

.flower-card-emoji {
    font-size: 2.2rem;
    line-height: 1;
    pointer-events: none;
    filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.5));
}

.flower-card-id {
    font-family: var(--font-pixel);
    font-size: 0.45rem;
    color: #8aa878;
    margin-top: 6px;
    pointer-events: none;
    letter-spacing: 1px;
}

/* --- Tooltip --- */
.tooltip {
    position: fixed;
    pointer-events: none;
    opacity: 0;
    background-color: #1e2e18;
    border: 3px solid #6a8e4a;
    border-radius: 3px;
    padding: 12px 14px;
    min-width: 180px;
    max-width: 280px;
    z-index: 100;
    box-shadow: 4px 4px 0 #000, inset -2px -2px 0 #0a1a08, inset 2px 2px 0 #3a5a2a;
    transition: opacity 0.12s ease;
    font-family: var(--font-mono);
}

.tooltip.visible {
    opacity: 1;
    pointer-events: auto;
}

.tooltip-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.tooltip-flower-emoji {
    font-size: 1.4rem;
}

.tooltip-title {
    font-family: var(--font-pixel);
    font-size: 0.55rem;
    color: #c0dcaa;
    letter-spacing: 1px;
}

.tooltip-message {
    font-family: var(--font-mono);
    font-size: 1.1rem;
    color: #e0f0d0;
    line-height: 1.4;
    word-break: break-word;
    white-space: pre-wrap;
}

/* --- Modal Overlay (shared) --- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.75);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    padding: 16px;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

/* --- Planting Modal --- */
.modal {
    background-color: #1e2a18;
    border: 4px solid #5a7a4a;
    border-radius: 4px;
    padding: 28px 24px 24px;
    width: 100%;
    max-width: 520px;
    position: relative;
    box-shadow: 8px 8px 0 #000, inset -3px -3px 0 #0a1a08, inset 3px 3px 0 #3a5a2a;
    animation: modalIn 0.25s cubic-bezier(0.34, 1.3, 0.64, 1) forwards;
    font-family: var(--font-pixel);
}

@keyframes modalIn {
    0% { transform: scale(0.85); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.modal-close {
    position: absolute;
    top: 10px;
    right: 14px;
    background: none;
    border: 2px solid #6a8e4a;
    color: #b8e090;
    font-size: 1rem;
    width: 32px;
    height: 32px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 3px;
    font-family: var(--font-pixel);
    transition: all 0.1s ease;
    box-shadow: inset -2px -2px 0 #0a1a08, inset 2px 2px 0 #3a5a2a;
}

.modal-close:hover {
    border-color: #d0f0b0;
    color: #e0ffc0;
    background-color: #2a4020;
}

.modal-close:active {
    box-shadow: inset 2px 2px 0 #0a1a08, inset -2px -2px 0 #3a5a2a;
    transform: scale(0.93);
}

.modal-heading {
    font-family: var(--font-pixel);
    font-size: 0.75rem;
    color: #d0f0b0;
    text-align: center;
    margin-bottom: 20px;
    letter-spacing: 2px;
    text-shadow: 2px 2px 0 #000;
}

/* Flower choices */
.flower-choices {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    max-height: 50vh;
    overflow-y: auto;
    padding: 4px;
}

.flower-choice {
    flex: 0 0 auto;
    width: 64px;
    height: 64px;
    background-color: #1e2e18;
    border: 3px solid #3a5a2a;
    border-radius: 3px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.1s ease;
    box-shadow: inset -3px -3px 0 #0a1a08, inset 3px 3px 0 #3a5a2a, 3px 3px 0 #000;
}

.flower-choice:hover {
    border-color: #b8e090;
    background-color: #2a4020;
    box-shadow: inset -3px -3px 0 #1a2a10, inset 3px 3px 0 #5a7a4a, 0 0 24px rgba(160, 200, 100, 0.15);
    transform: translateY(-3px);
}

.flower-choice:active {
    transform: scale(0.94);
    box-shadow: inset 3px 3px 0 #0a1a08, inset -3px -3px 0 #3a5a2a, 1px 1px 0 #000;
}

.flower-choice-emoji {
    font-size: 2rem;
    line-height: 1;
    pointer-events: none;
    filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.5));
}

/* Step 2 (message) */
.back-btn {
    background: none;
    border: 2px solid #6a8e4a;
    color: #b8e090;
    font-family: var(--font-pixel);
    font-size: 0.5rem;
    padding: 8px 14px;
    cursor: pointer;
    margin-bottom: 14px;
    border-radius: 3px;
    letter-spacing: 1px;
    transition: all 0.1s ease;
    box-shadow: inset -2px -2px 0 #0a1a08, inset 2px 2px 0 #3a5a2a;
}

.back-btn:hover {
    border-color: #d0f0b0;
    color: #e0ffc0;
    background-color: #2a4020;
}

.selected-flower-preview {
    text-align: center;
    margin-bottom: 16px;
}

.preview-emoji {
    font-size: 3.5rem;
    display: inline-block;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.5));
    animation: bob 1.8s ease-in-out infinite;
}

.textarea-wrapper {
    position: relative;
    margin-bottom: 18px;
}

.message-textarea {
    width: 100%;
    background-color: #111;
    border: 3px solid #3a5a2a;
    color: #e0f0d0;
    font-family: var(--font-mono);
    font-size: 1.2rem;
    padding: 12px 14px;
    resize: vertical;
    min-height: 80px;
    max-height: 160px;
    border-radius: 3px;
    letter-spacing: 1px;
    line-height: 1.5;
    box-shadow: inset 3px 3px 0 #0a1a08, inset -1px -1px 0 #2a4020;
    outline: none;
}

.message-textarea:focus {
    border-color: #8aa878;
    box-shadow: inset 3px 3px 0 #0a1a08, inset -1px -1px 0 #3a5a2a, 0 0 10px rgba(160, 200, 100, 0.1);
}

.message-textarea::placeholder {
    color: #6a8a58;
}

.char-counter {
    display: block;
    text-align: right;
    font-family: var(--font-pixel);
    font-size: 0.45rem;
    color: #8aa878;
    margin-top: 6px;
    letter-spacing: 1px;
}

.char-counter.near-limit {
    color: #ffa07a;
}

.plant-btn {
    display: block;
    width: 100%;
    padding: 14px;
    background-color: #2a4a20;
    border: 3px solid #6a9a4a;
    color: #c0f0a0;
    font-family: var(--font-pixel);
    font-size: 0.65rem;
    cursor: pointer;
    letter-spacing: 2px;
    border-radius: 3px;
    transition: all 0.1s ease;
    box-shadow: inset -3px -3px 0 #1a3a10, inset 3px 3px 0 #4a7040, 3px 3px 0 #000;
    text-shadow: 0 0 8px rgba(160, 200, 100, 0.4);
}

.plant-btn:hover {
    background-color: #3a6030;
    border-color: #8ab86a;
    color: #e0ffc0;
    box-shadow: inset -3px -3px 0 #2a4a20, inset 3px 3px 0 #5a8a4a, 0 0 20px rgba(160, 200, 100, 0.2);
    text-shadow: 0 0 14px rgba(180, 220, 120, 0.6);
}

.plant-btn:active {
    transform: scale(0.96);
    box-shadow: inset 3px 3px 0 #1a3a10, inset -3px -3px 0 #4a7040, 1px 1px 0 #000;
}

.plant-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

/* Flower Detail Popup */
.flower-detail-modal {
    max-width: 440px;
    padding: 24px 20px 20px;
    text-align: center;
}

.detail-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 12px;
}

.detail-emoji {
    font-size: 2.8rem;
    filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.6));
}

.detail-title {
    font-family: var(--font-pixel);
    font-size: 0.75rem;
    color: #d0f0b0;
    letter-spacing: 2px;
    text-shadow: 2px 2px 0 #000;
}

.detail-date {
    font-family: var(--font-pixel);
    font-size: 0.5rem;
    color: #8aa878;
    margin-bottom: 16px;
    letter-spacing: 1px;
}

.detail-message {
    font-family: var(--font-mono);
    font-size: 1.1rem;
    color: #e0f0d0;
    line-height: 1.6;
    word-break: break-word;
    white-space: pre-wrap;
    background: #111;
    border: 2px solid #3a5a2a;
    padding: 14px;
    border-radius: 3px;
    box-shadow: inset 2px 2px 0 #0a1a08, inset -1px -1px 0 #2a4020;
    max-height: 50vh;
    overflow-y: auto;
}

/* About Modal */
.about-modal {
    max-width: 480px;
    padding: 28px 24px;
    text-align: center;
}

.about-content {
    font-family: var(--font-mono);
    font-size: 1rem;
    color: #d4e6c3;
    line-height: 1.6;
    text-align: left;
    margin-top: 16px;
}

.about-content p {
    margin-bottom: 12px;
}

.about-credit {
    text-align: center;
    font-family: var(--font-pixel);
    font-size: 0.55rem;
    color: #8aa878;
    margin-top: 20px;
    letter-spacing: 1px;
}

/* Footer */
.footer {
    padding: 16px 20px 24px;
    text-align: center;
    font-family: var(--font-pixel);
    font-size: 0.45rem;
    color: #6a8a58;
    letter-spacing: 2px;
    z-index: 5;
}

/* ========== RESPONSIVE BREAKPOINTS ========== */
@media (max-width: 900px) {
    .garden-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 8px;
        padding: 14px;
    }
    .hero-title { font-size: 1.6rem; letter-spacing: 4px; }
    .hero-subtitle { font-size: 0.8rem; }
    .stat { padding: 4px 12px; }
    .stat-label { font-size: 0.45rem; }
    .stat-value { font-size: 0.9rem; }
    .info-btn { width: 30px; height: 30px; font-size: 1.2rem; top: 10px; right: 10px; }
    .flower-card-emoji { font-size: 1.8rem; }
    .flower-card-id { font-size: 0.4rem; }
    .garden-btn { font-size: 0.45rem; padding: 6px 12px; }
    .plus-icon { font-size: 1rem; }
    .search-svg { width: 14px; height: 14px; }
    .garden-toolbar { padding: 0 14px; }
    .modal { max-width: 460px; padding: 22px 16px 18px; }
    .flower-choice { width: 56px; height: 56px; }
    .flower-choice-emoji { font-size: 1.6rem; }
    .garden-container.garden-view .flower-card-emoji { font-size: 2.2rem; }
}

@media (max-width: 550px) {
    .garden-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
        padding: 10px;
        border-width: 3px;
    }
    .hero { margin-top: 30px; padding: 12px 12px 6px; }
    .hero-title { font-size: 1.2rem; }
    .hero-subtitle { font-size: 0.65rem; }
    .hero-stats { gap: 12px; }
    .stat { padding: 2px 8px; }
    .stat-label { font-size: 0.4rem; }
    .stat-value { font-size: 0.75rem; }
    .info-btn { width: 26px; height: 26px; font-size: 1rem; }
    .view-controls { gap: 8px; padding: 0 10px 10px; }
    .view-btn { font-size: 0.4rem; padding: 6px 10px; border-width: 2px; }
    .garden-toolbar { padding: 0 10px; margin-bottom: 8px; }
    .garden-btn { font-size: 0.4rem; padding: 5px 10px; gap: 4px; }
    .plus-icon { font-size: 0.9rem; }
    .search-svg { width: 12px; height: 12px; }
    .flower-card-emoji { font-size: 1.5rem; }
    .flower-card-id { font-size: 0.35rem; margin-top: 4px; }
    .flower-card { border-width: 2px; }
    .modal { max-width: 95vw; padding: 18px 12px 16px; border-width: 3px; }
    .flower-choices { gap: 6px; }
    .flower-choice { width: 48px; height: 48px; border-width: 2px; }
    .flower-choice-emoji { font-size: 1.4rem; }
    .modal-heading { font-size: 0.55rem; letter-spacing: 1px; }
    .plant-btn { font-size: 0.55rem; padding: 12px; }
    .message-textarea { font-size: 1rem; min-height: 65px; }
    .tooltip { max-width: 220px; min-width: 140px; padding: 10px; }
    .tooltip-message { font-size: 0.95rem; }
    .tooltip-title { font-size: 0.45rem; }
    .empty-state p { font-size: 0.5rem; }
    .footer { font-size: 0.4rem; }
    .flower-detail-modal { max-width: 90vw; padding: 16px 12px; }
    .detail-emoji { font-size: 2rem; }
    .detail-title { font-size: 0.6rem; }
    .detail-message { font-size: 0.95rem; padding: 10px; }
    .about-modal { padding: 20px 16px; }
    .about-content { font-size: 0.85rem; }
    .garden-container.garden-view .flower-card-emoji { font-size: 1.8rem; }
}

@media (max-width: 360px) {
    .garden-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 4px;
        padding: 6px;
    }
    .flower-card-emoji { font-size: 1.2rem; }
    .flower-card-id { font-size: 0.3rem; }
    .hero-title { font-size: 0.9rem; }
    .flower-choice { width: 42px; height: 42px; }
    .flower-choice-emoji { font-size: 1.2rem; }
    .garden-container.garden-view .flower-card-emoji { font-size: 1.4rem; }
    .garden-btn { font-size: 0.35rem; padding: 4px 8px; }
}

/* ========== IMPROVED FLOWER DETAIL MODAL ========== */
.flower-detail-modal {
    max-width: 520px;
    padding: 28px 24px 24px;
    text-align: center;
    transform: scale(0.95);
    transition: transform 0.2s cubic-bezier(0.34, 1.3, 0.64, 1), opacity 0.2s ease;
    opacity: 0;
}

.modal-overlay.active .flower-detail-modal {
    transform: scale(1);
    opacity: 1;
}

.detail-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.detail-emoji {
    font-size: 4rem;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.6));
    animation: gentleBob 1.5s ease-in-out infinite;
}

@keyframes gentleBob {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

.detail-title {
    font-family: var(--font-pixel);
    font-size: 0.85rem;
    color: #e0ffc0;
    letter-spacing: 2px;
    text-shadow: 2px 2px 0 #000;
    background: #1e2e18;
    display: inline-block;
    padding: 6px 14px;
    border-radius: 3px;
    border: 2px solid #6a8e4a;
    box-shadow: inset -1px -1px 0 #0a1a08, inset 1px 1px 0 #3a5a2a;
}

.detail-date {
    font-family: var(--font-pixel);
    font-size: 0.55rem;
    color: #b8e090;
    background: #0a1a08;
    display: inline-block;
    padding: 5px 12px;
    border-radius: 2px;
    margin-bottom: 20px;
    letter-spacing: 1px;
    border: 1px solid #3a5a2a;
}

.detail-message {
    font-family: var(--font-mono);
    font-size: 1.2rem;
    color: #e0f0d0;
    line-height: 1.6;
    word-break: break-word;
    white-space: pre-wrap;
    background: #0d1f0a;
    border: 3px solid #3a5a2a;
    padding: 20px;
    border-radius: 6px;
    box-shadow: inset 3px 3px 0 #0a1a08, inset -1px -1px 0 #2a4020, 0 4px 12px rgba(0,0,0,0.4);
    max-height: 60vh;
    overflow-y: auto;
    text-align: left;
    margin-top: 8px;
}

/* Scrollbar styling (retro) */
.detail-message::-webkit-scrollbar {
    width: 10px;
    background: #1e2e18;
}
.detail-message::-webkit-scrollbar-track {
    background: #0a1a08;
    box-shadow: inset 0 0 2px #000;
}
.detail-message::-webkit-scrollbar-thumb {
    background: #6a8e4a;
    border-radius: 2px;
    border: 1px solid #b8e090;
}
.detail-message::-webkit-scrollbar-thumb:hover {
    background: #8ab86a;
}

/* Responsive */
@media (max-width: 550px) {
    .flower-detail-modal {
        max-width: 90vw;
        padding: 20px 16px;
    }
    .detail-emoji { font-size: 3rem; }
    .detail-title { font-size: 0.65rem; padding: 4px 10px; }
    .detail-date { font-size: 0.45rem; }
    .detail-message { font-size: 1rem; padding: 14px; max-height: 50vh; }
}