/* Profile Page Styles */

/* Navigation Button Styles for Profile Page */
#back-to-home-btn {
    background-color: var(--text-dark) !important;
    color: var(--card-bg) !important;
    border-radius: 9999px !important;
}

#back-to-home-btn:hover {
    background-color: var(--text-strong) !important;
    transform: translateY(-1px);
}

.profile-main {
    min-height: calc(100vh - 80px);
    padding: 2rem 0;
    background: var(--bg);
}

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

/* Profile Header */
.profile-header {
    background: var(--card-bg);
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    gap: 2rem;
}

.profile-avatar {
    flex-shrink: 0;
}

.profile-avatar i {
    font-size: 5rem;
    color: var(--primary);
}

.profile-info {
    flex: 1;
}

.profile-name {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-strong);
    margin-bottom: 0.5rem;
}

.profile-email {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

.profile-stats {
    display: flex;
    gap: 2rem;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Bookmarks Section */
.bookmarks-section {
    background: var(--card-bg);
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-md);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-light);
}

.section-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-strong);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-title i {
    color: #e74c3c;
}

.clear-btn {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.clear-btn:hover {
    background: #c0392b;
    transform: translateY(-2px);
}

.clear-btn:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    transform: none;
}

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

.bookmark-recipe-card {
    background: var(--bg);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    position: relative;
    cursor: pointer;
}

.bookmark-recipe-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.bookmark-recipe-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.bookmark-recipe-info {
    padding: 1rem;
}

.bookmark-recipe-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-strong);
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.bookmark-recipe-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.bookmark-recipe-category,
.bookmark-recipe-area {
    font-size: 0.85rem;
    color: var(--text-light);
    background: var(--border-light);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

.bookmark-recipe-date {
    font-size: 0.8rem;
    color: var(--text-light);
}

.bookmark-remove-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: rgba(231, 76, 60, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
}

.bookmark-recipe-card:hover .bookmark-remove-btn {
    opacity: 1;
}

.bookmark-remove-btn:hover {
    background: rgba(192, 57, 43, 0.9);
    transform: scale(1.1);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 2rem;
}

.empty-icon i {
    font-size: 4rem;
    color: var(--border-light);
    margin-bottom: 1rem;
}

.empty-state h3 {
    font-size: 1.5rem;
    color: var(--text-strong);
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: var(--text-light);
    margin-bottom: 2rem;
}

.explore-btn {
    background: var(--primary);
    color: var(--text-strong);
    text-decoration: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.explore-btn:hover {
    background: var(--text-strong);
    color: var(--primary);
    transform: translateY(-2px);
}

/* Profile Loader */
.profile-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.profile-loader.show {
    opacity: 1;
    visibility: visible;
}

.profile-loader .spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-light);
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

.profile-loader span {
    color: var(--text-dark);
    font-size: 1.1rem;
}

/* Confirmation Modal */
.confirmation-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.confirmation-modal.show {
    opacity: 1;
    visibility: visible;
}

.confirmation-content {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: var(--border-radius-lg);
    max-width: 400px;
    width: 90%;
    text-align: center;
    box-shadow: var(--shadow-lg);
}

.confirmation-content h3 {
    color: var(--text-strong);
    margin-bottom: 1rem;
}

.confirmation-content p {
    color: var(--text-dark);
    margin-bottom: 2rem;
    line-height: 1.5;
}

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

.confirm-btn,
.cancel-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.confirm-btn {
    background: #e74c3c;
    color: white;
}

.confirm-btn:hover {
    background: #c0392b;
}

.cancel-btn {
    background: var(--border-light);
    color: var(--text-dark);
}

.cancel-btn:hover {
    background: #bdc3c7;
}

/* Navigation Button Styles */
#back-to-home-btn {
    background: var(--primary);
    color: var(--text-strong);
    border: none;
    padding: 10px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-right: 12px;
}

#back-to-home-btn:hover {
    background: var(--text-strong);
    color: var(--primary);
    transform: translateY(-2px);
}

/* Responsive Design */
@media (max-width: 768px) {
    /* Mobile navbar adjustments for profile page */
    .navbar {
        grid-template-columns: auto 1fr;
        gap: 1rem;
    }

    .nav-auth {
        gap: 8px;
        justify-content: flex-end; /* Keep buttons on the right side */
    }

    .social-media-links {
        display: none;
    }

    .profile-container {
        padding: 0 1rem;
    }
    
    .profile-header {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .profile-stats {
        justify-content: center;
    }
    
    .section-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .bookmarks-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .bookmark-recipe-card {
        font-size: 0.9rem;
    }
    
    .bookmark-recipe-image {
        height: 150px;
    }
    
    .bookmark-recipe-info {
        padding: 0.75rem;
    }
    
    .bookmark-recipe-title {
        font-size: 1rem;
        margin-bottom: 0.25rem;
    }
    
    .bookmark-recipe-category,
    .bookmark-recipe-area {
        font-size: 0.75rem;
        padding: 0.2rem 0.4rem;
    }
    
    .bookmark-recipe-date {
        font-size: 0.7rem;
    }
    
    .confirmation-actions {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    /* Mobile navbar adjustments for very small screens */
    .navbar {
        padding: 8px 12px;
        border-radius: 20px;
        grid-template-columns: auto 1fr;
        gap: 0.5rem;
    }

    .nav-auth {
        gap: 6px;
        justify-content: flex-end;
    }

    .nav-auth button {
        padding: 6px 12px;
        font-size: 0.85rem;
    }

    .profile-header {
        padding: 1.5rem;
    }
    
    .bookmarks-section {
        padding: 1.5rem;
    }
    
    .profile-name {
        font-size: 1.5rem;
    }
    
    .profile-stats {
        gap: 1rem;
    }
    
    .bookmarks-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .bookmark-recipe-image {
        height: 120px;
    }
    
    .bookmark-recipe-info {
        padding: 0.5rem;
    }
    
    .bookmark-recipe-title {
        font-size: 0.9rem;
        line-height: 1.2;
    }
    
    .bookmark-recipe-meta {
        flex-direction: column;
        gap: 0.25rem;
        align-items: flex-start;
    }
    
    .bookmark-recipe-category,
    .bookmark-recipe-area {
        font-size: 0.7rem;
        padding: 0.15rem 0.3rem;
    }
    
    .bookmark-recipe-date {
        font-size: 0.65rem;
    }
    
    .bookmark-remove-btn {
        width: 28px;
        height: 28px;
        font-size: 0.8rem;
    }
}

/* Utility Classes */
.hidden {
    display: none !important;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}/* Edit Name
 Feature */
.profile-name-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.edit-name-btn {
    background: none;
    border: 2px solid var(--border-light);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-light);
    transition: all 0.3s ease;
    opacity: 0.7;
}

.edit-name-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    opacity: 1;
    transform: scale(1.05);
}

/* Edit Name Modal */
.edit-name-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.edit-name-modal.show {
    opacity: 1;
    visibility: visible;
}

.edit-name-content {
    background: var(--card-bg);
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    width: 90%;
    max-width: 500px;
    box-shadow: var(--shadow-lg);
    transform: translateY(-20px);
    transition: transform 0.3s ease;
}

.edit-name-modal.show .edit-name-content {
    transform: translateY(0);
}

.edit-name-content h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-strong);
    margin-bottom: 1.5rem;
    text-align: center;
}

.input-group {
    margin-bottom: 1.5rem;
}

.input-group label {
    display: block;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.input-group input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-light);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    background: var(--bg);
}

.input-group input:focus {
    outline: none;
    border-color: var(--primary);
}

.input-hint {
    display: block;
    font-size: 0.85rem;
    color: var(--text-light);
    margin-top: 0.5rem;
}

.edit-name-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

.save-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.save-btn:hover {
    background: var(--text-strong);
    color: var(--primary);
    transform: translateY(-2px);
}

.save-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.cancel-btn {
    background: transparent;
    color: var(--text-light);
    border: 2px solid var(--border-light);
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cancel-btn:hover {
    background: var(--border-light);
    color: var(--text-dark);
}

/* Responsive Design */
@media (max-width: 768px) {
    .profile-name-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .edit-name-btn {
        align-self: flex-start;
    }
    
    .edit-name-content {
        margin: 1rem;
        padding: 1.5rem;
    }
    
    .edit-name-actions {
        flex-direction: column;
    }
    
    .save-btn, .cancel-btn {
        width: 100%;
        justify-content: center;
    }
}