/* Top Rated Page Styles */

.back-navigation {
    margin-bottom: 20px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    padding: 12px 20px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.1);
}

.back-link:hover {
    background: rgba(102, 126, 234, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.2);
    text-decoration: none;
    color: #667eea;
}

.page-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 24px;
    padding: 50px 40px;
    margin-bottom: 40px;
    box-shadow: 0 20px 60px rgba(102, 126, 234, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
    text-align: center;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(255, 255, 255, 0.1) 0%, transparent 100%);
    pointer-events: none;
}

.page-content {
    position: relative;
    z-index: 2;
}

.page-title {
    color: white;
    font-size: 2.8em;
    font-weight: 800;
    margin: 0 0 20px 0;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.page-subtitle {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.2em;
    font-weight: 400;
    margin: 0;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.recipes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.recipe-card {
    background: white;
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.recipe-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.recipe-rank {
    position: absolute;
    top: -10px;
    left: 20px;
    background: linear-gradient(135deg, #f39c12, #e67e22);
    color: white;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.1em;
    box-shadow: 0 4px 15px rgba(243, 156, 18, 0.3);
    z-index: 1;
}

.recipe-rank.top-3 {
    background: linear-gradient(135deg, #f1c40f, #f39c12);
}

.recipe-rank.rank-1 {
    background: linear-gradient(135deg, #f1c40f, #e67e22);
    box-shadow: 0 4px 20px rgba(241, 196, 15, 0.4);
}

.recipe-title {
    color: #667eea;
    font-size: 1.3em;
    font-weight: 600;
    margin: 0 0 15px 0;
    line-height: 1.3;
}

.recipe-rating {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 12px 0;
    padding: 12px;
    background: rgba(255, 193, 7, 0.1);
    border-radius: 12px;
    border: 1px solid rgba(255, 193, 7, 0.2);
}

.rating-spoons {
    font-size: 1.2em;
}

.rating-number {
    font-weight: 600;
    color: #f39c12;
    font-size: 1.1em;
}

.rating-count {
    color: #666;
    font-size: 0.9em;
}

.recipe-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 15px 0;
}

.meta-badge {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.85em;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
}

.meta-badge:hover {
    background: rgba(102, 126, 234, 0.2);
    transform: translateY(-1px);
    color: #5a6fd8;
    text-decoration: none;
}

.recipe-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.action-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    text-decoration: none;
    padding: 10px 18px;
    border-radius: 10px;
    font-weight: 500;
    font-size: 0.9em;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    display: flex;
    align-items: center;
    gap: 6px;
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    color: white;
    text-decoration: none;
}

.action-btn.secondary {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.1);
}

.action-btn.secondary:hover {
    background: rgba(102, 126, 234, 0.2);
    color: #5a6fd8;
}

.empty-state {
    background: white;
    border-radius: 20px;
    padding: 60px 40px;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.empty-state .icon {
    font-size: 4em;
    margin-bottom: 20px;
    opacity: 0.7;
}

.empty-state h3 {
    color: #667eea;
    font-size: 1.5em;
    margin: 0 0 15px 0;
    font-weight: 600;
}

.empty-state p {
    color: #666;
    font-size: 1.1em;
    margin: 0 0 25px 0;
    line-height: 1.6;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .main-container {
        padding: 15px;
    }
}

@media (max-width: 1024px) {
    .main-container {
        padding: 10px;
    }

    .page-header {
        padding: 35px 25px;
        margin-bottom: 30px;
        border-radius: 20px;
    }

    .page-title {
        font-size: 2.2em;
        margin-bottom: 15px;
    }

    .page-subtitle {
        font-size: 1.1em;
    }

    .recipes-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 25px;
    }
}

@media (max-width: 768px) {
    .main-container {
        padding: 5px;
    }

    .page-header {
        padding: 30px 20px;
        margin-bottom: 25px;
        border-radius: 15px;
    }

    .page-title {
        font-size: 2em;
        margin-bottom: 15px;
    }

    .page-subtitle {
        font-size: 1em;
    }

    .recipes-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .recipe-card {
        padding: 20px;
        border-radius: 15px;
    }

    .recipe-actions {
        flex-direction: column;
    }

    .action-btn {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .main-container {
        padding: 2px;
    }

    .page-header {
        padding: 25px 15px;
        margin-bottom: 20px;
    }

    .page-title {
        font-size: 1.8em;
    }

    .recipe-card {
        padding: 15px;
        margin-bottom: 15px;
    }

    .recipe-rank {
        width: 35px;
        height: 35px;
        font-size: 1em;
    }

    .empty-state {
        padding: 40px 20px;
        border-radius: 15px;
    }
}

/* Comment count styles */
.recipe-comments {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 12px 0;
    padding: 8px 12px;
    background: rgba(108, 117, 125, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(108, 117, 125, 0.2);
}

.comment-icon {
    font-size: 1.1em;
}

.comment-count {
    font-weight: 600;
    color: #6c757d;
    font-size: 1em;
}

@media (max-width: 360px) {
    .page-title {
        font-size: 1.6em;
    }

    .recipe-title {
        font-size: 1.2em;
    }

    .action-btn {
        padding: 8px 15px;
        font-size: 0.85em;
    }
}
