* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

/* Generic cards and settings layout */
.card {
    background: #fff;
    padding: 16px;
    border: 1px solid #eee;
    border-radius: 10px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}

.settings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 900px) {
    .settings-grid {
        grid-template-columns: 1fr;
    }
}

/* Tables */
.table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

.table th,
.table td {
    padding: 10px 12px;
    border-bottom: 1px solid #eee;
    text-align: left;
    vertical-align: middle;
}

.table thead th {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
}

.table tbody tr:hover {
    background: #fafafa;
}

/* Inline forms */
.inline-form {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: nowrap;
}

.inline-form input[type="text"],
.inline-form select {
    flex: 0 1 180px;
    min-width: 120px;
    max-width: 220px;
    width: auto;
}

.inline-form button,
.inline-form .btn {
    flex: 0 0 auto;
}

/* Compact inputs */
.input-compact {
    padding: 6px 8px !important;
    font-size: 13px !important;
}

/* Icon buttons */
.btn-icon {
    width: 36px;
    height: 36px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-size: 20px 20px;
    background-position: center;
    background-repeat: no-repeat;
}

.btn-save {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2'%3E%3Cpath d='M19 21H5a2 2 0 01-2-2V5a2 2 0 012-2h11l5 5v11a2 2 0 01-2 2z'%3E%3C/path%3E%3Cpolyline points='17 21 17 13 7 13 7 21'%3E%3C/polyline%3E%3Cpolyline points='7 3 7 8 15 8'%3E%3C/polyline%3E%3C/svg%3E");
}

/* Modern Recipe Detail Styles - Tandoor/Kitshn Inspired */
.recipe-detail-container {
    max-width: 100%;
    margin: 0;
    padding: 0;
    background: #f8f9fa;
    min-height: 100vh;
}

/* Hero Section */
.recipe-hero {
    position: relative;
    height: 300px;
    overflow: hidden;
}

.hero-image {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.7) 100%);
}

.hero-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    color: white;
    z-index: 2;
}

.hero-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    text-align: center;
    color: white;
}

.placeholder-icon {
    font-size: 64px;
    margin-bottom: 16px;
}

.recipe-title {
    font-size: 28px;
    font-weight: bold;
    margin: 0 0 16px 0;
    line-height: 1.2;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.recipe-badges {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.category-badge {
    background: rgba(255,255,255,0.2);
    color: white;
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 500;
    backdrop-filter: blur(10px);
}

.status-badge {
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 500;
}

.status-badge.status-pending {
    background: rgba(255, 193, 7, 0.9);
    color: #333;
}

.status-badge.status-rejected {
    background: rgba(220, 53, 69, 0.9);
    color: white;
}

.recipe-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 14px;
    flex-wrap: wrap;
}

.rating-display {
    display: flex;
    align-items: center;
    gap: 6px;
}

.rating-text {
    font-size: 12px;
    opacity: 0.9;
}

.last-cooked {
    font-size: 12px;
    opacity: 0.9;
}

/* Action Bar */
.action-bar {
    position: sticky;
    top: 0;
    background: white;
    border-bottom: 1px solid #e9ecef;
    padding: 12px 20px;
    z-index: 100;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.action-buttons {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
}

.action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 16px;
    border: none;
    border-radius: 12px;
    background: #f8f9fa;
    color: #495057;
    text-decoration: none;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 60px;
}

.action-btn:hover {
    background: #e9ecef;
    transform: translateY(-1px);
}

.action-btn.active {
    background: #e74c3c;
    color: white;
}

.action-btn.favorite-btn.active {
    background: #e74c3c;
}

.action-btn.cooked-btn {
    background: #27ae60;
    color: white;
}

.action-btn.share-btn {
    background: #25d366;
    color: white;
}

.action-btn.edit-btn {
    background: #3498db;
    color: white;
}

.action-btn.delete-btn {
    background: #dc3545;
    color: white;
}

.btn-icon {
    font-size: 20px;
    margin-bottom: 4px;
}

.btn-text {
    font-weight: 500;
}

/* Content Sections */
.recipe-content {
    padding: 20px;
    max-width: 800px;
    margin: 0 auto;
}

.content-section {
    background: white;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.section-title {
    font-size: 20px;
    font-weight: bold;
    margin: 0 0 16px 0;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-content {
    color: #495057;
    line-height: 1.6;
}

.ingredients-list {
    background: #f8f9fa;
    padding: 16px;
    border-radius: 8px;
    white-space: pre-line;
    line-height: 1.8;
}

/* Rating Section */
.rating-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.current-rating {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 12px;
}

.stars.large {
    font-size: 24px;
}

.rating-info {
    display: flex;
    flex-direction: column;
}

.rating-number {
    font-size: 32px;
    font-weight: bold;
    color: #333;
}

.rating-count {
    font-size: 14px;
    color: #666;
}

.user-rating-section h4 {
    margin: 0 0 12px 0;
    font-size: 16px;
    color: #333;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 16px;
}

.stat-item {
    text-align: center;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 12px;
}

.stat-number {
    display: block;
    font-size: 24px;
    font-weight: bold;
    color: #333;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Comments */
.comment-form {
    margin-bottom: 24px;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 12px;
}

.comment-form textarea {
    width: 100%;
    min-height: 80px;
    padding: 12px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    resize: vertical;
    font-family: inherit;
    margin-bottom: 12px;
}

.comment-form input[type="file"] {
    display: none;
}

.file-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    margin-bottom: 12px;
    transition: all 0.3s ease;
}

.file-label:hover {
    background: #f8f9fa;
}

.upload-icon {
    font-size: 16px;
}

.comments-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.comment {
    padding: 16px;
    background: #f8f9fa;
    border-radius: 12px;
    border-left: 4px solid #e74c3c;
}

.comment-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.comment-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.comment-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-placeholder {
    width: 100%;
    height: 100%;
    background: #e74c3c;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 16px;
}

.comment-meta {
    flex: 1;
}

.comment-meta strong {
    color: #333;
    font-size: 14px;
}

.comment-date {
    display: block;
    font-size: 12px;
    color: #666;
    margin-top: 2px;
}

.comment-text {
    color: #495057;
    line-height: 1.6;
    margin-bottom: 12px;
}

.comment-image {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin-top: 8px;
}

/* Mobile Responsive Design */
@media (max-width: 768px) {
    .recipe-hero {
        height: 250px;
    }
    
    .hero-content {
        padding: 16px;
    }
    
    .recipe-title {
        font-size: 24px;
    }
    
    .action-bar {
        padding: 8px 16px;
    }
    
    .action-buttons {
        gap: 4px;
    }
    
    .action-btn {
        padding: 6px 12px;
        min-width: 50px;
        font-size: 11px;
    }
    
    .btn-icon {
        font-size: 18px;
    }
    
    .recipe-content {
        padding: 16px;
    }
    
    .content-section {
        padding: 16px;
        margin-bottom: 16px;
    }
    
    .section-title {
        font-size: 18px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .stat-item {
        padding: 12px;
    }
    
    .stat-number {
        font-size: 20px;
    }
    
    .current-rating {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }
}

@media (max-width: 480px) {
    .recipe-hero {
        height: 200px;
    }
    
    .recipe-title {
        font-size: 20px;
    }
    
    .recipe-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .action-buttons {
        justify-content: space-around;
    }
    
    .action-btn {
        padding: 8px 8px;
        min-width: 45px;
    }
    
    .btn-text {
        font-size: 10px;
    }
    
    .recipe-content {
        padding: 12px;
    }
    
    .content-section {
        padding: 12px;
    }
    
    .section-title {
        font-size: 16px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .comment-form {
        padding: 12px;
    }
}

/* Timeline Styles */
.timeline-section {
    margin: 40px 0;
    padding: 20px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.timeline-section h2 {
    margin-bottom: 30px;
    color: #333;
    font-size: 24px;
    text-align: center;
}

.timeline-container {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 0;
}

.timeline-line {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(to bottom, #4CAF50, #2196F3);
    transform: translateX(-50%);
}

.timeline-item {
    position: relative;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
}

.timeline-item.left {
    flex-direction: row;
}

.timeline-item.right {
    flex-direction: row-reverse;
}

.timeline-dot {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 16px;
    height: 16px;
    background: #fff;
    border: 3px solid #4CAF50;
    border-radius: 50%;
    z-index: 2;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.timeline-content {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    width: calc(50% - 40px);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.timeline-content:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.timeline-item.left .timeline-content {
    margin-right: auto;
    margin-left: 40px;
}

.timeline-item.right .timeline-content {
    margin-left: auto;
    margin-right: 40px;
}

.timeline-image {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    background: #e9ecef;
}

.timeline-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.no-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    background: #e9ecef;
}

.timeline-info {
    flex: 1;
    min-width: 0;
}

.timeline-date {
    font-size: 12px;
    color: #666;
    margin-bottom: 4px;
    font-weight: 500;
}

.timeline-dish {
    margin-bottom: 4px;
}

.timeline-dish a {
    color: #333;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    transition: color 0.2s ease;
}

.timeline-dish a:hover {
    color: #4CAF50;
}

.timeline-user {
    font-size: 14px;
    color: #666;
}

/* Responsive Timeline */
@media (max-width: 768px) {
    .timeline-line {
        left: 20px;
    }
    
    .timeline-item {
        flex-direction: row !important;
        margin-left: 40px;
    }
    
    .timeline-dot {
        left: 20px;
    }
    
    .timeline-content {
        width: calc(100% - 60px);
        margin-left: 20px !important;
        margin-right: 0 !important;
    }
    
    .timeline-item.left .timeline-content,
    .timeline-item.right .timeline-content {
        margin-left: 20px;
        margin-right: 0;
    }
}

.btn-delete {
    background-color: #e74c3c;
    background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9IndoaXRlIiBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCI+PHBvbHlsaW5lIHBvaW50cz0iMyA2IDUgNiAyMSA2Ii8+PHBhdGggZD0iTTE5IDZsLTEgMTRhMiAyIDAgMCAxLTIgMkg4YTIgMiAwIDAgMS0yLTJMNSA2Ii8+PHBhdGggZD0iTTEwIDExdjYiLz48cGF0aCBkPSJNMTQgMTF2NiIvPjxwYXRoIGQ9Ik05IDZWNGEyIDIgMCAwIDEgMi0yaDJhMiAyIDAgMCAxIDIgMnYyIi8+PC9zdmc+');
    color: transparent;
}

.btn-add {
    background-color: #2ecc71;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="12" y1="5" x2="12" y2="19"/><line x1="5" y1="12" x2="19" y2="12"/></svg>');
    color: transparent;
}

.inline-form + .inline-form {
    margin-top: 8px;
}

.inline-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.table .inline-form input,
.table .inline-form select {
    width: auto;
}

@media (max-width: 600px) {
    .inline-form {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    .inline-form button,
    .inline-form .btn {
        width: 100%;
    }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 1;
}

/* Navbar */
.navbar {
    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 20px;
    position: relative;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 20px;
}

.logo {
    font-size: 1.25rem;
    font-weight: bold;
    color: #e74c3c;
    text-decoration: none;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 15px;
    flex-wrap: wrap;
}

.nav-links li {
    display: inline-block;
}

.nav-links a {
    color: #333;
    text-decoration: none;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background 0.3s;
    font-size: 0.9rem;
}

.nav-links a:hover {
    background: #f0f0f0;
}

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 24px;
    gap: 5px;
    z-index: 1001;
}

.hamburger span {
    width: 100%;
    height: 3px;
    background: #333;
    border-radius: 3px;
    transition: all 0.3s ease;
    display: block;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translateY(10px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translateY(-10px);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }
    
    .navbar .container {
        padding: 0.5rem 15px;
        position: relative;
    }
    
    .daily-dish-card {
        flex-direction: column;
        border-radius: 12px !important;
    }
    
    .daily-dish-image,
    .daily-dish-image-placeholder {
        width: 100%;
        height: 200px;
    }
    
    .daily-dish-content {
        padding: 20px;
    }
    
    /* Poll-specific mobile styles */
    .poll-card {
        margin: 0 0 20px 0;
        border-radius: 12px !important;
    }
    
    .poll-card .poll-content {
        padding: 16px;
    }
    
    .poll-card .poll-vote-form ul {
        margin: 12px 0;
    }
    
    .poll-card .poll-vote-form li {
        margin: 8px 0;
    }
    
    .poll-card .poll-vote-form label {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
    
    .poll-card .poll-vote-form label span {
        font-size: 14px;
        line-height: 1.4;
    }
    
    .poll-card .poll-vote-form div[style*="margin:6px 0 0 30px"] {
        margin: 6px 0 0 0 !important;
        width: 100%;
    }
    
    .poll-card .poll-vote-form div[style*="max-width:520px"] {
        max-width: 100% !important;
    }
    
    .poll-card .poll-vote-form div[style*="display:flex; gap:10px"] {
        flex-direction: column;
        gap: 8px;
        align-items: stretch;
    }
    
    .poll-card .poll-vote-form button,
    .poll-card .poll-vote-form a {
        width: 100%;
        padding: 10px 16px;
        font-size: 14px;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
    }
    
    .logo {
        font-size: 1.1rem;
    }
    
    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #fff;
        flex-direction: column;
        gap: 0;
        box-shadow: 0 4px 6px rgba(0,0,0,0.1);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        padding: 0;
        margin: 0 15px;
    }
    
    .nav-links.active {
        max-height: 500px;
        padding: 10px 0;
        z-index: 9999;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    }
    
    /* Ensure menu covers all content */
    .navbar {
        z-index: 10000;
    }
    
    .nav-links li {
        width: 100%;
    }
    
    .nav-links a {
        padding: 12px 15px;
        font-size: 0.95rem;
        display: block;
        width: 100%;
        border-bottom: 1px solid #f0f0f0;
    }
    
    .nav-links a:hover {
        background: #f9f9f9;
    }
    
    .container {
        padding: 15px;
    }
    
    .dishes-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 15px;
    }
    
    .dish-image {
        height: 180px;
    }
}

@media (max-width: 480px) {
    .navbar .container {
        padding: 0.4rem 12px;
    }
    
    .logo {
        font-size: 1rem;
    }
    
    .nav-links {
        margin: 0 12px;
    }
    
    .nav-links a {
        padding: 12px 15px;
        font-size: 0.9rem;
    }
    
    .container {
        padding: 12px;
    }
    
    .dishes-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    /* Poll-specific small mobile styles */
    .poll-card {
        margin: 0 0 16px 0;
        border-radius: 8px !important;
    }
    
    .poll-card .poll-content {
        padding: 12px;
    }
    
    .poll-card .poll-title {
        font-size: 18px;
        margin-bottom: 12px;
    }
    
    .poll-card .poll-vote-form ul {
        margin: 8px 0;
    }
    
    .poll-card .poll-vote-form li {
        margin: 6px 0;
    }
    
    .poll-card .poll-vote-form label span {
        font-size: 13px;
    }
    
    .poll-card .poll-vote-form small {
        font-size: 11px;
    }
    
    .poll-card .poll-vote-form button,
    .poll-card .poll-vote-form a {
        padding: 8px 12px;
        font-size: 13px;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 4px;
    }
    
    .dish-image {
        height: 200px;
    }
    
    .dish-card-content h3 {
        font-size: 1rem;
    }
}

/* Login Card */
.login-card {
    max-width: 400px;
    margin: 100px auto;
    background: #fff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.login-card h2 {
    margin-bottom: 20px;
    text-align: center;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

input[type="text"],
input[type="password"],
input[type="email"],
input[type="file"],
textarea,
select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

textarea {
    resize: vertical;
}

button,
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: opacity 0.3s;
    text-decoration: none;
    display: inline-block;
}

button:hover,
.btn:hover {
    opacity: 0.8;
}

.btn-primary {
    background: #e74c3c;
    color: white;
}

.btn-secondary {
    background: #95a5a6;
    color: white;
}

/* Alerts */
.alert {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
}

.alert.error {
    background: #fee;
    color: #c00;
    border: 1px solid #fcc;
}

.alert.success {
    background: #efe;
    color: #0c0;
    border: 1px solid #cfc;
}

/* Dish of the Day */
.dish-of-the-day {
    margin-bottom: 40px;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.dish-of-the-day h2 {
    color: white;
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.daily-dish-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.daily-dish-image {
    width: 300px;
    height: 300px;
    object-fit: cover;
}

.daily-dish-image-placeholder {
    width: 300px;
    height: 300px;
    background: #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
}

.daily-dish-content {
    flex: 1;
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.daily-dish-content h3 {
    margin-bottom: 10px;
    font-size: 1.5rem;
}

.daily-category {
    color: #667eea;
    font-weight: bold;
    margin-bottom: 15px;
}

.daily-description {
    flex: 1;
    margin-bottom: 15px;
    line-height: 1.6;
}

.daily-rating {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.rating-count {
    color: #666;
}

/* Dishes Grid */
.dishes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.dish-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.dish-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.dish-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.dish-image-placeholder {
    height: 200px;
    background: #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
}

.dish-card-content {
    padding: 15px;
}

.dish-card-content h3 {
    margin-bottom: 5px;
}

.dish-title-link {
    color: #333;
    text-decoration: none;
    transition: color 0.3s;
}

.dish-title-link:hover {
    color: #e74c3c;
}

.category {
    color: #e74c3c;
    font-size: 0.9em;
    margin-bottom: 10px;
}

.dish-stats {
    margin: 10px 0;
}

.rating {
    display: flex;
    align-items: center;
    gap: 5px;
}

.stars {
    color: #ffd700;
    font-size: 1.2em;
}

.rating-count {
    color: #666;
    font-size: 0.9em;
}

.cooked-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-top: 10px;
}

.cooked-info small {
    color: #666;
    font-size: 0.85em;
}

.dish-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.btn-favorite,
.btn-cooked,
.btn-delete,
.btn-edit,
.btn-share {
    padding: 5px 10px;
    font-size: 0.9em;
    border-radius: 4px;
    transition: all 0.3s;
}

.btn-share {
    background: #25d366;
    color: white !important;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    border: none;
}

.btn-share:hover {
    background: #128c7e;
    opacity: 0.9;
    text-decoration: none;
}

.btn-edit {
    background: #3498db;
    color: white !important;
    text-decoration: none;
    display: inline-block;
}

.btn-edit:hover {
    background: #2980b9;
    opacity: 0.9;
    text-decoration: none;
}

.btn-favorite {
    background: #ecf0f1;
    border: 1px solid #bdc3c7;
}

.btn-favorite.active {
    background: #e74c3c;
    color: white !important;
    border-color: #c0392b;
}

.btn-favorite:hover {
    background: #d5dbdb;
    border-color: #95a5a6;
}

.btn-delete:not(.btn-icon) {
    background: #e74c3c;
    color: white;
    border: none;
}

.btn-delete:not(.btn-icon):hover {
    background: #c0392b;
    opacity: 0.9;
}

.btn-cooked {
    background: #27ae60;
    color: white;
    border: none;
}

.btn-cooked:hover {
    background: #229954;
    opacity: 0.9;
}

.btn-cooked::before {
    content: "✓ ";
    color: white;
    font-weight: bold;
    margin-right: 2px;
}

/* Dish Detail */
.dish-detail {
    background: white;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.dish-image-section img {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 20px;
}

.dish-info-section h1 {
    margin-bottom: 10px;
}

.category-badge {
    display: inline-block;
    background: #e74c3c;
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9em;
    margin-bottom: 20px;
}

.rating-section {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}

.star-input {
    display: inline-block;
}

.star {
    font-size: 2em;
    color: #ddd;
    cursor: pointer;
    transition: color 0.2s;
}

.star:hover,
.star.active {
    color: #ffd700;
}

.dish-actions {
    margin: 20px 0;
}

.dish-stats {
    margin: 30px 0;
}

.ingredients {
    white-space: pre-line;
    padding: 10px;
    background: #f9f9f9;
    border-radius: 4px;
}

.meta-info {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

/* Comments */
.comments-section {
    margin-top: 40px;
    padding-top: 40px;
    border-top: 2px solid #eee;
}

.comment-form {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.comments-list {
    margin-top: 20px;
}

.comment {
    background: #fff;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    border-left: 3px solid #e74c3c;
}

.comment-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.comment-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.comment-date {
    color: #666;
    font-size: 0.9em;
    margin-left: auto;
}

.comment-text {
    margin: 10px 0;
}

.comment-image {
    max-width: 300px;
    border-radius: 4px;
    margin-top: 10px;
}

/* Calendar */
.calendar-table {
    width: 100%;
    background: white;
    border-collapse: collapse;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.calendar-table th,
.calendar-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.calendar-table th {
    background: #e74c3c;
    color: white;
}

.calendar-table tr:hover {
    background: #f9f9f9;
}

/* Search */
.search-filters {
    background: white;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.filter-form {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr auto;
    gap: 15px;
    align-items: end;
}

.search-results {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Profile */
.profile-section {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.profile-info {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 40px;
    border-bottom: 2px solid #eee;
}

.profile-image {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    margin: 20px 0;
}

.profile-placeholder {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 20px auto;
    color: #999;
}

.role-badge {
    display: inline-block;
    padding: 5px 15px;
    border-radius: 20px;
    background: #3498db;
    color: white;
    margin: 10px 0;
}

.password-form {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}

.user-comments,
.user-favorites {
    margin: 40px 0;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
}

.comments-list,
.favorites-list {
    margin-top: 20px;
}

.comment-item {
    background: white;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 10px;
}

.favorite-item {
    background: white;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.favorite-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
}

.favorite-item h4 {
    margin: 0;
}

/* Dish Form */
.dish-form {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Star Rating */
.star-input .star.active,
.star-input .star:hover ~ .star {
    color: #ddd;
}

.star-input .star.active {
    color: #ffd700;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 40px;
    color: #999;
}

/* Star Input Enhancement */
.star[data-rating] {
    cursor: pointer;
}

.star.active {
    color: #ffd700;
}

.star:hover {
    color: #ffd700;
}

/* Calendar Styles */
.calendar-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.calendar-nav h2 {
    margin: 0;
    color: #333;
}

.calendar-legend {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 15px;
    padding: 10px 15px;
    background: #f8f9fa;
    border-radius: 6px;
    font-size: 14px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 3px;
}

.legend-color.planned {
    background: #4caf50;
}

.legend-color.cooked {
    background: #2196f3;
}

.legend-text {
    font-size: 12px;
    color: #666;
    font-style: italic;
}

.calendar-grid {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    overflow: hidden;
    margin-bottom: 30px;
}

.calendar-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

.calendar-day-header {
    padding: 12px 8px;
    text-align: center;
    font-weight: bold;
    color: #495057;
    border-right: 1px solid #dee2e6;
}

.calendar-day-header:last-child {
    border-right: none;
}

.calendar-body {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
}

.calendar-day {
    min-height: 100px;
    padding: 8px;
    border-right: 1px solid #dee2e6;
    border-bottom: 1px solid #dee2e6;
    cursor: pointer;
    transition: background-color 0.2s;
    position: relative;
}

.calendar-day:nth-child(7n) {
    border-right: none;
}

.calendar-day:hover {
    background-color: #f8f9fa;
}

.calendar-day.today {
    background-color: #e3f2fd;
    font-weight: bold;
}

.calendar-day.has-meals {
    background-color: #fff3e0;
}

.calendar-day.empty {
    background-color: #f8f9fa;
    cursor: default;
}

.calendar-day.empty:hover {
    background-color: #f8f9fa;
}

.day-number {
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 4px;
}

.day-meals {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.meal-item {
    padding: 2px 4px;
    border-radius: 3px;
    font-size: 10px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.meal-item.planned {
    background: #4caf50;
    color: white;
}

.meal-item.planned:hover {
    background: #45a049;
}

.meal-item.cooked {
    background: #2196f3;
    color: white;
}

.meal-item.cooked:hover {
    background: #1976d2;
}

.meal-type {
    font-weight: bold;
    margin-right: 4px;
}

.meal-title {
    font-size: 9px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.meal-user {
    font-size: 8px;
    opacity: 0.8;
    margin-top: 1px;
}

/* Modal Styles */
.modal {
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: #aaa;
}

.close:hover {
    color: #000;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #333;
}

.form-group select,
.form-group textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.form-group textarea {
    resize: vertical;
    min-height: 60px;
}

.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
}

/* Meal Details Modal */
.meal-details {
    max-height: 60vh;
    overflow-y: auto;
}

.meal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.meal-header h4 {
    margin: 0;
    color: #333;
}

.meal-type-badge {
    background: #4caf50;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
}

.meal-info {
    margin-bottom: 15px;
}

.info-row {
    margin-bottom: 8px;
    padding: 4px 0;
}

.info-row strong {
    color: #555;
    margin-right: 8px;
}

.meal-description,
.meal-ingredients,
.meal-notes {
    margin-bottom: 15px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 4px;
}

.meal-description strong,
.meal-ingredients strong,
.meal-notes strong {
    display: block;
    margin-bottom: 5px;
    color: #333;
}

.meal-description p,
.meal-ingredients p,
.meal-notes p {
    margin: 0;
    line-height: 1.5;
    white-space: pre-wrap;
}

.meal-image {
    text-align: center;
    margin-top: 15px;
}

.btn-danger {
    background: #dc3545;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.btn-danger:hover {
    background: #c82333;
}

/* History Section */
.history-section {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 20px;
}

.history-section h2 {
    margin: 0 0 15px 0;
    color: #333;
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 4px;
    border-left: 4px solid #4caf50;
}

.history-date {
    font-size: 12px;
    color: #666;
    font-weight: bold;
}

.history-dish {
    font-size: 14px;
    font-weight: bold;
    color: #333;
    flex: 1;
    margin: 0 10px;
}

.history-user {
    font-size: 12px;
    color: #666;
}

/* Mobile Calendar Styles */
@media (max-width: 768px) {
    .calendar-nav {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .calendar-nav h2 {
        font-size: 18px;
        margin: 0;
    }
    
    .calendar-legend {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        font-size: 12px;
    }
    
    .legend-text {
        font-size: 10px;
    }
    
    .calendar-grid {
        font-size: 12px;
    }
    
    .calendar-day {
        min-height: 60px;
        padding: 2px;
    }
    
    .day-number {
        font-size: 12px;
        font-weight: bold;
    }
    
    .meal-item {
        font-size: 10px;
        padding: 1px 2px;
        margin: 1px 0;
    }
    
    .meal-type {
        font-size: 8px;
    }
    
    .meal-title {
        font-size: 9px;
    }
    
    .meal-user {
        font-size: 8px;
    }
    
    .modal-content {
        width: 95%;
        max-width: 400px;
        margin: 5% auto;
        padding: 15px;
    }
    
    .history-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
        padding: 8px;
    }
    
    .history-date {
        font-size: 12px;
        font-weight: bold;
    }
    
    .history-dish {
        font-size: 14px;
    }
    
    .history-user {
        font-size: 12px;
        opacity: 0.7;
    }
    
    /* Mobile meal details */
    .meal-details {
        max-height: 50vh;
    }
    
    .meal-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .meal-type-badge {
        font-size: 10px;
        padding: 2px 6px;
    }
    
    .info-row {
        font-size: 14px;
    }
    
    .meal-description,
    .meal-ingredients,
    .meal-notes {
        padding: 8px;
        font-size: 14px;
    }
    
    .btn-danger {
        padding: 6px 12px;
        font-size: 12px;
    }
}

/* Mobile notification banner */
.mobile-notification-banner {
    background: linear-gradient(135deg, #ff6b6b, #ee5a52);
    color: white;
    padding: 12px 16px;
    margin: 16px 0;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.3);
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.notification-icon {
    font-size: 20px;
}

.notification-text {
    flex: 1;
    font-weight: 500;
}

.notification-link {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 6px 12px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    transition: background 0.2s;
}

.notification-link:hover {
    background: rgba(255, 255, 255, 0.3);
    color: white;
}

/* Mobile-specific notification banner */
@media (max-width: 768px) {
    .mobile-notification-banner {
        margin: 12px -16px 16px -16px;
        border-radius: 0;
        position: sticky;
        top: 0;
        z-index: 100;
    }
    
    .notification-content {
        gap: 8px;
    }
    
    .notification-text {
        font-size: 14px;
    }
    
    .notification-link {
        padding: 4px 8px;
        font-size: 12px;
    }
}
