/* Public header */
.public-header {
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    height: 80px;
}
.header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}
.header-left { display: flex; align-items: center; gap: 16px; flex-shrink: 0; }
.logo-link { display: flex; align-items: center; gap: 12px; transition: opacity 0.2s; }
.logo-link:hover { opacity: 0.8; }
.mushroom-icon { width: 36px; height: 36px; color: #667eea; }
.site-title { font-size: 28px; font-weight: 700; color: #333; }
.tagline { color: #666; font-size: 14px; padding-left: 16px; border-left: 2px solid #e0e0e0; }
.header-search { flex: 1; max-width: 500px; display: flex; gap: 12px; }
.header-search input {
    flex: 1; padding: 12px 16px; border: 2px solid #e0e0e0; border-radius: 8px; font-size: 15px; transition: border-color 0.2s;
}
.header-search input:focus { outline: none; border-color: #667eea; }
.header-search button {
    padding: 12px 24px; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; border: none; border-radius: 8px; font-size: 15px; font-weight: 600; cursor: pointer; transition: transform 0.2s; white-space: nowrap;
}
.header-search button:hover { transform: translateY(-2px); }
.admin-btn {
    padding: 12px 28px; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; border: none; border-radius: 8px; font-size: 15px; font-weight: 600; cursor: pointer; transition: transform 0.2s, box-shadow 0.2s; flex-shrink: 0;
}
.admin-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4); }

/* Alphabetical Index */
.alpha-index {
    background: white; border-bottom: 1px solid #e0e0e0; position: fixed; top: 80px; left: 0; right: 0; z-index: 90; overflow-x: auto; white-space: nowrap; padding: 12px 0; box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
.alpha-container { max-width: 1400px; margin: 0 auto; padding: 0 40px; display: flex; gap: 8px; align-items: center; }
.view-toggle { display: flex; gap: 4px; margin-right: 16px; padding-right: 16px; border-right: 2px solid #e0e0e0; }
.toggle-btn { padding: 6px 12px; color: #666; font-weight: 600; font-size: 14px; border-radius: 6px; transition: all 0.2s; text-decoration: none; }
.toggle-btn:hover { background: #f0f0f0; color: #333; }
.toggle-btn.active { background: #667eea; color: white; }
.alpha-item { padding: 6px 12px; color: #666; font-weight: 600; font-size: 14px; border-radius: 6px; transition: all 0.2s; }
.alpha-item:hover { background: #f0f0f0; color: #333; }
.alpha-item.active { background: #667eea; color: white; }

/* Public main */
.public-main { max-width: 1400px; margin: 0 auto; padding: 160px 40px 40px; }
.mushroom-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 24px; }
.mushroom-card {
    background: white; border-radius: 12px; box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08); overflow: hidden; transition: transform 0.2s, box-shadow 0.2s; position: relative;
}
.mushroom-card:hover { transform: translateY(-4px); box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15); }
.mushroom-photo { width: 100%; height: 200px; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); display: flex; align-items: center; justify-content: center; }
.photo-placeholder { font-size: 80px; opacity: 0.3; }
.mushroom-info { padding: 24px; }
.mushroom-info h2 { color: #333; font-size: 22px; font-style: italic; margin-bottom: 16px; line-height: 1.3; }
.common-name { color: #666; font-size: 15px; margin: 8px 0; line-height: 1.5; }
.no-results { text-align: center; color: #666; font-size: 18px; padding: 60px; grid-column: 1 / -1; }
.card-link { text-decoration: none; color: inherit; display: block; }

/* Table view */
.table-container { background: white; border-radius: 8px; box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06); overflow: hidden; max-height: 70vh; overflow-y: auto; }
.mushroom-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.mushroom-table thead { background: #f1f3f5; border-bottom: 2px solid #dee2e6; position: sticky; top: 0; z-index: 10; }
.mushroom-table th { padding: 10px 12px; text-align: left; font-weight: 600; color: #495057; font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px; }
.mushroom-table td { padding: 8px 12px; border-bottom: 1px solid #e9ecef; color: #212529; vertical-align: middle; }
.mushroom-table tbody tr:nth-child(even) { background: #f8f9fa; }
.mushroom-table tbody tr:hover { background: #e9ecef; }
.mushroom-table .col-num { width: 50px; text-align: right; color: #868e96; font-size: 12px; font-family: 'SF Mono', 'Consolas', monospace; }
.mushroom-table td:nth-child(2) { font-family: 'SF Mono', 'Consolas', monospace; font-size: 13px; font-style: italic; color: #1a1a1a; }
.mushroom-table a { color: #667eea; text-decoration: none; }
.mushroom-table a:hover { text-decoration: underline; }

/* Admin actions */
.status-btn {
    padding: 4px 10px; border: none; border-radius: 12px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.3px; cursor: pointer; transition: all 0.2s;
}
.status-active { background: #d4edda; color: #155724; }
.status-active:hover { background: #c3e6cb; }
.status-inactive { background: #f8d7da; color: #721c24; }
.status-inactive:hover { background: #f5c6cb; }

.actions-cell { display: flex; gap: 6px; }
.btn-icon {
    width: 28px; height: 28px; border: none; border-radius: 50%; background: #f1f3f5; cursor: pointer; font-size: 14px; display: flex; align-items: center; justify-content: center; transition: all 0.2s;
}
.btn-icon:hover { background: #dee2e6; }
.btn-delete:hover { background: #f8d7da; color: #721c24; }

.card-actions { position: absolute; top: 8px; right: 8px; display: flex; gap: 6px; z-index: 10; }

/* Pagination */
.pagination { display: flex; justify-content: space-between; align-items: center; margin-top: 32px; padding: 20px; background: white; border-radius: 12px; box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08); }
.pagination-info { color: #666; font-size: 14px; }
.pagination-controls { display: flex; gap: 12px; }
.pagination-link { padding: 8px 16px; background: white; color: #667eea; text-decoration: none; border: 2px solid #667eea; border-radius: 6px; font-weight: 500; transition: all 0.2s; }
.pagination-link:hover { background: #667eea; color: white; }
.per-page-selector { display: flex; align-items: center; gap: 8px; }
.per-page-selector label { color: #666; font-size: 14px; }
.per-page-selector select { padding: 6px 12px; border: 2px solid #e0e0e0; border-radius: 6px; font-size: 14px; cursor: pointer; }

/* Modal */
.modal { display: none; position: fixed; z-index: 1000; left: 0; top: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.6); }
.modal-content { background-color: white; margin: 10% auto; padding: 40px; border-radius: 12px; width: 90%; max-width: 420px; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3); position: relative; }
.close { position: absolute; right: 20px; top: 15px; font-size: 28px; font-weight: bold; color: #aaa; cursor: pointer; transition: color 0.2s; }
.close:hover { color: #000; }
.modal-content h2 { margin-bottom: 24px; color: #333; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; color: #555; font-size: 14px; font-weight: 500; margin-bottom: 8px; }
.form-group input { width: 100%; padding: 12px 16px; border: 2px solid #e0e0e0; border-radius: 8px; font-size: 15px; transition: border-color 0.2s; }
.form-group input:focus { outline: none; border-color: #667eea; }
.modal-content button { width: 100%; padding: 14px; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; border: none; border-radius: 8px; font-size: 16px; font-weight: 600; cursor: pointer; transition: transform 0.2s; }
.modal-content button:hover { transform: translateY(-2px); }

/* Responsive */
@media (max-width: 1024px) {
    .header-content { padding: 0 20px; gap: 12px; }
    .tagline { display: none; }
    .header-search { max-width: 400px; }
}
@media (max-width: 768px) {
    .public-header { height: auto; padding: 12px 0; }
    .header-content { flex-wrap: wrap; gap: 12px; }
    .header-left { width: 100%; justify-content: space-between; }
    .header-search { width: 100%; max-width: none; }
    .admin-btn { display: none; }
    .site-title { font-size: 22px; }
    .mushroom-icon { width: 28px; height: 28px; }
    .public-main { padding: 180px 20px 100px; }
    .mushroom-list { grid-template-columns: 1fr; }
    .alpha-index { top: auto; bottom: 0; border-top: 1px solid #e0e0e0; border-bottom: none; }
    .alpha-container { padding: 0 20px; justify-content: flex-start; }
    .view-toggle { margin-right: 8px; padding-right: 8px; }
    .pagination { flex-direction: column; gap: 16px; }
}
