/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-green: #4a7c59;
    --light-green: #6b9b7a;
    --dark-green: #2d4a3a;
    --earth-brown: #8b7355;
    --light-earth: #a68b6d;
    --sky-blue: #87ceeb;
    --light-yellow: #fff9e6;
    --white: #ffffff;
    --gray: #f5f5f5;
    --text-dark: #333333;
    --text-light: #666666;
    --accent: #ffb347;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, var(--sky-blue) 0%, #98d8c8 100%);
    color: var(--text-dark);
    min-height: 100vh;
    padding-bottom: 2rem;
}

/* Header */
.header {
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--dark-green) 100%);
    color: var(--white);
    padding: 1.5rem 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.header h1 {
    font-size: 2rem;
    font-weight: 700;
}

.stats {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.stat-label {
    font-size: 0.875rem;
    opacity: 0.9;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent);
}

/* Main Container */
.main-container {
    max-width: 1400px;
    margin: 2rem auto;
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 2rem;
    padding: 0 2rem;
}

@media (max-width: 968px) {
    .main-container {
        grid-template-columns: 1fr;
        padding: 0 1rem;
    }
}

/* Sidebar */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.entry-section,
.unlocks-section,
.social-section {
    background: var(--white);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.entry-section h2,
.unlocks-section h3,
.social-section h3 {
    color: var(--primary-green);
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

/* Entry Form */
.entry-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.gratitude-input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--primary-green);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
    min-height: 100px;
}

.gratitude-input:focus {
    outline: none;
    border-color: var(--dark-green);
    box-shadow: 0 0 0 3px rgba(74, 124, 89, 0.1);
}

.submit-btn {
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--dark-green) 100%);
    color: var(--white);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(74, 124, 89, 0.3);
}

.submit-btn:active {
    transform: translateY(0);
}

/* Seed Inventory */
.seed-inventory {
    margin-top: 1.5rem;
}

.inventory-label {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.75rem;
}

.seeds-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.seed-item {
    width: 60px;
    height: 60px;
    background: var(--earth-brown);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    cursor: grab;
    transition: transform 0.2s, box-shadow 0.2s;
    border: 2px solid var(--light-earth);
    position: relative;
}

.seed-item:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.seed-item:active {
    cursor: grabbing;
}

.seed-item.dragging {
    opacity: 0.5;
    cursor: grabbing;
}

/* Garden Section */
.garden-section {
    background: var(--white);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    min-height: 600px;
}

.garden-container {
    width: 100%;
    overflow: auto;
    padding: 1rem;
    background: var(--earth-brown);
    border-radius: 8px;
    border: 3px solid var(--dark-green);
}

.garden-grid {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 4px;
    margin: 0 auto;
    max-width: 800px;
}

.garden-cell {
    aspect-ratio: 1;
    background: var(--light-earth);
    border: 1px solid rgba(139, 115, 85, 0.3);
    border-radius: 4px;
    position: relative;
    cursor: pointer;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
}

.garden-cell:hover:empty {
    background: var(--earth-brown);
}

.garden-cell.occupied {
    cursor: pointer;
}

.garden-cell.watered {
    background: rgba(135, 206, 235, 0.3);
}

.garden-info {
    margin-top: 1rem;
    text-align: center;
    color: var(--text-light);
    font-size: 0.875rem;
}

/* Plant Stages */
.plant-seed {
    animation: seed-pulse 2s ease-in-out infinite;
}

.plant-sprout {
    animation: grow 1s ease-out;
}

.plant-mature {
    animation: sway 3s ease-in-out infinite;
}

/* Unlocks Grid */
.unlocks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    gap: 0.75rem;
}

.unlock-item {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    background: var(--gray);
    border: 2px solid var(--primary-green);
}

.unlock-item.locked {
    opacity: 0.3;
    filter: grayscale(100%);
}

/* Social Section */
.friend-code-section,
.visit-friend-section {
    margin-bottom: 1rem;
}

.friend-code-section p {
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.friend-code {
    background: var(--gray);
    padding: 0.75rem;
    border-radius: 8px;
    font-family: monospace;
    font-weight: 600;
    text-align: center;
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
    color: var(--primary-green);
}

.copy-btn,
.visit-btn {
    width: 100%;
    padding: 0.5rem;
    background: var(--primary-green);
    color: var(--white);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.2s;
}

.copy-btn:hover,
.visit-btn:hover {
    background: var(--dark-green);
}

.friend-input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--primary-green);
    border-radius: 8px;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

/* Tooltip */
.tooltip {
    position: absolute;
    background: var(--text-dark);
    color: var(--white);
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-size: 0.875rem;
    pointer-events: none;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.2s;
    max-width: 200px;
}

.tooltip.visible {
    opacity: 1;
}

/* Notification */
.notification {
    position: fixed;
    top: 100px;
    right: 2rem;
    background: var(--primary-green);
    color: var(--white);
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 1001;
    opacity: 0;
    transform: translateX(400px);
    transition: opacity 0.3s, transform 0.3s;
}

.notification.visible {
    opacity: 1;
    transform: translateX(0);
}

.notification.success {
    background: var(--primary-green);
}

.notification.error {
    background: #dc3545;
}

.notification.achievement {
    background: var(--accent);
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        align-items: flex-start;
    }

    .stats {
        width: 100%;
        justify-content: space-around;
    }

    .garden-grid {
        grid-template-columns: repeat(8, 1fr);
    }

    .notification {
        right: 1rem;
        left: 1rem;
        transform: translateY(-100px);
    }

    .notification.visible {
        transform: translateY(0);
    }
}

/* Circular Menu */
.circular-menu {
    position: absolute;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: rgba(45, 74, 58, 0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    transform: scale(0);
    transition: transform 0.2s cubic-bezier(0.18, 0.89, 0.32, 1.28);
    pointer-events: none;
}

.circular-menu.active {
    transform: scale(1);
    pointer-events: auto;
}

.menu-button {
    position: absolute;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--primary-green);
    color: var(--white);
    border: 2px solid var(--white);
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
    transition: background 0.2s, transform 0.2s;
}

.menu-button:hover {
    background: var(--dark-green);
    transform: scale(1.15);
}

.menu-button[data-action="show"] {
    transform: translate(0, -50px);
}
.menu-button[data-action="water"] {
    transform: translate(-43px, 25px);
}
.menu-button[data-action="pick"] {
    transform: translate(43px, 25px);
}

