/* Subscription Management Page Styles */

.subscription-page {
    min-height: calc(100vh - 80px);
    padding-top: 6rem; /* Increased to ensure proper spacing below fixed navbar */
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

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

/* Page Header */
.page-header {
    text-align: center;
    margin-bottom: 4rem;
    color: white;
    padding-bottom: 1rem;
}

.page-header h1 {
    font-family: 'Playfair Display', serif;
    font-size: 3rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.page-header p {
    font-size: 1.1rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

/* Loading Section */
.loading-section {
    text-align: center;
    padding: 4rem 2rem;
    color: white;
}

.loading-spinner {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: rgba(255, 255, 255, 0.8);
}

.loading-section p {
    font-size: 1.1rem;
    opacity: 0.8;
}

/* No Subscription State */
.no-subscription {
    background: white;
    border-radius: 20px;
    padding: 3.5rem;
    margin-bottom: 3rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.9);
}

.no-subscription-content {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.no-subscription-icon {
    font-size: 4rem;
    color: #e74c3c;
    margin-bottom: 1.5rem;
}

.no-subscription h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    color: #2c3e50;
    margin-bottom: 1rem;
}

.no-subscription p {
    font-size: 1.1rem;
    color: #7f8c8d;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.subscription-benefits {
    text-align: left;
    margin: 2.5rem 0;
    padding: 2.5rem;
    background: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 18px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.subscription-benefits h3 {
    font-size: 1.3rem;
    color: #2c3e50;
    margin-bottom: 1rem;
    text-align: center;
}

.subscription-benefits ul {
    list-style: none;
    padding: 0;
}

.subscription-benefits li {
    display: flex;
    align-items: center;
    margin-bottom: 0.8rem;
    font-size: 1rem;
    color: #34495e;
}

.subscription-benefits li i {
    color: #27ae60;
    margin-right: 0.8rem;
    font-size: 1.1rem;
}

.subscription-cta {
    margin-top: 2rem;
}

.subscription-cta .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    border-radius: 50px;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
}

.cta-note {
    font-size: 0.9rem;
    color: #95a5a6;
    margin-top: 0.5rem;
}

/* Active Subscription State */
.active-subscription {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

/* Subscription Overview */
.subscription-overview {
    background: white;
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.8);
    margin-bottom: 1rem;
}

.overview-header {
    display: flex;
    justify-content: between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.overview-header h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    color: #2c3e50;
    margin: 0;
}

.plan-status {
    display: flex;
    align-items: center;
}

.status-badge {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge.active {
    background: #d5f4e6;
    color: #27ae60;
    border: 1px solid #27ae60;
}

.plan-card {
    background: #ffffff;
    border-radius: 18px;
    padding: 2rem;
    border: 1px solid #e9ecef;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.plan-info {
    margin-bottom: 1.5rem;
}

.plan-name {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.plan-price {
    font-size: 1.2rem;
    font-weight: 600;
    color: #667eea;
    margin-bottom: 0.5rem;
}

.plan-description {
    color: #7f8c8d;
    font-size: 1rem;
}

.plan-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.meta-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.meta-label {
    font-size: 0.9rem;
    color: #7f8c8d;
    font-weight: 500;
}

.meta-value {
    font-size: 1rem;
    color: #2c3e50;
    font-weight: 500;
}

/* Enhanced meta items with icons */
.meta-label i {
    margin-right: 0.5rem;
    color: #667eea;
}

/* Consumption meter styles */
.consumption-meter {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.quota-bar {
    flex: 1;
    height: 12px;
    background: #e9ecef;
    border-radius: 6px;
    overflow: hidden;
    min-width: 120px;
}

.quota-used {
    height: 100%;
    background: linear-gradient(90deg, #28a745 0%, #20c997 50%, #ffc107 75%, #dc3545 100%);
    border-radius: 6px;
    transition: width 0.3s ease;
}

.quota-text {
    font-size: 0.9rem;
    font-weight: 600;
    color: #495057;
    white-space: nowrap;
}

/* Theme tags styles */
.themes-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.25rem;
}

.theme-tag {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Subscription history styles */
.subscription-count {
    font-weight: 600;
    color: #667eea;
    margin-right: 1rem;
}

.view-history-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.view-history-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.edit-profile-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-left: 0.5rem;
}

.edit-profile-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.profile-status {
    font-weight: 500;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.profile-status.complete {
    background: rgba(40, 167, 69, 0.1);
    color: #28a745;
    border: 1px solid rgba(40, 167, 69, 0.3);
}

.profile-status.complete::before {
    content: '✓';
    font-weight: bold;
}

.profile-status.incomplete {
    background: rgba(255, 193, 7, 0.1);
    color: #e67e22;
    border: 1px solid rgba(255, 193, 7, 0.3);
}

.profile-status.incomplete::before {
    content: '!';
    font-weight: bold;
}

.subscription-history {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    margin-top: 1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border: 1px solid #e9ecef;
}

.subscription-history h4 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.subscription-history h4 i {
    color: #667eea;
    margin-right: 0.5rem;
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.history-item {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 1rem;
    border-left: 4px solid #dee2e6;
    transition: all 0.3s ease;
}

.history-item.current {
    border-left-color: #28a745;
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.05), rgba(32, 201, 151, 0.05));
}

.history-item:hover {
    transform: translateX(2px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

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

.history-plan {
    font-weight: 600;
    color: #2c3e50;
    font-size: 1rem;
}

.history-status {
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.history-status.active {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.history-status.expired {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.history-details {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.history-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    color: #6c757d;
    font-size: 0.9rem;
}

.history-meta span {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.history-meta i {
    color: #667eea;
}

.history-quota {
    padding-top: 0.5rem;
    border-top: 1px solid #e9ecef;
}

.quota-info {
    color: #495057;
    font-size: 0.9rem;
    font-weight: 500;
}

.quota-info i {
    color: #667eea;
    margin-right: 0.3rem;
}

/* Responsive design for history */
@media (max-width: 768px) {
    .history-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .history-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .subscription-history {
        padding: 1rem;
    }
}

/* Profile Setup Reminder */
.profile-setup-reminder {
    margin: 2rem 0;
}

.reminder-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px dashed #667eea;
    border-radius: 15px;
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
}

.reminder-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.reminder-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
}

.reminder-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.reminder-content h3 {
    color: #2c3e50;
    margin: 0 0 0.5rem 0;
    font-size: 1.3rem;
    font-weight: 600;
}

.reminder-content p {
    color: #6c757d;
    margin: 0;
    line-height: 1.5;
}

.reminder-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.btn-setup-profile {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-setup-profile:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-dismiss {
    background: transparent;
    color: #6c757d;
    border: 2px solid #dee2e6;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-dismiss:hover {
    border-color: #adb5bd;
    color: #495057;
}

.reminder-benefits {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.75rem;
}

.benefit-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #495057;
    font-size: 0.9rem;
}

.benefit-item i {
    color: #667eea;
    width: 16px;
    text-align: center;
}

/* Profile Setup Modal */
.profile-modal {
    max-width: 600px;
}

.profile-setup-intro {
    text-align: center;
    margin-bottom: 2rem;
    padding: 1rem;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05), rgba(118, 75, 162, 0.05));
    border-radius: 10px;
}

.setup-icon {
    font-size: 3rem;
    color: #667eea;
    margin-bottom: 1rem;
}

.profile-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.form-group label i {
    color: #667eea;
    width: 16px;
    text-align: center;
}

.form-control {
    padding: 0.75rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
}

.form-control:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-help {
    color: #6c757d;
    font-size: 0.85rem;
    margin-top: 0.25rem;
    line-height: 1.4;
}

.privacy-notice {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: rgba(40, 167, 69, 0.05);
    border: 1px solid rgba(40, 167, 69, 0.2);
    border-radius: 8px;
    margin-top: 1rem;
}

.privacy-icon {
    color: #28a745;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.privacy-text {
    flex: 1;
}

.privacy-text p {
    margin: 0;
    font-size: 0.9rem;
    color: #495057;
    line-height: 1.4;
}

/* Responsive design for profile reminder */
@media (max-width: 768px) {
    .reminder-header {
        flex-direction: column;
        text-align: center;
    }
    
    .reminder-actions {
        justify-content: center;
    }
    
    .reminder-benefits {
        grid-template-columns: 1fr;
    }
    
    .profile-modal {
        margin: 1rem;
        max-width: calc(100vw - 2rem);
    }
    
    .btn-setup-profile,
    .btn-dismiss {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }
}

/* Notifications */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    min-width: 300px;
    max-width: 500px;
    animation: slideInRight 0.3s ease-out;
}

.notification-success {
    border-left: 4px solid #28a745;
}

.notification-error {
    border-left: 4px solid #dc3545;
}

.notification-info {
    border-left: 4px solid #667eea;
}

.notification-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
}

.notification-close {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: #6c757d;
    cursor: pointer;
    padding: 0;
    margin-left: 1rem;
}

.notification-close:hover {
    color: #495057;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Prediction Results */
.prediction-results {
    background: white;
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.8);
    margin-bottom: 1rem;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.results-header h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    color: #2c3e50;
    margin: 0;
}

.filter-select {
    padding: 0.5rem 1rem;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    background: white;
    font-size: 1rem;
    color: #495057;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.filter-select:focus {
    outline: none;
    border-color: #667eea;
}

.period-section {
    margin-bottom: 4rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #f1f3f4;
}

.period-section:last-child {
    border-bottom: none;
    margin-bottom: 2rem;
}

.period-section h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    color: #2c3e50;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.readings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 1.5rem;
}

.reading-card {
    background: #ffffff;
    border-radius: 18px;
    padding: 2rem;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.reading-card:hover {
    border-color: #667eea;
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(102, 126, 234, 0.15);
}

.reading-card.upcoming {
    border: 2px dashed #dee2e6;
    background: #fdfdfe;
}

.reading-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.reading-date {
    font-weight: 600;
    color: #2c3e50;
    font-size: 1rem;
}

.reading-status {
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.reading-status.delivered {
    background: #d5f4e6;
    color: #27ae60;
}

.reading-status.upcoming {
    background: #fff3cd;
    color: #856404;
}

.reading-content h4 {
    font-size: 1.2rem;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.reading-content p {
    color: #6c757d;
    line-height: 1.5;
    margin-bottom: 1rem;
}

.reading-themes {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.theme-tag {
    background: #e3f2fd;
    color: #1976d2;
    padding: 0.25rem 0.5rem;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 500;
}

.reading-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.btn {
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    border: none;
}

.btn-outline {
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
}

.btn-outline:hover {
    background: #667eea;
    color: white;
}

.btn-text {
    background: transparent;
    color: #6c757d;
    border: none;
}

.btn-text:hover {
    color: #495057;
    background: #f8f9fa;
}

/* Subscription Management */
.subscription-management {
    background: white;
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.8);
}

.subscription-management h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    color: #2c3e50;
    margin-bottom: 1.5rem;
}

.management-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.btn-danger {
    background: #dc3545;
    color: white;
    border: 2px solid #dc3545;
}

.btn-danger:hover {
    background: #c82333;
    border-color: #c82333;
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    border-radius: 15px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #dee2e6;
}

.modal-header h3 {
    margin: 0;
    color: #2c3e50;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #6c757d;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-body {
    padding: 1.5rem;
}

.modal-body p {
    margin-bottom: 1rem;
    color: #495057;
    line-height: 1.5;
}

.modal-body ul {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.modal-body li {
    margin-bottom: 0.5rem;
    color: #6c757d;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    padding: 1.5rem;
    border-top: 1px solid #dee2e6;
}

/* Responsive Design */
@media (max-width: 768px) {
    .subscription-page {
        padding-top: 5rem; /* Increased to ensure proper spacing on mobile */
    }
    
    .container {
        padding: 0 0.75rem;
    }
    
    .page-header {
        margin-bottom: 2rem; /* Reduced margin on mobile */
    }
    
    .page-header h1 {
        font-size: 2.5rem;
    }
    
    .no-subscription {
        padding: 2rem 1.5rem;
    }
    
    .subscription-overview,
    .prediction-results,
    .subscription-management {
        padding: 2rem;
    }
    
    .overview-header,
    .results-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .plan-meta {
        grid-template-columns: 1fr;
    }
    
    .readings-grid {
        grid-template-columns: 1fr;
    }
    
    .management-actions {
        flex-direction: column;
    }
    
    .management-actions .btn {
        width: 100%;
        justify-content: center;
    }
    
    .modal-content {
        margin: 1rem;
        width: calc(100% - 2rem);
    }
    
    .modal-footer {
        flex-direction: column-reverse;
    }
    
    .modal-footer .btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .page-header h1 {
        font-size: 2rem;
    }
    
    .no-subscription {
        padding: 1.5rem 1rem;
    }
    
    .subscription-benefits {
        padding: 1.5rem;
    }
    
    .reading-card {
        padding: 1.5rem;
    }
    
    .reading-actions {
        flex-direction: column;
    }
    
    .reading-actions .btn {
        width: 100%;
        justify-content: center;
    }
}

/* Readings Loading State */
.readings-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
    text-align: center;
    color: #6c757d;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.readings-loading p {
    margin: 0;
    font-size: 1rem;
    color: #6c757d;
}

/* Empty State for Readings */
.no-readings {
    padding: 3rem 2rem;
}

.empty-state {
    text-align: center;
    color: #6c757d;
}

.empty-state i {
    font-size: 3rem;
    color: #dee2e6;
    margin-bottom: 1rem;
}

.empty-state h4 {
    color: #495057;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.empty-state p {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Reading Detail Modal */
.reading-detail-modal {
    max-width: 800px;
    max-height: 90vh;
    width: 90%;
}

.reading-detail-modal .modal-body {
    max-height: 60vh;
    overflow-y: auto;
    padding: 2rem;
}

.reading-full-content {
    font-size: 1rem;
    line-height: 1.8;
    color: #333;
}

.reading-full-content p {
    margin: 0 0 1rem 0;
    text-align: left;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.reading-full-content p:last-child {
    margin-bottom: 0;
}

/* Markdown content styling */
.reading-full-content h1,
.reading-full-content h2,
.reading-full-content h3,
.reading-full-content h4,
.reading-full-content h5,
.reading-full-content h6 {
    color: #2c3e50;
    font-weight: 600;
    margin: 1.5rem 0 0.8rem 0;
    line-height: 1.4;
}

.reading-full-content h1:first-child,
.reading-full-content h2:first-child,
.reading-full-content h3:first-child {
    margin-top: 0;
}

.reading-full-content h1 {
    font-size: 1.6rem;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 0.5rem;
}

.reading-full-content h2 {
    font-size: 1.4rem;
    color: #4a5568;
}

.reading-full-content h3 {
    font-size: 1.2rem;
    color: #6366f1;
}

.reading-full-content h4 {
    font-size: 1.1rem;
}

.reading-full-content strong {
    color: #2d3748;
    font-weight: 600;
}

.reading-full-content em {
    color: #4a5568;
    font-style: italic;
}

.reading-full-content ul,
.reading-full-content ol {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.reading-full-content li {
    margin: 0.5rem 0;
    line-height: 1.6;
}

.reading-full-content blockquote {
    margin: 1.5rem 0;
    padding: 1rem 1.5rem;
    background-color: #f8f9fa;
    border-left: 4px solid #6366f1;
    border-radius: 0 8px 8px 0;
    font-style: italic;
    color: #4a5568;
}

.reading-full-content code {
    background-color: #f1f5f9;
    color: #dc2626;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.9rem;
}

.reading-full-content pre {
    background-color: #1f2937;
    color: #f9fafb;
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 1rem 0;
}

.reading-full-content pre code {
    background: none;
    color: inherit;
    padding: 0;
}

.reading-full-content hr {
    border: none;
    border-top: 2px solid #e5e7eb;
    margin: 2rem 0;
}

.reading-full-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}

.reading-full-content th,
.reading-full-content td {
    border: 1px solid #d1d5db;
    padding: 0.75rem;
    text-align: left;
}

.reading-full-content th {
    background-color: #f9fafb;
    font-weight: 600;
    color: #374151;
}

.reading-detail-modal .modal-header h3 {
    color: #2c3e50;
    font-size: 1.4rem;
    margin: 0;
}

.reading-detail-modal .modal-footer {
    padding: 1.5rem 2rem;
    justify-content: center;
}

/* Responsive adjustments for reading modal */
@media (max-width: 768px) {
    .reading-detail-modal {
        width: 95%;
        max-height: 95vh;
    }
    
    .reading-detail-modal .modal-body {
        padding: 1.5rem;
        max-height: 70vh;
    }
    
    .reading-full-content {
        font-size: 0.95rem;
        line-height: 1.6;
    }
    
    .load-more-container {
        margin-top: 1rem;
    }
    
    .load-more-btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
    }
}

/* Load More Button Styles */
.load-more-container {
    text-align: center;
    margin: 2rem 0 1rem 0;
    padding: 1rem 0;
}

.load-more-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.load-more-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
}

.load-more-btn:active {
    transform: translateY(0);
}

.load-more-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.load-more-btn:disabled:hover {
    transform: none;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.load-more-btn i {
    font-size: 0.9rem;
}
