/* Reset and Base */
* {
    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;
}

/* Navigation */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-brand a {
    font-size: 1.5rem;
    font-weight: bold;
    color: #667eea;
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.nav-links a {
    color: #555;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: #667eea;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    min-height: calc(100vh - 140px);
}

/* Flash Messages */
.flash-messages {
    margin-bottom: 1.5rem;
}

.alert {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 0.5rem;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: all 0.3s;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-success:hover {
    background: #218838;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #c82333;
}

.btn-disabled {
    background: #e9ecef;
    color: #6c757d;
    cursor: not-allowed;
}

.btn-full {
    width: 100%;
}

.btn-small {
    padding: 0.4rem 0.8rem;
    font-size: 0.875rem;
}

/* Forms */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #555;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* Main Page */
.main-page {
    text-align: center;
    padding: 2rem 0;
}

.hero {
    background: rgba(255, 255, 255, 0.95);
    padding: 3rem;
    border-radius: 20px;
    margin-bottom: 2rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.hero h1 {
    font-size: 2.5rem;
    color: #333;
    margin-bottom: 1rem;
}

.subtitle {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 1.5rem;
}

.weather-display {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #f8f9fa;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
}

.weather-label {
    color: #666;
}

.weather-value {
    font-weight: bold;
    color: #667eea;
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.feature-card {
    background: rgba(255, 255, 255, 0.95);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

.feature-card:hover {
    transform: translateY(-5px);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    color: #333;
    margin-bottom: 0.5rem;
}

.feature-card p {
    color: #666;
}

.actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* Auth Page */
.auth-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
}

.auth-box {
    background: rgba(255, 255, 255, 0.95);
    padding: 2.5rem;
    border-radius: 15px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.auth-box h2 {
    text-align: center;
    margin-bottom: 1.5rem;
    color: #333;
}

.auth-link {
    text-align: center;
    margin-top: 1.5rem;
    color: #666;
}

.auth-link a {
    color: #667eea;
    text-decoration: none;
}

/* Profile Page */
.profile-page {
    max-width: 800px;
    margin: 0 auto;
}

.profile-page h2 {
    color: white;
    text-align: center;
    margin-bottom: 1.5rem;
}

.profile-card {
    background: rgba(255, 255, 255, 0.95);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid #e0e0e0;
}

.avatar {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    font-weight: bold;
}

.profile-info h3 {
    font-size: 1.5rem;
    color: #333;
    margin-bottom: 0.5rem;
}

.level-badge {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.25rem 1rem;
    border-radius: 50px;
    font-size: 0.875rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-item {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
}

.stat-label {
    color: #666;
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

.stat-value {
    color: #333;
    font-weight: bold;
    font-size: 1.1rem;
}

.experience-bar {
    margin-bottom: 1.5rem;
}

.progress {
    height: 20px;
    background: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    transition: width 0.3s;
}

.progress-text {
    color: #666;
    font-size: 0.875rem;
}

.profile-meta {
    color: #999;
    font-size: 0.875rem;
}

/* Game Page */
.game-page h2 {
    color: white;
    text-align: center;
    margin-bottom: 1rem;
}

.weather-banner {
    text-align: center;
    background: rgba(255, 255, 255, 0.9);
    padding: 0.75rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.plots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
}

.plot-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.plot-card.locked {
    opacity: 0.7;
    background: #e9ecef;
}

.plot-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.plot-number {
    font-weight: bold;
    color: #667eea;
}

.fertilized-badge {
    font-size: 1.2rem;
}

.plot-content {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.plant {
    font-size: 3rem;
}

.plant-name {
    font-weight: bold;
    color: #333;
}

.ready-badge {
    background: #d4edda;
    color: #155724;
    padding: 0.5rem;
    border-radius: 8px;
    font-weight: 500;
}

.progress-container {
    height: 15px;
    background: #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
}

.time-left {
    color: #666;
    font-size: 0.875rem;
}

.plot-empty,
.plot-locked {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.empty-icon,
.lock-icon {
    font-size: 3rem;
    opacity: 0.5;
}

/* Shop Page */
.shop-page h2 {
    color: white;
    text-align: center;
    margin-bottom: 1rem;
}

.balance-display {
    display: flex;
    justify-content: center;
    gap: 2rem;
    background: rgba(255, 255, 255, 0.9);
    padding: 1rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.shop-section {
    margin-bottom: 2rem;
}

.shop-section h3 {
    color: white;
    margin-bottom: 1rem;
}

.seeds-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.5rem;
}

.seed-card {
    background: rgba(255, 255, 255, 0.95);
    padding: 1.5rem;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.seed-card.locked {
    opacity: 0.7;
}

.seed-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.seed-card h4 {
    color: #333;
    margin-bottom: 0.5rem;
}

.seed-desc {
    color: #666;
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
}

.seed-stats {
    display: flex;
    justify-content: space-around;
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 0.75rem;
}

.seed-price {
    font-size: 1.25rem;
    font-weight: bold;
    color: #667eea;
    margin-bottom: 0.75rem;
}

.level-requirement {
    color: #dc3545;
    font-size: 0.875rem;
}

.plots-shop,
.fertilizers-shop {
    display: flex;
    justify-content: center;
}

.plot-shop-card,
.fertilizer-card {
    background: rgba(255, 255, 255, 0.95);
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    max-width: 300px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.plot-icon,
.fertilizer-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.plot-count {
    color: #666;
    margin-bottom: 0.75rem;
}

/* Inventory Page */
.inventory-page h2 {
    color: white;
    text-align: center;
    margin-bottom: 1.5rem;
}

.inventory-section {
    margin-bottom: 2rem;
}

.inventory-section h3 {
    color: white;
    margin-bottom: 1rem;
}

.inventory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

.inventory-card {
    background: rgba(255, 255, 255, 0.95);
    padding: 1.5rem;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.item-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.inventory-card h4 {
    color: #333;
    margin-bottom: 0.5rem;
}

.item-quantity {
    color: #667eea;
    font-weight: bold;
    margin-bottom: 1rem;
}

.plant-section,
.fertilize-section {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e0e0e0;
}

.plant-section label,
.fertilize-section label {
    display: block;
    margin-bottom: 0.5rem;
    color: #666;
    font-size: 0.875rem;
}

.plot-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

.no-plots {
    color: #999;
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

.empty-message {
    background: rgba(255, 255, 255, 0.9);
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    color: #666;
}

.empty-message a {
    color: #667eea;
}

.fertilizers-display {
    background: rgba(255, 255, 255, 0.95);
    padding: 1.5rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.fertilizer-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.fertilizer-icon-large {
    font-size: 2.5rem;
}

.fertilizer-count {
    font-size: 1.25rem;
    font-weight: bold;
    color: #333;
}

/* Sell Page */
.sell-page h2 {
    color: white;
    text-align: center;
    margin-bottom: 0.5rem;
}

.subtitle {
    color: rgba(255, 255, 255, 0.8);
    text-align: center;
    margin-bottom: 1.5rem;
}

.market-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.market-card {
    background: rgba(255, 255, 255, 0.95);
    padding: 1.5rem;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.crop-icon {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.market-card h4 {
    color: #333;
    margin-bottom: 0.75rem;
}

.crop-info {
    display: flex;
    justify-content: space-around;
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

.quantity {
    color: #666;
}

.price {
    color: #28a745;
    font-weight: bold;
}

.sell-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

.empty-market {
    background: rgba(255, 255, 255, 0.95);
    padding: 3rem;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.empty-market h3 {
    color: #333;
    margin-bottom: 0.5rem;
}

.empty-market p {
    color: #666;
}

.empty-market a {
    color: #667eea;
}

/* Top Page */
.top-page h2 {
    color: white;
    text-align: center;
    margin-bottom: 1.5rem;
}

.top-sections {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.top-section {
    background: rgba(255, 255, 255, 0.95);
    padding: 1.5rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.top-section h3 {
    color: #333;
    margin-bottom: 1rem;
    text-align: center;
}

.top-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.top-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.top-item.gold {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4a 100%);
}

.top-item.silver {
    background: linear-gradient(135deg, #c0c0c0 0%, #e8e8e8 100%);
}

.top-item.bronze {
    background: linear-gradient(135deg, #cd7f32 0%, #daa520 100%);
}

.rank {
    font-weight: bold;
    width: 40px;
}

.username {
    flex: 1;
    font-weight: 500;
}

.value {
    font-weight: bold;
    color: #667eea;
}

.empty {
    text-align: center;
    color: #666;
    padding: 2rem;
}

/* Admin Page */
.admin-page h2 {
    color: white;
    text-align: center;
    margin-bottom: 1.5rem;
}

.admin-menu {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.admin-card {
    background: rgba(255, 255, 255, 0.95);
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

.admin-card:hover {
    transform: translateY(-5px);
}

.admin-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.admin-card h3 {
    color: #333;
    margin-bottom: 0.5rem;
}

.admin-card p {
    color: #666;
    font-size: 0.875rem;
}

.admin-section {
    background: rgba(255, 255, 255, 0.95);
    padding: 2rem;
    border-radius: 15px;
    margin-bottom: 1.5rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.admin-section h3 {
    color: #333;
    margin-bottom: 1rem;
}

.admin-form {
    max-width: 600px;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.admin-table th,
.admin-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.admin-table th {
    background: #f8f9fa;
    font-weight: 600;
}

.current-weather {
    background: rgba(255, 255, 255, 0.95);
    padding: 1.5rem;
    border-radius: 15px;
    margin-bottom: 1.5rem;
    text-align: center;
}

.current-weather h3 {
    margin-bottom: 0.75rem;
    color: #333;
}

.weather-info {
    display: flex;
    justify-content: center;
    gap: 2rem;
}

.weather-condition {
    font-size: 1.25rem;
    font-weight: 500;
}

.weather-multiplier {
    color: #667eea;
    font-weight: bold;
}

.weather-info-section {
    background: rgba(255, 255, 255, 0.95);
    padding: 1.5rem;
    border-radius: 15px;
    margin-bottom: 1.5rem;
}

.weather-info-section h3 {
    margin-bottom: 0.75rem;
    color: #333;
}

.weather-info-section ul {
    list-style: none;
    padding: 0;
}

.weather-info-section li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #e0e0e0;
}

.weather-info-section li:last-child {
    border-bottom: none;
}

.seeds-admin-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.seed-admin-card {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 10px;
}

.seed-header h4 {
    color: #333;
    margin-bottom: 1rem;
}

.seed-actions {
    margin-top: 1rem;
}

.delete-form {
    margin-top: 0.5rem;
}

.users-list {
    background: rgba(255, 255, 255, 0.95);
    padding: 1.5rem;
    border-radius: 15px;
    margin-bottom: 1.5rem;
}

.users-list h3 {
    margin-bottom: 1rem;
    color: #333;
}

/* Error Page */
.error-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
}

.error-content {
    background: rgba(255, 255, 255, 0.95);
    padding: 3rem;
    border-radius: 15px;
    text-align: center;
    max-width: 500px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.error-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.error-content h2 {
    color: #333;
    margin-bottom: 0.5rem;
}

.error-content p {
    color: #666;
    margin-bottom: 1.5rem;
}

.error-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* Footer */
.footer {
    background: rgba(255, 255, 255, 0.95);
    padding: 1rem;
    text-align: center;
    color: #666;
}

/* Responsive */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-links {
        justify-content: center;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .actions {
        flex-direction: column;
    }
    
    .top-sections {
        grid-template-columns: 1fr;
    }
}
