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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    position: relative;
    margin-left: 180px; /* Make room for sidebar ad */
}

/* Vertical Sidebar Ad */
.sidebar-ad {
    position: fixed;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1000;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    padding: 10px;
}

.ad-unit-vertical {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Fallback ad placeholder */
.sidebar-ad::before {
    content: "Advertisement";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #666;
    font-size: 0.8rem;
    pointer-events: none;
    z-index: -1;
}

header {
    background: rgba(255, 255, 255, 0.95);
    padding: 1rem;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

header h1 {
    font-size: 2.5rem;
    color: #4a5568;
    margin-bottom: 0.5rem;
}

header p {
    color: #666;
    font-size: 1.1rem;
}

/* Navigation */
.main-nav {
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
    margin-bottom: 2rem;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    justify-content: center;
    gap: 2rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    color: #4a5568;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
}

.nav-link:hover {
    color: #667eea;
    background: rgba(102, 126, 234, 0.05);
}

.nav-link.active {
    color: #667eea;
    border-bottom-color: #667eea;
}

.nav-icon {
    width: 20px;
    height: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

section {
    background: white;
    margin-bottom: 2rem;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

h2 {
    color: #2d3748;
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
    border-bottom: 3px solid #667eea;
    padding-bottom: 0.5rem;
}

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

.tank-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: #f0fff4;
    border: 2px solid #48bb78;
    border-radius: 8px;
    padding: 0.5rem 1rem;
    animation: slideIn 0.3s ease-out;
}

.tank-status .status-icon {
    font-size: 1.2rem;
}

.tank-status .status-text {
    color: #22543d;
    font-weight: 600;
    font-size: 0.9rem;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

.input-group {
    display: flex;
    flex-direction: column;
}

.input-group label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #4a5568;
}

.input-group input,
.input-group select {
    padding: 0.75rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.input-group input:focus,
.input-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.input-group.optional {
    opacity: 0.8;
}

.input-group.optional:hover {
    opacity: 1;
}

.optional-text {
    font-weight: normal;
    color: #718096;
    font-size: 0.9rem;
}

.search-container {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.search-input-wrapper {
    position: relative;
    flex: 1;
}

.search-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 2px solid #e2e8f0;
    border-top: none;
    border-radius: 0 0 8px 8px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

.search-dropdown-item {
    padding: 0.75rem 1rem;
    cursor: pointer;
    border-bottom: 1px solid #f1f5f9;
    transition: background-color 0.2s ease;
}

.search-dropdown-item:hover,
.search-dropdown-item.highlighted {
    background-color: #f8fafc;
}

.search-dropdown-item:last-child {
    border-bottom: none;
}

.search-dropdown-item .fish-name {
    font-weight: 600;
    color: #2d3748;
}

.search-dropdown-item .fish-scientific {
    font-size: 0.85rem;
    color: #666;
    font-style: italic;
    margin-top: 0.2rem;
}

#fish-search-input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

#fish-search-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

#search-btn {
    padding: 0.75rem 1.5rem;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#search-btn:hover {
    background: #5a67d8;
}

.search-results {
    display: block;
}

.search-results-header {
    margin-bottom: 1.5rem;
}

.search-results-header h4 {
    color: #2d3748;
    font-size: 1.2rem;
    margin: 0;
    font-weight: 600;
}

.search-results-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(280px, max-content));
    gap: 1.5rem;
    justify-content: start;
    max-width: 100%;
}

.fish-card {
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.5rem;
    background: #f8f9fa;
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 200px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.fish-card:hover {
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.fish-card h4 {
    color: #2d3748;
    margin-bottom: 0.8rem;
    font-size: 1.3rem;
    line-height: 1.3;
    font-weight: 700;
}

.fish-card p {
    color: #4a5568;
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.fish-card .add-btn {
    background: #48bb78;
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-top: auto;
}

.fish-card .add-btn:hover {
    background: #38a169;
}

.fish-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
}

.selected-fish-card {
    border: 2px solid #48bb78;
    border-radius: 8px;
    padding: 1rem;
    background: #f0fff4;
    position: relative;
}

.selected-fish-card.quantity-warning {
    border-color: #f6ad55;
    background: #fffbeb;
}

.warning-text {
    color: #c53030;
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

.selected-fish-card h4 {
    color: #2d3748;
    margin-bottom: 0.5rem;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0.5rem 0;
}

.quantity-btn {
    background: #667eea;
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
}

.remove-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: #e53e3e;
    color: white;
    border: none;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.8rem;
}

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

.result-card {
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    background: #f8f9fa;
}

.result-card h3 {
    color: #2d3748;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.status-indicator {
    font-size: 3rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.status-good { color: #48bb78; }
.status-warning { color: #ed8936; }
.status-danger { color: #e53e3e; }

.recommendations {
    background: #f7fafc;
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.recommendations h3 {
    color: #2d3748;
    margin-bottom: 1rem;
}

.recommendations ul {
    list-style: none;
}

.recommendations li {
    padding: 0.5rem 0;
    color: #4a5568;
}

.recommendations li::before {
    content: "💡 ";
    margin-right: 0.5rem;
}

/* Ad Banner Styles */
.ad-banner-header {
    background: #f8f9fa;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    text-align: center;
    padding: 1rem;
    margin-bottom: 2rem;
}

.ad-banner-content {
    background: #f8f9fa;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    text-align: center;
    padding: 1rem;
    margin: 2rem 0;
}

.ad-unit-header,
.ad-unit-content {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 90px;
}

.ad-unit-content {
    min-height: 280px;
}

/* Responsive Ad Adjustments */
@media (max-width: 768px) {
    .ad-banner-header .adsbygoogle {
        width: 320px !important;
        height: 50px !important;
    }
    
    .ad-banner-content .adsbygoogle {
        width: 300px !important; 
        height: 250px !important;
    }
}

footer {
    text-align: center;
    padding: 2rem;
    color: white;
    background: rgba(0,0,0,0.2);
}

/* Enhanced Search Styles */
.search-description {
    color: #666;
    font-size: 1rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.search-suggestions {
    margin: 1rem 0 1.5rem 0;
    text-align: center;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.search-suggestions p {
    margin: 0;
    color: #4a5568;
}

.search-tag {
    display: inline-block;
    background: #667eea;
    color: white;
    padding: 0.3rem 0.8rem;
    margin: 0.2rem;
    border-radius: 15px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.search-tag:hover {
    background: #5a67d8;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

#fish-search-input {
    font-size: 1rem;
    padding: 0.875rem 1rem;
}

#search-btn {
    font-weight: 600;
    font-size: 1rem;
}

/* Fish Browser Styles */
.fish-browser {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
}



.fish-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin-bottom: 1rem;
}

.fish-tag {
    background: #667eea;
    color: white;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
}

.fish-tag.beginner {
    background: #48bb78;
}

.fish-tag.schooling {
    background: #ed64a6;
}

.fish-tag.community {
    background: #38b2ac;
}

.browse-add-btn {
    width: 100%;
    padding: 0.75rem;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

.browse-add-btn:hover {
    background: #5a67d8;
}

/* FAQ Section */
.faq-section {
    background: white;
    margin-bottom: 2rem;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.faq-container {
    display: grid;
    gap: 1.5rem;
}

.faq-item {
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 1rem;
}

.faq-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.faq-item h3 {
    color: #2d3748;
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.faq-item p {
    color: #4a5568;
    line-height: 1.6;
    margin: 0;
}

/* Tablet responsive - 2 columns for medium screens */
@media (max-width: 1200px) and (min-width: 769px) {
    .search-results-grid {
        grid-template-columns: repeat(2, minmax(280px, max-content));
    }
}

@media (max-width: 768px) {
    body {
        margin-left: 0; /* Remove sidebar margin on mobile */
    }
    
    .sidebar-ad {
        display: none; /* Hide sidebar ad on mobile */
    }
    
    /* Navigation mobile styles */
    .nav-container {
        gap: 0;
        padding: 0;
    }
    
    .nav-link {
        flex: 1;
        flex-direction: column;
        padding: 0.75rem 0.5rem;
        font-size: 0.9rem;
    }
    
    .nav-icon {
        width: 18px;
        height: 18px;
    }
    
    .container {
        padding: 0 0.5rem;
    }
    
    section {
        padding: 1.5rem;
        margin-bottom: 1rem;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .config-grid {
        grid-template-columns: 1fr;
    }
    
    .tank-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .tank-status {
        align-self: stretch;
        justify-content: center;
    }
    
    .search-container {
        flex-direction: column;
    }
    
    
    .search-results-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        justify-content: start;
    }
    
    .fish-card {
        min-height: 160px;
        padding: 1rem;
    }
    
    .results-grid {
        grid-template-columns: 1fr;
    }
    
    
}