/* 
 * AIMangaMaker.com - Dashboard Styles
 * Styling for the dashboard and project management interfaces
 */

/* ===== DASHBOARD LAYOUT ===== */
.dashboard-layout {
    display: flex;
    height: 100vh;
    background-color: var(--gray-100);
    overflow: hidden;
}

.dashboard-layout .header-left h1 {
    color: var(--white);
    font-weight: 600;
    font-size: clamp(1.25rem, 4vw, 1.75rem);
}

/* ===== SIDEBAR ===== */
.sidebar {
    width: 250px;
    background-color: var(--dark-color);
    color: var(--white);
    display: flex;
    flex-direction: column;
    transition: width 0.3s ease;
    overflow: hidden;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header {
    padding: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background-color: rgba(0, 0, 0, 0.3);
}
 

.sidebar-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--white);
    font-size: 1.25rem;
    cursor: pointer;
}

.sidebar-nav {
    flex: 1;
    padding: 1.5rem 0;
    overflow-y: auto;
}

.sidebar-nav ul {
    display: block;
    flex-direction: column;
    list-style: none;
}

.sidebar-nav ul li {
    margin-bottom: 0.5rem;
}

.sidebar-nav ul li a {
    display: flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    color: var(--light-color);
    transition: var(--transition);
    border-radius: 8px;
    margin: 0 0.5rem;
}

.sidebar-nav ul li a i {
    width: 1.5rem;
    margin-right: 1rem;
    text-align: center;
}

.sidebar-nav ul li.active a,
.sidebar-nav ul li a:hover {
    color: var(--white);
    background-color: var(--primary-color);
    transform: translateX(5px);
}

.sidebar-footer {
    padding: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.logout-btn {
    display: flex;
    align-items: center;
    color: var(--light-color);
    transition: var(--transition);
    padding: 0.5rem;
    border-radius: 8px;
}

.logout-btn i {
    margin-right: 1rem;
}

.logout-btn:hover {
    color: var(--white);
    background-color: rgba(229, 9, 20, 0.2);
}

/* ===== MAIN CONTENT ===== */
.main-content {
    flex: 1;
    margin-left: 250px;
    transition: margin-left 0.3s ease;
    overflow-y: auto;
    height: 100vh;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--dark-color);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1rem 1.5rem;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 2rem;
}

/* Compact Header Info */
.compact-header-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.header-info-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.875rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    background-color: var(--gray-200);
    color: var(--text-color);
}

.header-info-item i {
    font-size: 1rem;
}

.header-info-item.subscription-info {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(229, 9, 20, 0.3);
}

.header-info-item.subscription-info i {
    color: #ffd700;
}

.header-info-item.subscription-warning {
    background-color: rgba(251, 191, 36, 0.2);
    color: #fbbf24;
    border: 1px solid rgba(251, 191, 36, 0.3);
}

.header-info-item.subscription-warning i {
    color: #fbbf24;
}

.header-info-item.credit-balance i {
    color: #ffc107;
}

.header-info-item.user-profile {
    padding: 0.25rem;
    background-color: transparent;
}

.subscription-tier {
    text-transform: capitalize;
}

/* Legacy Subscription Status (deprecated, for backward compatibility) */
.subscription-status {
    margin-right: 1.5rem;
}

.subscription-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-radius: 8px;
    color: white;
    font-weight: 600;
    font-size: 0.875rem;
    box-shadow: 0 2px 8px rgba(229, 9, 20, 0.3);
}

.subscription-info i {
    color: #ffd700;
}

.pending-change-indicator {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    font-size: 0.75rem;
}

.subscription-link {
    color: white;
    text-decoration: underline;
    opacity: 0.9;
    transition: opacity 0.3s ease;
}

.subscription-link:hover {
    opacity: 1;
}

.subscription-warning {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--primary-color);
    border-radius: 8px;
    color: white;
    font-weight: 600;
    font-size: 0.875rem;
    box-shadow: 0 2px 8px rgba(229, 9, 20, 0.3);
}

.subscription-warning i {
    color: #ffe0e0;
}

.credit-balance {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--white);
}

.credit-balance i {
    color: #f1c40f;
}

.credits-disabled {
    color: var(--text-secondary);
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    overflow: hidden;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.edit-profile-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(229, 9, 20, 0.1);
    color: var(--primary-color);
    text-decoration: none;
    transition: all 0.2s ease;
    font-size: 0.875rem;
}

.edit-profile-btn:hover {
    background: rgba(229, 9, 20, 0.2);
    color: var(--primary-dark);
    transform: scale(1.05);
}

.dashboard-content {
    padding: 2rem;
    background-color: var(--gray-100);
}

/* ===== PROJECTS ===== */
.projects-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    padding-bottom: 2rem;
}

.project-card {
    background-color: var(--gray-200);
    border-radius: var(--radius-md);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    overflow: visible;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    z-index: 1;
}

.project-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    border-color: var(--primary-color);
    z-index: 10;
}

/* Invitation Cards */
.invitation-card {
    position: relative;
    opacity: 0.9;
}

.invitation-card:hover {
    opacity: 1;
    border-color: var(--primary-color);
}

.invitation-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(229, 9, 20, 0.75) 0%, rgba(184, 29, 36, 0.75) 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    border-radius: var(--radius-md);
    z-index: 2;
}

.invitation-badge {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    background: rgba(0, 0, 0, 0.7);
    padding: 0.35rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.invitation-info {
    text-align: center;
    color: white;
    margin-bottom: 0.75rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.invitation-info p {
    margin: 0.25rem 0;
    font-size: 0.85rem;
    line-height: 1.4;
}

.invitation-project-title {
    font-size: 1rem !important;
    font-weight: 700 !important;
    margin-bottom: 0.5rem !important;
    color: var(--white);
}

.invitation-info strong {
    font-weight: 700;
    color: var(--white);
}

.invitation-expiry {
    font-size: 0.75rem;
    opacity: 0.95;
    margin-top: 0.5rem;
}

.invitation-actions {
    display: flex;
    gap: 0.5rem;
    width: 100%;
}

.invitation-actions .btn {
    flex: 1;
    padding: 0.5rem 0.75rem;
    font-weight: 600;
    font-size: 0.85rem;
    border: none;
    transition: all 0.2s ease;
}

.invitation-actions .btn-success {
    background: var(--white);
    color: var(--dark-color);
}

.invitation-actions .btn-success:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.3);
    background: var(--gray-800);
}

.invitation-actions .btn-secondary {
    background: rgba(0, 0, 0, 0.4);
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.invitation-actions .btn-secondary:hover {
    background: rgba(0, 0, 0, 0.6);
    border-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.05);
}

.project-thumbnail {
    height: 180px;
    overflow: hidden;
    position: relative;
    border-top-left-radius: var(--radius-md);
    border-top-right-radius: var(--radius-md);
}

.project-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.thumbnail-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--gray-300);
    color: var(--gray-500);
    font-size: 3rem;
}

.project-info {
    padding: 1.5rem;
    flex: 1;
}

.project-info h3 {
    margin-bottom: 0.75rem;
    font-size: 1.25rem;
    color: var(--text-color);
    font-weight: 600;
}

.project-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.project-type {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.project-type.manga {
    background-color: #ffeaa7;
    color: #d35400;
}

.project-type.manhwa {
    background-color: #c7ecee;
    color: #0984e3;
}

.project-style,
.project-genres {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    background-color: var(--gray-300);
    color: var(--text-color);
    opacity: 0.8;
}

.project-genres {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.project-date {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    color: var(--text-color);
    opacity: 0.6;
}

.project-description {
    color: var(--text-color);
    opacity: 0.7;
    font-size: 0.875rem;
    margin-bottom: 0;
    line-height: 1.5;
}

.project-actions {
    padding: 1.5rem;
    background-color: var(--gray-100);
    display: flex;
    justify-content: space-between;
    position: relative;
}

.project-menu-toggle {
    padding: 0.375rem;
    width: 2rem;
}

.project-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background-color: var(--gray-200);
    border-radius: var(--radius-md);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
    z-index: 1000;
    width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.project-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.project-menu ul {
    padding: 0.5rem 0;
}

.project-menu ul li {
    margin: 0;
}

.project-menu ul li a {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    color: var(--text-color);
    transition: var(--transition);
}

.project-menu ul li a i {
    width: 1.25rem;
    margin-right: 0.75rem;
    text-align: center;
}

.project-menu ul li a:hover {
    background-color: var(--gray-300);
}

.project-menu ul li.delete-project a {
    color: #ef4444;
}

.project-menu ul li.delete-project a:hover {
    background-color: rgba(239, 68, 68, 0.1);
}

.no-projects {
    grid-column: 1 / -1;
}

.empty-state {
    background: linear-gradient(135deg, var(--gray-200) 0%, var(--gray-300) 100%);
    border-radius: var(--radius-md);
    padding: 4rem 3rem;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.empty-state i {
    font-size: 5rem;
    color: rgba(255, 255, 255, 0.2);
    margin-bottom: 1.5rem;
}

.empty-state h3 {
    margin-bottom: 1rem;
    color: var(--text-color);
    font-size: 1.75rem;
}

.empty-state p {
    margin-bottom: 2rem;
    color: var(--text-color);
    opacity: 0.7;
    font-size: 1rem;
}

/* ===== MODALS ===== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal.active {
    display: flex;
    opacity: 1;
    visibility: visible !important;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.85);
    z-index: 1000001;
}

.modal-content {
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    background-color: var(--modal-bg);
    border-radius: var(--radius-md);
    overflow: hidden;
    z-index: 1000002;
    transform: translateY(20px);
    transition: transform 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.modal.active .modal-content {
    transform: translateY(0);
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--dark-color);
}

.modal-header h3 {
    margin-bottom: 0;
    color: var(--white);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--light-color);
    cursor: pointer;
    transition: var(--transition);
}

.modal-close:hover {
    color: var(--white);
}

.modal-body {
    padding: 1.5rem;
    background-color: var(--gray-200);
    overflow-y: auto;
    flex: 1;
}

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

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

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-sm);
    background-color: var(--gray-300);
    color: var(--white);
    transition: var(--transition);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--gray-500);
    opacity: 0.8;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: var(--primary-color);
    outline: none;
    background-color: var(--gray-400);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.1);
}

.form-group textarea {
    min-height: 100px;
    resize: vertical;
}

.style-description {
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: var(--gray-600);
}

.style-type-selector {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.style-type-option {
    position: relative;
}

.style-type-option input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.style-type-card {
    padding: 1.5rem;
    border: 2px solid var(--gray-300);
    border-radius: var(--radius-md);
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
}

.style-type-option input:checked + .style-type-card {
    border-color: var(--primary-color);
    background-color: rgba(108, 92, 231, 0.05);
}

.style-type-icon {
    font-size: 2rem;
    color: var(--gray-600);
    margin-bottom: 1rem;
}

.style-type-option input:checked + .style-type-card .style-type-icon {
    color: var(--primary-color);
}

.style-type-card h4 {
    margin-bottom: 0.5rem;
}

.style-type-card p {
    font-size: 0.875rem;
    color: var(--gray-600);
    margin-bottom: 0;
}

/* ===== AI IDEAS FEATURE ===== */
.ai-ideas-section {
    background: linear-gradient(135deg, rgba(108, 92, 231, 0.1) 0%, rgba(108, 92, 231, 0.05) 100%);
    border: 2px solid rgba(108, 92, 231, 0.2);
    border-radius: var(--radius-md);
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.ai-ideas-header {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.ai-ideas-icon {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.ai-ideas-text {
    flex: 1;
}

.ai-ideas-text h4 {
    margin: 0 0 0.25rem 0;
    font-size: 1.1rem;
}

.ai-ideas-text p {
    margin: 0;
    font-size: 0.875rem;
    color: var(--gray-600);
}

.ai-ideas-prompt {
    margin-top: 1rem;
}

.ai-ideas-prompt textarea {
    min-height: 60px;
    resize: vertical;
}

.ai-prompt-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-top: 1rem;
}

.ai-ideas-results {
    margin-top: 1rem;
}

.ai-ideas-results h4 {
    margin-bottom: 0.75rem;
    font-size: 1rem;
}

.ideas-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.idea-card {
    background: var(--gray-100);
    border: 2px solid var(--gray-300);
    border-radius: var(--radius-md);
    padding: 1rem;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.idea-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(108, 92, 231, 0.15);
}

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

.idea-type {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--primary-color);
    color: white;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.idea-number {
    font-size: 0.875rem;
    color: var(--gray-600);
    font-weight: 600;
}

.idea-card h5 {
    font-size: 1rem;
    margin: 0 0 0.75rem 0;
    color: var(--text-color);
}

.idea-card p {
    font-size: 0.8rem;
    color: var(--gray-600);
    line-height: 1.4;
    margin-bottom: 0.75rem;
    flex: 1;
}

.select-idea-btn {
    width: 100%;
    margin-top: auto;
}

.form-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 1.5rem 0 1rem 0;
}

.form-divider::before,
.form-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--gray-300);
}

.form-divider span {
    padding: 0 1rem;
    color: var(--gray-600);
    font-size: 0.875rem;
    font-weight: 500;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 2rem;
}

.btn-danger {
    color: var(--white);
    background-color: #e74c3c;
    border: 1px solid #e74c3c;
}

.btn-danger:hover {
    background-color: #c0392b;
    border-color: #c0392b;
    color: var(--white);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 991.98px) {
    .sidebar {
        width: 70px;
    }

    .sidebar.expanded {
        width: 250px;
    }

    .sidebar-toggle {
        display: block;
    }

    .sidebar-nav ul li a span,
    .sidebar-header .logo span,
    .logout-btn span {
        opacity: 0;
        visibility: hidden;
        white-space: nowrap;
        transition: var(--transition);
    }

    .sidebar.expanded .sidebar-nav ul li a span,
    .sidebar.expanded .sidebar-header .logo span,
    .sidebar.expanded .logout-btn span {
        opacity: 1;
        visibility: visible;
    }

    .main-content {
        margin-left: 70px;
    }

    .projects-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }

    .dashboard-header {
        padding: 1rem;
    }
}

/* Mobile sidebar overlay */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 199;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
    display: block;
    opacity: 1;
}

@media (max-width: 767.98px) {
    body {
        overflow-x: hidden;
    }

    .sidebar {
        transform: translateX(-100%);
        width: 250px;
        position: fixed;
        z-index: 200;
        transition: transform 0.3s ease;
    }

    .sidebar.expanded {
        transform: translateX(0);
        box-shadow: 4px 0 20px rgba(0, 0, 0, 0.5);
    }

    .main-content {
        margin-left: 0;
        width: 100%;
        max-width: 100vw;
        overflow-x: hidden;
    }

    .dashboard-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
        padding: 0.875rem;
    }

    .header-left {
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .header-left::before {
        content: '\f0c9';
        font-family: 'Font Awesome 6 Free';
        font-weight: 900;
        font-size: 1.25rem;
        color: var(--white);
        cursor: pointer;
        padding: 0.5rem;
        margin-right: 1rem;
    }

    .header-right {
        width: 100%;
        gap: 0.75rem;
    }

    .compact-header-info {
        gap: 0.5rem;
        width: 100%;
    }

    .header-info-item {
        font-size: 0.8125rem;
        padding: 0.5rem 0.75rem;
    }

    .header-info-item.credit-balance {
        flex: 1;
    }

    .user-profile span {
        display: none;
    }

    .dashboard-content {
        padding: 1rem;
    }

    .projects-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }

    .projects-header h2 {
        font-size: 1.5rem;
    }

    .projects-header .btn {
        width: 100%;
    }

    .projects-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .style-type-selector {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .style-type-card {
        padding: 1rem;
    }

    .style-type-card h4 {
        font-size: 0.875rem;
    }

    .style-type-card p {
        font-size: 0.75rem;
    }

    .modal-content {
        max-width: calc(100% - 2rem);
        margin: 1rem;
    }
}

@media (max-width: 575.98px) {
    .header-right {
        flex-direction: row;
        gap: 0.5rem;
        align-items: center;
    }

    .compact-header-info {
        gap: 0.375rem;
    }

    .header-info-item {
        font-size: 0.75rem;
        padding: 0.375rem 0.625rem;
    }

    .header-info-item.credit-balance {
        flex: 1;
    }

    .user-avatar {
        width: 32px;
        height: 32px;
    }

    .dashboard-content {
        padding: 0.75rem;
    }

    .projects-header h2 {
        font-size: 1.25rem;
    }

    .project-card {
        font-size: 0.9rem;
    }

    .project-info {
        padding: 1rem;
    }

    .project-info h3 {
        font-size: 1.1rem;
    }

    .project-actions {
        padding: 1rem;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .project-actions .btn {
        flex: 1;
        min-height: 44px; /* Touch-friendly target */
    }

    .style-type-selector {
        grid-template-columns: 1fr;
    }

    /* Touch-friendly button sizes */
    .btn {
        min-height: 44px;
        padding: 0.625rem 1.25rem;
    }

    .project-menu ul li a {
        padding: 1rem;
        min-height: 48px;
    }

    /* Improve genre selector for mobile */
    .genre-option {
        min-height: 44px;
        padding: 0.5rem 0.75rem;
    }

    .genre-label {
        font-size: 0.875rem;
    }

    .ai-ideas-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .ai-ideas-header .btn {
        width: 100%;
    }

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

    .form-actions .btn {
        width: 100%;
    }

    .modal-header {
        padding: 1rem;
    }

    .modal-body {
        padding: 1rem;
    }

    .empty-state {
        padding: 2rem 1.5rem;
    }

    .empty-state i {
        font-size: 3rem;
    }

    .empty-state h3 {
        font-size: 1.25rem;
    }

    .project-thumbnail {
        height: 150px;
    }

    .project-meta {
        font-size: 0.75rem;
    }

    .project-description {
        font-size: 0.8rem;
        line-height: 1.4;
    }

    .subscription-info .fa-crown,
    .subscription-warning i {
        font-size: 0.875rem;
    }
}

/* Extra small devices optimization */
@media (max-width: 400px) {
    .dashboard-header {
        padding: 0.75rem;
    }

    .projects-grid {
        gap: 1rem;
    }

    .project-card {
        font-size: 0.85rem;
    }

    .project-thumbnail {
        height: 120px;
    }

    .modal-content {
        max-width: calc(100% - 1rem);
        margin: 0.5rem;
    }

    .genre-selector {
        gap: 0.5rem;
    }
}

/* ===== DELETE CONFIRMATION MODAL ===== */
.delete-warning {
    text-align: center;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(220, 38, 38, 0.05) 100%);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: var(--radius-md);
}

.warning-icon {
    font-size: 3rem;
    color: #ef4444;
    margin-bottom: 1rem;
}

.delete-warning h4 {
    color: #ef4444;
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.delete-warning p {
    color: var(--text-color);
    opacity: 0.9;
    line-height: 1.5;
    margin-bottom: 0.5rem;
}

.delete-warning p:last-child {
    margin-bottom: 0;
    font-weight: 600;
}

#delete-project-title {
    color: #ef4444;
    font-weight: 600;
}

#delete-confirmation {
    font-family: 'Courier New', monospace;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 2px solid #d1d5db;
    padding: 0.75rem;
    transition: border-color 0.3s ease;
}

#delete-confirmation:focus {
    border-color: #dc2626;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

#delete-confirmation.valid {
    border-color: #10b981;
    background-color: #f0fdf4;
}

.btn-success {
    background-color: #10b981;
    border-color: #10b981;
    color: white;
}

.btn-success:hover {
    background-color: #059669;
    border-color: #059669;
}

.text-danger {
    color: #ef4444 !important;
}

/* Enhanced project menu styling */
.project-menu .text-danger:hover {
    background-color: rgba(239, 68, 68, 0.1);
    color: #ef4444 !important;
}

/* Project Role Badges */
.project-role-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.625rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.project-role-badge i {
    font-size: 0.875rem;
}

.project-role-badge.role-admin {
    background-color: rgba(220, 53, 69, 0.15);
    color: #dc3545;
    border: 1px solid rgba(220, 53, 69, 0.3);
}

.project-role-badge.role-editor {
    background-color: rgba(0, 123, 255, 0.15);
    color: #007bff;
    border: 1px solid rgba(0, 123, 255, 0.3);
}

/* Owner badge (gold/yellow) */
.project-role-badge i.fa-crown {
    color: #fbbf24;
}

.project-role-badge:has(.fa-crown) {
    background-color: rgba(251, 191, 36, 0.15);
    color: #f59e0b;
    border: 1px solid rgba(251, 191, 36, 0.3);
}

/* Mobile dropdown modal for project menus */
@media (max-width: 768px) {
    /* Hide regular project menu on mobile but keep in DOM for modal */
    .project-menu {
        position: absolute !important;
        left: -9999px !important;
        opacity: 0 !important;
        pointer-events: none !important;
        visibility: hidden !important;
/* Mobile dropdown modal overlay */    .mobile-dropdown-modal {        position: fixed;        top: 0;        left: 0;        right: 0;        bottom: 0;        background: rgba(0, 0, 0, 0.7);        z-index: 10000;        display: none;        align-items: center;        justify-content: center;        padding: 20px;    }    .mobile-dropdown-modal.active {        display: flex;    }    /* Modal content */    .mobile-dropdown-content {        background: var(--gray-200);        border-radius: 12px;        width: 100%;        max-width: 320px;        overflow: hidden;        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);    }    /* Modal header */    .mobile-dropdown-header {        display: flex;        justify-content: space-between;        align-items: center;        padding: 16px 20px;        border-bottom: 1px solid rgba(255, 255, 255, 0.1);    }    .mobile-dropdown-title {        font-size: 16px;        font-weight: 600;        color: var(--white);    }    .mobile-dropdown-close {        background: none;        border: none;        color: var(--light-color);        font-size: 24px;        cursor: pointer;        padding: 0;        width: 32px;        height: 32px;        display: flex;        align-items: center;        justify-content: center;        transition: color 0.2s;    }    .mobile-dropdown-close:hover {        color: var(--white);    }    /* Modal menu items */    .mobile-dropdown-menu {        padding: 8px 0;    }    .mobile-dropdown-menu a {        display: flex;        align-items: center;        padding: 16px 20px;        color: var(--white);        text-decoration: none;        font-size: 15px;        transition: background 0.2s;    }    .mobile-dropdown-menu a:active {        background: var(--primary-color);    }    .mobile-dropdown-menu a i {        margin-right: 12px;        width: 20px;        text-align: center;        font-size: 16px;    }
    }
}
