* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
    /* Prevent unwanted touch behaviors on mobile */
    touch-action: manipulation;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Main Menu Styles */
.main-menu {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.menu-container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    max-width: 800px;
    width: 100%;
}

.menu-container h1 {
    font-size: 3rem;
    margin-bottom: 10px;
    color: #2c3e50;
}

.menu-container p {
    font-size: 1.2rem;
    color: #7f8c8d;
    margin-bottom: 40px;
}

/* GitHub Link Styles */
.github-link {
    margin-bottom: 30px;
}

.github-btn {
    display: inline-block;
    background: linear-gradient(135deg, #24292e 0%, #586069 100%);
    color: white;
    text-decoration: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(36, 41, 46, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.github-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(36, 41, 46, 0.4);
    background: linear-gradient(135deg, #586069 0%, #24292e 100%);
}

.github-btn:active {
    transform: translateY(0);
}

.save-slots {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.save-slot {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 15px;
    padding: 20px;
    transition: all 0.3s ease;
}

.save-slot:hover {
    border-color: #3498db;
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(52, 152, 219, 0.2);
}

.save-slot.has-save {
    border-color: #27ae60;
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: white;
}

.save-slot h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: inherit;
}

.slot-status {
    font-size: 1rem;
    margin-bottom: 10px;
    font-weight: 600;
}

.slot-date {
    font-size: 0.9rem;
    margin-bottom: 20px;
    opacity: 0.8;
}

.slot-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.load-btn, .new-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.load-btn {
    background: #3498db;
    color: white;
}

.load-btn:hover:not(:disabled) {
    background: #2980b9;
    transform: translateY(-2px);
}

.load-btn:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    opacity: 0.6;
}

.new-btn {
    background: #27ae60;
    color: white;
}

.new-btn:hover {
    background: #229954;
    transform: translateY(-2px);
}

/* Game Container Styles */
.game-container {
    min-height: 100vh;
    padding: 20px;
}

.game-header {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.menu-btn, .save-btn, .expand-btn, .admin-btn, .sound-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.menu-btn {
    background: #e74c3c;
    color: white;
}

.menu-btn:hover {
    background: #c0392b;
    transform: translateY(-2px);
}

.save-btn {
    background: #27ae60;
    color: white;
}

.save-btn:hover {
    background: #218838;
    transform: translateY(-2px);
}

.expand-btn {
    background: #9b59b6;
    color: white;
}

.expand-btn:hover {
    background: #8e44ad;
    transform: translateY(-2px);
}

.sound-btn {
    background: #f39c12;
    color: white;
}

.sound-btn:hover {
    background: #e67e22;
    transform: translateY(-2px);
}

.account-btn {
    background: #3498db;
    color: white;
}

.account-btn:hover {
    background: #2980b9;
    transform: translateY(-2px);
}

.support-btn {
    background: #e67e22;
    color: white;
}

.support-btn:hover {
    background: #d35400;
    transform: translateY(-2px);
}

.logout-btn {
    background: #e74c3c;
    color: white;
}

.logout-btn:hover {
    background: #c0392b;
    transform: translateY(-2px);
}

/* Menu Buttons */
.menu-buttons {
    display: flex;
    flex-direction: row; /* Changed from column to row for horizontal alignment */
    gap: 10px; /* Reduced gap for horizontal layout */
    margin: 20px 0;
    width: 100%;
    max-width: 600px; /* Increased max-width for horizontal layout */
    justify-content: center; /* Center the buttons */
    flex-wrap: wrap; /* Allow wrapping if needed */
}

.menu-buttons .account-btn,
.menu-buttons .support-btn,
.menu-buttons .logout-btn {
    padding: 12px 20px; /* Slightly reduced padding for horizontal layout */
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem; /* Slightly smaller font for horizontal layout */
    text-align: center;
    width: auto; /* Changed from 100% to auto for horizontal layout */
    min-width: 140px; /* Set minimum width for consistency */
}

.menu-buttons .account-btn {
    background: #3498db;
    color: white;
}

.menu-buttons .account-btn:hover {
    background: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.3);
}

.menu-buttons .support-btn {
    background: #e67e22;
    color: white;
}

.menu-buttons .support-btn:hover {
    background: #d35400;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(230, 126, 34, 0.3);
}

.menu-buttons .logout-btn {
    background: #e74c3c;
    color: white;
}

.menu-buttons .logout-btn:hover {
    background: #c0392b;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(231, 76, 60, 0.3);
}

.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background: rgba(52, 152, 219, 0.1);
    border-radius: 8px;
    border-left: 4px solid #3498db;
}

.stat-label {
    font-weight: 600;
    color: #2c3e50;
}

.stat-value {
    font-weight: bold;
    color: #27ae60;
    font-size: 1.1rem;
}

/* Game Content Layout */
.game-content {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 20px;
    height: calc(100vh - 200px);
}

.sidebar {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 20px;
    overflow-y: auto;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.garden-area {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Season Display Styles */
.season-display {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 10px;
    padding: 15px 20px;
    margin-bottom: 15px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.season-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

#seasonText {
    font-size: 1.2rem;
    font-weight: bold;
    color: #333;
}

.growth-multiplier {
    font-size: 0.9rem;
    color: #28a745;
    font-weight: 600;
}

.growth-multiplier.negative {
    color: #dc3545;
}

#gardenCanvas {
    border: 2px solid #3498db;
    border-radius: 10px;
    background: #f8f9fa;
    cursor: pointer;
    /* Improve touch handling on mobile */
    touch-action: none;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    /* Ensure canvas is properly positioned for touch events */
    position: relative;
    z-index: 1;
}

.garden-info {
    margin-top: 15px;
    text-align: center;
    color: #7f8c8d;
}

/* Seed Shop Styles */
.seed-shop {
    background: rgba(255, 255, 255, 0.7);
    border-radius: 15px;
    padding: 15px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    margin-bottom: 20px;
}

.seed-shop h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: #333;
}

.seed-item {
    background: white;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 12px;
    box-sizing: border-box;
}

.seed-item:hover {
    border-color: #007bff;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.2);
}

.seed-item.selected {
    border-color: #28a745;
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
}

.seed-item img {
    width: 40px;
    height: 40px;
    border-radius: 4px;
    flex-shrink: 0;
}

.seed-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.seed-name {
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.seed-price {
    color: #28a745;
    font-weight: bold;
    font-size: 0.8rem;
}

.seed-stock {
    color: #6c757d;
    font-size: 0.7rem;
}

.seed-item.out-of-stock {
    opacity: 0.5;
    cursor: not-allowed;
}

.seed-item.out-of-stock:hover {
    transform: none;
    box-shadow: none;
}

.seed-item.rare-seed {
    border-color: #ffc107;
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.1), rgba(255, 193, 7, 0.05));
}

.seed-item.rare-seed:hover {
    border-color: #ffc107;
    box-shadow: 0 4px 8px rgba(255, 193, 7, 0.3);
}

.seed-item.legendary-seed {
    border-color: #dc3545;
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.1), rgba(220, 53, 69, 0.05));
    box-shadow: 0 0 10px rgba(220, 53, 69, 0.3);
}

.seed-item.legendary-seed:hover {
    border-color: #dc3545;
    box-shadow: 0 4px 8px rgba(220, 53, 69, 0.4);
}

/* Sprinkler Shop Styles */
.sprinkler-shop {
    background: rgba(255, 255, 255, 0.7);
    border-radius: 15px;
    padding: 15px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    margin-bottom: 20px;
}

.sprinkler-shop h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: #333;
}

.sprinkler-item {
    background: white;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.sprinkler-item:hover {
    border-color: #007bff;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.2);
}

.sprinkler-item.selected {
    border-color: #28a745;
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
}

.sprinkler-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}

.sprinkler-name {
    font-weight: 600;
    font-size: 0.9rem;
}

.sprinkler-price {
    color: #28a745;
    font-weight: bold;
    font-size: 0.85rem;
}

.sprinkler-count {
    background: #007bff;
    color: white;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: bold;
}

.sprinkler-desc {
    font-size: 0.75rem;
    color: #6c757d;
    line-height: 1.3;
}

/* Tools Styles */
.tools {
    background: rgba(255, 255, 255, 0.7);
    border-radius: 15px;
    padding: 15px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    margin-bottom: 20px;
}

.tools h3, .tools h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: #333;
}

.tools h4 {
    font-size: 1rem;
    margin-top: 20px;
    margin-bottom: 10px;
    color: #666;
}

.tool-btn {
    width: 100%;
    padding: 12px;
    margin-bottom: 8px;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
}

.tool-btn:hover {
    border-color: #007bff;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.2);
}

.tool-btn.active {
    border-color: #28a745;
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    box-shadow: 0 0 15px rgba(40, 167, 69, 0.3);
}

.tool-level {
    background: rgba(0, 0, 0, 0.1);
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: bold;
}

/* Sprinkler Tool Styles */
.sprinkler-tool {
    background: linear-gradient(135deg, #87CEEB, #4A90E2);
    color: white;
    border: 2px solid #4A90E2;
}

.sprinkler-tool:hover {
    background: linear-gradient(135deg, #4A90E2, #87CEEB);
    transform: translateY(-2px);
}

.sprinkler-tool.active {
    background: linear-gradient(135deg, #E74C3C, #9B59B6);
    border-color: #E74C3C;
    box-shadow: 0 0 15px rgba(231, 76, 60, 0.5);
}

.sprinkler-tool .sprinkler-count {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Upgrade Button Styles */
.upgrade-btn {
    width: 100%;
    padding: 10px;
    margin-bottom: 8px;
    border: 2px solid #ffc107;
    border-radius: 8px;
    background: linear-gradient(135deg, #ffc107, #ffca2c);
    color: #212529;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    font-size: 0.9rem;
}

.upgrade-btn:hover:not(:disabled) {
    border-color: #e0a800;
    background: linear-gradient(135deg, #e0a800, #ffc107);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(255, 193, 7, 0.3);
}

.upgrade-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.upgrade-cost {
    background: rgba(0, 0, 0, 0.1);
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: bold;
}

/* Achievements Styles */
.achievements-section {
    background: rgba(255, 255, 255, 0.7);
    border-radius: 15px;
    padding: 15px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    margin-bottom: 15px;
}

.achievements-section h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: #333;
}

#achievements-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.achievement-item {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.achievement-item.unlocked {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: white;
    border-color: #27ae60;
    box-shadow: 0 2px 8px rgba(39, 174, 96, 0.3);
}

.achievement-item.locked {
    background: rgba(0, 0, 0, 0.1);
    color: #666;
    opacity: 0.7;
}

.achievement-icon {
    font-size: 1.2rem;
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

.achievement-info {
    flex: 1;
}

.achievement-name {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 2px;
}

.achievement-description {
    font-size: 0.8rem;
    opacity: 0.8;
}

.achievement-status {
    font-size: 0.7rem;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.1);
}

.achievement-item.unlocked .achievement-status {
    background: rgba(255, 255, 255, 0.2);
}

/* Challenges Styles */
.challenges-section {
    background: rgba(255, 255, 255, 0.7);
    border-radius: 15px;
    padding: 15px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    margin-bottom: 15px;
}

.challenges-section h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: #333;
}

#challenges-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.challenge-item {
    padding: 12px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.challenge-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.challenge-item.completed-challenge {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: white;
    border-color: #27ae60;
    opacity: 0.8;
}

.challenge-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.challenge-icon {
    font-size: 1.2rem;
    margin-right: 8px;
}

.challenge-title {
    font-weight: 600;
    font-size: 0.9rem;
    flex: 1;
}

.challenge-completed {
    font-size: 1.1rem;
    color: #27ae60;
}

.challenge-item.completed-challenge .challenge-completed {
    color: white;
}

.challenge-description {
    font-size: 0.85rem;
    margin-bottom: 8px;
    line-height: 1.3;
}

.challenge-progress {
    margin-bottom: 8px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 4px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #007bff, #0056b3);
    transition: width 0.3s ease;
}

.challenge-item.completed-challenge .progress-fill {
    background: linear-gradient(90deg, #28a745, #20c997);
}

.progress-text {
    font-size: 0.75rem;
    font-weight: 600;
    color: #666;
}

.challenge-item.completed-challenge .progress-text {
    color: rgba(255, 255, 255, 0.8);
}

.challenge-reward {
    font-size: 0.8rem;
    font-weight: 600;
    color: #28a745;
}

.challenge-item.completed-challenge .challenge-reward {
    color: rgba(255, 255, 255, 0.9);
}

.completed-challenges-header {
    font-size: 0.9rem;
    font-weight: 600;
    color: #666;
    margin: 15px 0 8px 0;
    padding-bottom: 5px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

/* Stats Styles */
.stats-section {
    background: rgba(255, 255, 255, 0.7);
    border-radius: 15px;
    padding: 15px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    margin-bottom: 15px;
}

.stats-section h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: #333;
}

#stats-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.stat-label {
    font-weight: 600;
    font-size: 0.9rem;
    color: #333;
}

.stat-value {
    font-weight: bold;
    font-size: 0.9rem;
    color: #007bff;
}

.stat-item:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: translateY(-1px);
}

/* Instructions Styles */
.instructions {
    background: rgba(255, 255, 255, 0.7);
    border-radius: 15px;
    padding: 15px;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.instructions h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: #333;
}

.instructions ul {
    list-style: none;
    padding-left: 0;
}

.instructions li {
    padding: 5px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    font-size: 0.9rem;
    line-height: 1.4;
}

.instructions li:last-child {
    border-bottom: none;
}

.instructions strong {
    color: #2c3e50;
    font-weight: 600;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .game-content {
        grid-template-columns: 350px 1fr;
    }
}

@media (max-width: 768px) {
    .game-content {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr;
        gap: 15px;
    }
    
    .sidebar {
        max-height: 500px;
        overflow-y: auto;
        padding: 25px;
    }
    
    .save-slots {
        grid-template-columns: 1fr;
    }
    
    .stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Mobile-friendly seed items */
    .seed-item {
        padding: 20px;
        margin-bottom: 15px;
    }
    
    .seed-item img {
        width: 50px;
        height: 50px;
    }
    
    .seed-name {
        font-size: 1rem;
    }
    
    .seed-price {
        font-size: 0.9rem;
    }
    
    .seed-stock {
        font-size: 0.8rem;
    }
    
    /* Ensure rare and legendary seeds maintain consistent sizing on mobile */
    
    /* Mobile-friendly sprinkler items */
    .sprinkler-item {
        padding: 18px;
        margin-bottom: 15px;
        min-height: 70px;
    }
    
    .sprinkler-name {
        font-size: 1.1rem;
    }
    
    .sprinkler-price {
        font-size: 1rem;
    }
    
    .sprinkler-desc {
        font-size: 0.9rem;
    }
    
    /* Mobile-friendly tool buttons */
    .tool-btn {
        padding: 18px;
        margin-bottom: 12px;
        min-height: 60px;
        font-size: 1.1rem;
    }
    
    .tool-level {
        font-size: 0.9rem;
        padding: 4px 8px;
    }
    
    /* Mobile-friendly upgrade buttons */
    .upgrade-btn {
        padding: 15px;
        margin-bottom: 12px;
        min-height: 60px;
        font-size: 1.1rem;
    }
    
    .upgrade-cost {
        font-size: 0.9rem;
        padding: 4px 8px;
    }
    
    /* Mobile-friendly sprinkler tools */
    .sprinkler-tool {
        padding: 18px;
        margin-bottom: 12px;
        min-height: 60px;
        font-size: 1.1rem;
    }
    
    /* Mobile-friendly section headers */
    
    /* Mobile-friendly challenges */
    .challenges-section {
        padding: 20px;
        margin-bottom: 20px;
    }
    
    .challenges-section h3 {
        font-size: 1.3rem;
        margin-bottom: 15px;
    }
    
    .challenge-item {
        padding: 15px;
        margin-bottom: 10px;
    }
    
    .challenge-header {
        margin-bottom: 10px;
    }
    
    .challenge-title {
        font-size: 1rem;
    }
    
    .challenge-description {
        font-size: 0.9rem;
        margin-bottom: 10px;
    }
    
    .challenge-reward {
        font-size: 0.9rem;
    }
    
    .progress-text {
        font-size: 0.8rem;
    }
    
    /* Purchase section styles */
.purchase-shop {
    margin: 20px 0;
    padding: 20px;
    background: linear-gradient(135deg, #e3f2fd 0%, #f3e5f5 100%);
    border-radius: 15px;
    border: 2px solid #bbdefb;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.purchase-shop h3 {
    margin: 0 0 15px 0;
    color: #1976d2;
    font-size: 1.4rem;
    text-align: center;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.purchase-section {
    margin: 0;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 0;
}
    
    .purchase-item {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 18px;
        margin-bottom: 12px;
        background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
        border-radius: 12px;
        border: 2px solid #e3f2fd;
        box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
        transition: all 0.3s ease;
        position: relative;
        overflow: hidden;
    }
    
    .purchase-item::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 3px;
        background: linear-gradient(90deg, #2196f3, #4caf50);
        opacity: 0;
        transition: opacity 0.3s ease;
    }
    
    .purchase-item:hover {
        transform: translateY(-3px);
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
        border-color: #bbdefb;
    }
    
    .purchase-item:hover::before {
        opacity: 1;
    }
    
    .purchase-info {
        flex: 1;
        margin-right: 15px;
    }
    
    .purchase-name {
        display: block;
        font-size: 1.1rem;
        font-weight: 600;
        color: #333;
        margin-bottom: 5px;
    }
    
    .purchase-price {
        display: block;
        font-size: 1rem;
        color: #28a745;
        font-weight: 600;
        margin-bottom: 5px;
    }
    
    .purchase-description {
        display: block;
        font-size: 0.9rem;
        color: #666;
        line-height: 1.4;
    }
    
    .purchase-btn {
        padding: 12px 24px;
        background: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
        color: white;
        border: none;
        border-radius: 8px;
        font-size: 1rem;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.3s ease;
        white-space: nowrap;
        box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
        position: relative;
        overflow: hidden;
    }
    
    .purchase-btn::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
        transition: left 0.5s ease;
    }
    
    .purchase-btn:hover {
        background: linear-gradient(135deg, #45a049 0%, #3d8b40 100%);
        transform: translateY(-2px);
        box-shadow: 0 6px 15px rgba(76, 175, 80, 0.4);
    }
    
    .purchase-btn:hover::before {
        left: 100%;
    }
    
    .purchase-btn:active {
        transform: translateY(0);
        box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
    }
    .seed-shop h3,
    .sprinkler-shop h3,
    .tools h3,
    .tools h4,
    .achievements-section h3,
    .instructions h3 {
        font-size: 1.4rem;
        margin-bottom: 20px;
    }
    
    /* Mobile-friendly achievement items */
    .achievement-item {
        padding: 15px;
        margin-bottom: 10px;
    }
    
    .achievement-name {
        font-size: 1.1rem;
    }
    
    .achievement-description {
        font-size: 1rem;
    }
    
    /* Mobile-friendly instructions */
    .instructions li {
        padding: 8px 0;
        font-size: 1rem;
    }
    
    /* Mobile-friendly stats */
    .stat {
        padding: 15px;
    }
    
    .stat-label {
        font-size: 1.1rem;
    }
    
    .stat-value {
        font-size: 1.2rem;
    }
    
    /* Mobile-friendly buttons */
    .menu-btn, .save-btn, .admin-btn, .expand-btn {
        padding: 15px 25px;
        font-size: 1.1rem;
        min-height: 50px;
    }
    
    /* Mobile-friendly garden area */
    .garden-area {
        padding: 25px;
    }
    
    /* Mobile-friendly season display */
    .season-display {
        padding: 20px 25px;
        margin-bottom: 20px;
    }
    
    #seasonText {
        font-size: 1.4rem;
    }
    
    .growth-multiplier {
        font-size: 1.1rem;
    }
    
    #gardenCanvas {
        max-width: 100%;
        height: auto;
        border-width: 3px;
    }
    
    .garden-info {
        margin-top: 20px;
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .game-container {
        padding: 15px;
    }
    
    .game-header {
        padding: 25px;
        margin-bottom: 15px;
    }
    
    .menu-container {
        padding: 25px;
    }
    
    .menu-container h1 {
        font-size: 2.2rem;
    }
    
    .menu-container p {
        font-size: 1.3rem;
    }
    
    .stats {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .stat {
        padding: 18px;
    }
    
    .stat-label {
        font-size: 1.2rem;
    }
    
    .stat-value {
        font-size: 1.3rem;
    }
    
    /* Extra mobile-friendly seed items */
    .seed-item {
        padding: 20px;
        margin-bottom: 18px;
        min-height: 80px;
    }
    
    .seed-item img {
        width: 55px;
        height: 55px;
    }
    
    .seed-name {
        font-size: 1.2rem;
    }
    
    .seed-price {
        font-size: 1.1rem;
    }
    
    .seed-stock {
        font-size: 1rem;
    }
    
    /* Extra mobile-friendly tool buttons */
    .tool-btn {
        padding: 20px;
        margin-bottom: 15px;
        min-height: 70px;
        font-size: 1.2rem;
    }
    
    .tool-level {
        font-size: 1rem;
        padding: 5px 10px;
    }
    
    /* Extra mobile-friendly upgrade buttons */
    .upgrade-btn {
        padding: 18px;
        margin-bottom: 15px;
        min-height: 70px;
        font-size: 1.2rem;
    }
    
    .upgrade-cost {
        font-size: 1rem;
        padding: 5px 10px;
    }
    
    /* Extra mobile-friendly sprinkler tools */
    .sprinkler-tool {
        padding: 20px;
        margin-bottom: 15px;
        min-height: 70px;
        font-size: 1.2rem;
    }
    
    /* Extra mobile-friendly section headers */
    .seed-shop h3,
    .sprinkler-shop h3,
    .tools h3,
    .tools h4,
    .achievements-section h3,
    .instructions h3 {
        font-size: 1.5rem;
        margin-bottom: 25px;
    }
    
    /* Extra mobile-friendly achievement items */
    .achievement-item {
        padding: 18px;
        margin-bottom: 12px;
    }
    
    .achievement-name {
        font-size: 1.2rem;
    }
    
    .achievement-description {
        font-size: 1.1rem;
    }
    
    /* Extra mobile-friendly instructions */
    .instructions li {
        padding: 10px 0;
        font-size: 1.1rem;
    }
    
    /* Extra mobile-friendly buttons */
    .menu-btn, .save-btn, .admin-btn, .expand-btn {
        padding: 18px 30px;
        font-size: 1.2rem;
        min-height: 60px;
    }
    
    /* Extra mobile-friendly garden area */
    .garden-area {
        padding: 30px;
    }
    
    #gardenCanvas {
        border-width: 4px;
    }
    
    .garden-info {
        margin-top: 25px;
        font-size: 1.2rem;
    }
    
    /* Extra mobile-friendly sidebar */
    .sidebar {
        padding: 30px;
        max-height: 600px;
    }
    
    /* Extra mobile-friendly save slots */
    .save-slot {
        padding: 25px;
    }
    
    .save-slot h3 {
        font-size: 1.5rem;
    }
    
    .slot-status {
        font-size: 1.2rem;
    }
    
    .slot-date {
        font-size: 1.1rem;
    }
    
    .load-btn, .new-btn {
        padding: 15px 25px;
        font-size: 1.1rem;
        min-height: 50px;
    }
}

/* Touch-friendly garden canvas */
@media (max-width: 768px) {
    #gardenCanvas {
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
    }
    
    /* Increase garden cell size for better touch targets */
    .garden-area {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        min-height: 70vh;
    }
}

/* Extra touch-friendly for very small screens */
@media (max-width: 360px) {
    .game-container {
        padding: 10px;
    }
    
    .game-header {
        padding: 20px;
    }
    
    .sidebar {
        padding: 20px;
    }
    
    .garden-area {
        padding: 20px;
    }
    
    .menu-container {
        padding: 20px;
    }
    
    .menu-container h1 {
        font-size: 1.8rem;
    }
    
    .menu-container p {
        font-size: 1.1rem;
    }
    
    /* Ensure minimum touch target sizes */
    .seed-item,
    .sprinkler-item,
    .tool-btn,
    .upgrade-btn,
    .sprinkler-tool,
    .menu-btn,
    .save-btn,
    .admin-btn,
    .load-btn,
    .new-btn {
        min-height: 44px; /* Apple's recommended minimum touch target */
    }
}

/* Multiplayer Panel Styles */
.multiplayer-panel {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.multiplayer-panel h3 {
    color: white;
    margin: 0 0 15px 0;
    text-align: center;
    font-size: 1.2em;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.multiplayer-status {
    text-align: center;
    margin-bottom: 15px;
}

.multiplayer-status span {
    color: white;
    font-weight: bold;
    padding: 5px 10px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.2);
    font-size: 0.9em;
}

.multiplayer-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 15px;
}

.multiplayer-btn {
    background: rgba(255, 255, 255, 0.9);
    border: none;
    padding: 10px 15px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.multiplayer-btn:hover {
    background: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.friends-list, .chat-panel {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 15px;
    margin-top: 10px;
}

.friends-list h4, .chat-panel h4 {
    color: white;
    margin: 0 0 10px 0;
    font-size: 1em;
}

#onlineFriends {
    color: white;
    font-size: 0.9em;
}

.chat-messages {
    height: 150px;
    overflow-y: auto;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 10px;
    margin-bottom: 10px;
    color: white;
    font-size: 0.85em;
}

.chat-input {
    display: flex;
    gap: 5px;
}

.chat-input input {
    flex: 1;
    padding: 8px;
    border: none;
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.9);
    font-size: 0.9em;
}

.chat-input button {
    padding: 8px 15px;
    border: none;
    border-radius: 15px;
    background: #4CAF50;
    color: white;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.3s ease;
}

.chat-input button:hover {
    background: #45a049;
}

.friend-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.friend-name {
    color: white;
    font-weight: bold;
}

.friend-status {
    font-size: 1.2em;
}

.friend-item.pending {
    background: rgba(255, 193, 7, 0.2);
    border-left: 3px solid #ffc107;
}

.friend-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex: 1;
}

.friend-actions {
    display: flex;
    gap: 4px;
    margin-left: 8px;
}

.accept-btn-small, .reject-btn-small {
    padding: 3px 8px;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 10px;
    font-weight: bold;
}

.accept-btn-small {
    background: #4CAF50;
    color: white;
}

.accept-btn-small:hover {
    background: #45a049;
}

.reject-btn-small {
    background: #f44336;
    color: white;
}

.reject-btn-small:hover {
    background: #da190b;
}

.unfriend-btn-small {
    background: #ff8800;
    color: white;
    border: none;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 10px;
    cursor: pointer;
    margin-left: 5px;
}

.unfriend-btn-small:hover {
    background: #cc6600;
}

.friends-list h4 {
    margin: 15px 0 8px 0;
    color: #FFD700;
    font-size: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 4px;
}

.chat-message {
    margin-bottom: 8px;
    padding: 5px 0;
}

.chat-username {
    color: #FFD700;
    font-weight: bold;
    margin-right: 5px;
}

/* Special styling for [DEV] tag */
.chat-username.dev-username {
    color: #FF6B6B !important;
    text-shadow: 0 0 5px rgba(255, 107, 107, 0.5);
    font-weight: bold;
}

.chat-text {
    color: white;
}

.chat-auto-update-info {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.75em;
    font-style: italic;
    text-align: center;
    margin-top: 8px;
    padding: 4px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}
}

/* Add Friend Section */
.add-friend-section {
    margin-top: 10px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.add-friend-section input {
    width: 60%;
    padding: 6px;
    margin-right: 8px;
    border: 1px solid #ddd;
    border-radius: 3px;
    background: white;
    color: #333;
}

.add-friend-section button {
    padding: 6px 12px;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
}

.add-friend-section button:hover {
    background: #45a049;
}

.add-friend-section button:disabled {
    background: #cccccc;
    cursor: not-allowed;
}

.add-friend-section input:disabled {
    background: #f5f5f5;
    cursor: not-allowed;
}

/* Friend Request Notification */
.friend-request-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    animation: slideInRight 0.3s ease-out;
    max-width: 300px;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.notification-content h4 {
    margin: 0 0 8px 0;
    font-size: 16px;
}

.notification-content p {
    margin: 0 0 12px 0;
    font-size: 14px;
}

.notification-buttons {
    display: flex;
    gap: 8px;
}

.accept-btn, .reject-btn {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    flex: 1;
}

.accept-btn {
    background: #4CAF50;
    color: white;
}

.accept-btn:hover {
    background: #45a049;
}

.reject-btn {
    background: #f44336;
    color: white;
}

.reject-btn:hover {
    background: #da190b;
}

/* Admin Panel Styles */
.admin-btn {
    background: #9b59b6;
    color: white;
}

.admin-btn:hover {
    background: #8e44ad;
    transform: translateY(-2px);
}

/* Admin Modal Styles */
.admin-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.admin-modal-content {
    background-color: #fefefe;
    margin: 2% auto;
    padding: 0;
    border-radius: 15px;
    width: 90%;
    max-width: 600px;
    max-height: 85vh;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.admin-modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
}

.close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

.close-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.admin-modal-body {
    padding: 15px;
    max-height: 55vh;
    overflow-y: auto;
}

/* Admin Tabs */
.admin-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 10px;
}

.admin-tab {
    padding: 8px 16px;
    border: none;
    background: #f8f9fa;
    color: #666;
    cursor: pointer;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.admin-tab:hover {
    background: #e9ecef;
    color: #333;
}

.admin-tab.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

/* Admin Tab Content */
.admin-tab-content {
    display: none;
}

.admin-tab-content.active {
    display: block;
}

.admin-tab-content h3 {
    margin-bottom: 15px;
    color: #333;
    font-size: 1.2rem;
}

.admin-tab-content h4 {
    margin: 20px 0 10px 0;
    color: #666;
    font-size: 1rem;
}

/* Admin Sections */
.admin-section {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 12px;
}

/* Admin Input Groups */
.admin-input-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    padding: 8px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.admin-input-group label {
    font-weight: 600;
    color: #333;
    min-width: 100px;
    font-size: 0.9rem;
}

.admin-input-group input,
.admin-input-group select {
    flex: 1;
    min-width: 120px;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.9rem;
}

.admin-input-group button {
    padding: 8px 16px;
    background: #28a745;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.admin-input-group button:hover {
    background: #218838;
    transform: translateY(-1px);
}

/* Admin Buttons */
.admin-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.admin-action-btn {
    padding: 8px 12px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.admin-action-btn:hover {
    background: #0056b3;
    transform: translateY(-2px);
}

.admin-danger-btn {
    padding: 8px 12px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.admin-danger-btn:hover {
    background: #c82333;
    transform: translateY(-2px);
}

/* Admin Modal Footer */
.admin-modal-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-top: 15px;
    padding: 15px;
    border-top: 1px solid #ddd;
}

.admin-warning {
    background-color: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 5px;
    padding: 15px;
    margin-top: 15px;
    color: #856404;
}

.admin-warning p {
    margin: 5px 0;
    font-size: 14px;
    line-height: 1.4;
}

.admin-warning strong {
    color: #d63031;
}

/* Mobile Responsive Admin Panel */
@media (max-width: 768px) {
    .admin-modal-content {
        margin: 2% auto;
        width: 95%;
        max-height: 95vh;
    }
    
    .admin-modal-header {
        padding: 15px;
    }
    
    .admin-modal-header h2 {
        font-size: 1.3rem;
    }
    
    .admin-modal-body {
        padding: 15px;
        max-height: 70vh;
    }
    
    .admin-tabs {
        gap: 3px;
    }
    
    .admin-tab {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
    
    .admin-input-group {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    
    .admin-input-group label {
        min-width: auto;
        text-align: left;
    }
    
    .admin-input-group input,
    .admin-input-group select {
        min-width: auto;
    }
    
    .admin-input-group button {
        align-self: stretch;
    }
    
    .admin-buttons {
        flex-direction: column;
    }
    
    .admin-action-btn,
    .admin-danger-btn {
        width: 100%;
        text-align: center;
    }
    
    .admin-modal-footer {
        flex-direction: column;
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .admin-modal-content {
        margin: 1% auto;
        width: 98%;
        max-height: 98vh;
    }
    
    .admin-modal-header h2 {
        font-size: 1.2rem;
    }
    
    .admin-tab {
        padding: 5px 10px;
        font-size: 0.75rem;
    }
    
    .admin-input-group {
        padding: 8px;
    }
    
    .admin-input-group label {
        font-size: 0.85rem;
    }
    
    .admin-input-group input,
    .admin-input-group select,
    .admin-input-group button {
        font-size: 0.85rem;
    }
}

/* Win Screen Styles */
#winOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    animation: fadeIn 0.5s ease-in-out;
}

.win-content {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 90%;
    animation: slideIn 0.6s ease-out;
}

.win-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    animation: bounce 1s ease-in-out infinite;
}

.win-content h1 {
    color: #2c3e50;
    font-size: 2.5rem;
    margin-bottom: 10px;
    font-weight: bold;
}

.win-content h2 {
    color: #e74c3c;
    font-size: 2rem;
    margin-bottom: 20px;
    font-weight: bold;
}

.win-content p {
    color: #34495e;
    font-size: 1.1rem;
    margin-bottom: 25px;
    line-height: 1.6;
}

.win-stats {
    background: rgba(52, 152, 219, 0.1);
    border-radius: 15px;
    padding: 20px;
    margin: 25px 0;
    border: 2px solid rgba(52, 152, 219, 0.3);
}

.win-stats p {
    margin: 10px 0;
    font-size: 1rem;
    color: #2c3e50;
}

.win-stats strong {
    color: #3498db;
}

.win-btn {
    background: linear-gradient(45deg, #27ae60, #2ecc71);
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 1.2rem;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
    box-shadow: 0 5px 15px rgba(39, 174, 96, 0.3);
}

.win-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(39, 174, 96, 0.4);
    background: linear-gradient(45deg, #2ecc71, #27ae60);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

/* Mobile Responsive Win Screen */
@media (max-width: 768px) {
    .win-content {
        padding: 30px 20px;
        margin: 20px;
    }
    
    .win-icon {
        font-size: 3rem;
    }
    
    .win-content h1 {
        font-size: 2rem;
    }
    
    .win-content h2 {
        font-size: 1.5rem;
    }
    
    .win-content p {
        font-size: 1rem;
    }
    
    .win-stats {
        padding: 15px;
        margin: 20px 0;
    }
    
    .win-btn {
        padding: 12px 25px;
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .win-content {
        padding: 25px 15px;
    }
    
    .win-icon {
        font-size: 2.5rem;
    }
    
    .win-content h1 {
        font-size: 1.8rem;
    }
    
    .win-content h2 {
        font-size: 1.3rem;
    }
    
    .win-stats {
        padding: 12px;
    }
    
    .win-btn {
        padding: 10px 20px;
        font-size: 1rem;
    }
}

/* Decoration Shop Styles */
.decoration-shop {
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    border: 2px solid #ddd;
}

.decoration-shop h3 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 1.1rem;
    text-align: center;
}

.decoration-categories {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.category-btn {
    padding: 8px 16px;
    border: 2px solid #ddd;
    background: #f8f9fa;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.category-btn:hover {
    border-color: #007bff;
    background: #e3f2fd;
}

.category-btn.active {
    border-color: #007bff;
    background: #007bff;
    color: white;
}

.decoration-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
    margin-bottom: 15px;
    max-height: 300px;
    overflow-y: auto;
}

.decoration-item {
    border: 2px solid #ddd;
    border-radius: 8px;
    padding: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
    display: flex;
    align-items: center;
    gap: 8px;
}

.decoration-item:hover {
    border-color: #007bff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.2);
}

.decoration-item.selected {
    border-color: #007bff;
    background: #e3f2fd;
}

.decoration-icon {
    font-size: 1.5rem;
    min-width: 30px;
    text-align: center;
}

.decoration-info {
    flex: 1;
}

.decoration-name {
    font-weight: bold;
    font-size: 0.9rem;
    margin-bottom: 3px;
}

.decoration-cost {
    color: #28a745;
    font-weight: bold;
    font-size: 0.8rem;
    margin-bottom: 3px;
}

.decoration-description {
    color: #666;
    font-size: 0.7rem;
    line-height: 1.2;
}

.decoration-info-panel {
    background: #f8f9fa;
    border: 2px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    margin-top: 15px;
}

.decoration-info-panel h4 {
    margin: 0 0 8px 0;
    color: #333;
    font-size: 1rem;
}

.decoration-info-panel p {
    margin: 3px 0;
    color: #666;
    font-size: 0.8rem;
}

/* Mobile Responsive Decoration Shop */
@media (max-width: 768px) {
    .decoration-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 8px;
    }

    .decoration-item {
        padding: 8px;
    }

    .decoration-icon {
        font-size: 1.2rem;
        min-width: 25px;
    }

    .decoration-name {
        font-size: 0.8rem;
    }

    .decoration-cost {
        font-size: 0.7rem;
    }

    .decoration-description {
        font-size: 0.6rem;
    }

    .category-btn {
        padding: 4px 8px;
        font-size: 0.7rem;
    }
}

/* Garden Viewer Modal Styles */
.garden-viewer-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    overflow-y: auto;
}

.garden-viewer-content {
    background: white;
    padding: 20px;
    border-radius: 15px;
    max-width: 90vw;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.garden-info {
    margin-bottom: 20px;
    padding: 15px;
    background: #f5f5f5;
    border-radius: 10px;
    border: 1px solid #e0e0e0;
}

.garden-grid {
    display: inline-grid;
    gap: 2px;
    background: #8B4513;
    padding: 10px;
    border-radius: 10px;
    border: 3px solid #654321;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.3);
}

.garden-cell {
    border: 1px solid #654321;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: default;
    transition: all 0.2s;
}

.garden-cell:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.plant-cell {
    background: #90EE90;
}

.sprinkler-cell {
    background: #87CEEB;
}

.empty-cell {
    background: #8B4513;
}

/* Friend Selection Modal Styles */
.friend-selection-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.friend-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    margin: 10px 0;
    background: white;
    border-radius: 10px;
    border: 2px solid #e0e0e0;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.friend-item:hover {
    border-color: #4CAF50;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transform: translateY(-2px);
}

.friends-list {
    max-height: 400px;
    overflow-y: auto;
    padding-right: 10px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .garden-viewer-content {
        max-width: 95vw;
        padding: 15px;
    }
    
    .garden-grid {
        padding: 5px;
    }
    
    .friend-selection-modal > div {
        max-width: 95vw;
        margin: 10px;
    }
}
