/* PrintedEdges V2 Custom Styles */

:root {
    /* Green Color Palette from Mockups */
    --pe-primary: #28a745;
    --pe-primary-light: #34ce57;
    --pe-primary-dark: #1e7e34;
    --pe-secondary: #6c757d;
    --pe-success: #28a745;
    --pe-light-green: #d4edda;
    --pe-bg-light: #f8f9fa;
    --pe-bg-white: #ffffff;
    --pe-text-dark: #212529;
    --pe-text-muted: #6c757d;
    --pe-border: #dee2e6;
    --pe-shadow: rgba(0, 0, 0, 0.1);
}

/* Typography */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--pe-text-dark);
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    color: var(--pe-text-dark);
}

.font-merriweather {
    font-family: 'Merriweather', 'Times New Roman', serif !important;
}

.navbar-brand .brand-title {
    font-family: 'Merriweather', 'Times New Roman', serif;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: var(--pe-text-dark);
}

/* Custom Bootstrap Overrides */
.btn-success {
    background-color: var(--pe-primary);
    border-color: var(--pe-primary);
    font-weight: 500;
    padding: 0.5rem 1.5rem;
}

.btn-success:hover {
    background-color: var(--pe-primary-dark);
    border-color: var(--pe-primary-dark);
}

.bg-pe-primary {
    background-color: var(--pe-primary) !important;
}

.text-pe-primary {
    color: var(--pe-primary) !important;
}

.btn-outline-pe-primary {
    color: var(--pe-primary);
    border-color: var(--pe-primary);
}

.btn-outline-pe-primary:hover,
.btn-outline-pe-primary:focus {
    color: #ffffff;
    background-color: var(--pe-primary);
    border-color: var(--pe-primary);
}

.btn-outline-pe-primary:active,
.btn-outline-pe-primary.active,
.btn-outline-pe-primary:focus-visible {
    color: #ffffff;
    background-color: var(--pe-primary-dark);
    border-color: var(--pe-primary-dark);
    box-shadow: 0 0 0 0.25rem rgba(40, 167, 69, 0.25);
}

.badge.bg-success {
    background-color: var(--pe-primary) !important;
}

/* Navigation Styles */
.navbar {
    border-bottom: 1px solid var(--pe-border);
}

.navbar-brand {
    font-weight: 600;
    font-size: 1.25rem;
}

.nav-link {
    font-weight: 500;
    color: var(--pe-text-dark) !important;
    transition: color 0.2s ease;
}

.nav-link:hover {
    color: var(--pe-primary) !important;
}

.navbar-logo-wrapper {
    width: 44px;
    height: 44px;
}

.navbar-logo {
    max-width: 100%;
    max-height: 100%;
    display: block;
}

.sale-nav-callout {
    background: transparent;
    border: 0;
    padding: 0;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--pe-primary);
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    cursor: pointer;
    animation: saleNavBounce 2.8s ease-in-out infinite;
}

.sale-nav-callout:focus-visible {
    outline: 2px solid rgba(25, 135, 84, 0.4);
    border-radius: 999px;
}

.sale-nav-label {
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.sale-nav-arrow {
    font-size: 1.1rem;
    transform: translateY(-1px);
}

@keyframes saleNavBounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-3px);
    }
}

/* Responsive Navigation Fix */
@media (min-width: 992px) {
    #mobileNav {
        display: none !important;
    }
}

@media (max-width: 991.98px) {
    .navbar-nav.d-none.d-lg-flex {
        display: none !important;
    }
}

/* Card Styles */
.card {
    border: 1px solid var(--pe-border);
    border-radius: 12px;
    box-shadow: 0 2px 4px var(--pe-shadow);
    transition: all 0.2s ease;
}

.card:hover {
    box-shadow: 0 4px 12px var(--pe-shadow);
    transform: translateY(-2px);
}

.card-body {
    padding: 1.5rem;
}

/* Quick Start Cards */
.quick-start-card {
    background: var(--pe-bg-white);
    border: 2px solid var(--pe-border);
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    height: 100%;
}

.quick-start-card:hover {
    border-color: var(--pe-primary);
    box-shadow: 0 8px 25px var(--pe-shadow);
    transform: translateY(-4px);
}

.quick-start-card .icon {
    width: 48px;
    height: 48px;
    background: var(--pe-light-green);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.5rem;
    color: var(--pe-primary);
}

/* Project Cards */
.project-card {
    position: relative;
    overflow: hidden;
}

.project-card[data-project-card] {
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.project-card[data-project-card]:hover,
.project-card[data-project-card]:focus {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(31, 77, 45, 0.12);
}

.project-card[data-project-card]:focus {
    outline: 2px solid var(--pe-primary);
    outline-offset: 2px;
}

.project-status {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
}

.status-draft {
    background: var(--pe-light-green);
    color: var(--pe-primary-dark);
}

.status-purchased {
    background: #fce4ec;
    color: #c2185b;
}

.status-finalized {
    background: var(--pe-light-green);
    color: var(--pe-primary-dark);
}

/* Book Preview Styles */
.book-preview {
    width: 100%;
    height: 200px;
    background: var(--pe-bg-light);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    position: relative;
    overflow: hidden;
}

.project-preview-hero-frame {
    width: 100%;
    aspect-ratio: 3 / 2;
    background: var(--pe-bg-light);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.project-preview-hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.book-preview img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* Profile downloads */
.profile-download-actions {
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
}

.profile-download-actions .profile-download-action {
    min-width: 120px;
}

@media (max-width: 575.98px) {
    .profile-download-actions {
        width: 100%;
        align-items: stretch;
    }

    .profile-download-actions .profile-download-action {
        width: 100%;
    }
}

/* Feature Cards */
.feature-card {
    text-align: center;
    padding: 2rem;
    background: var(--pe-bg-white);
    border-radius: 16px;
    border: 1px solid var(--pe-border);
    height: 100%;
}

.feature-card .icon {
    width: 64px;
    height: 64px;
    background: var(--pe-light-green);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2rem;
    color: var(--pe-primary);
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--pe-bg-white) 0%, var(--pe-light-green) 100%);
    border-radius: 24px;
    padding: 4rem 2rem;
    margin-bottom: 3rem;
    position: relative;
    overflow: hidden;
}

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

.hero-logo {
    max-width: 250px;
    height: auto;
    display: block;
    margin: 0 auto 1.5rem;
}

.hero-price-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35em;
    margin-left: 0.6rem;
    padding: 0.2em 0.65em;
    background-color: var(--pe-primary);
    color: #ffffff;
    border-radius: 999px;
    font-size: 0.6em;
    vertical-align: middle;
    box-shadow: 0 8px 20px rgba(30, 126, 52, 0.15);
    white-space: nowrap;
    line-height: 1;
}

.hero-price-pill .bi {
    font-size: 1em;
}

@media (max-width: 575.98px) {
    .hero-price-pill {
        display: inline-flex;
        margin-left: 0;
        margin-top: 0.75rem;
    }
}

.hero-book-container {
    position: relative;
    z-index: 1;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-threejs-preview {
    display: flex;
    width: 100%;
    max-width: 560px;
    align-items: stretch;
    justify-content: center;
}

.hero-threejs-preview__canvas {
    width: 100%;
    min-height: clamp(320px, 45vw, 520px);
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    background: linear-gradient(135deg, #f5f9f4 0%, #dcefe1 100%);
    filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.15));
    transition: transform 0.2s ease-out;
}

@media (min-width: 992px) {
    .hero-section .row.align-items-center {
        align-items: stretch;
    }

    .hero-content {
        display: flex;
        flex-direction: column;
        justify-content: center;
        height: 100%;
    }

    .hero-book-container,
    .hero-threejs-preview {
        height: 100%;
    }

    .hero-threejs-preview__canvas {
        min-height: clamp(520px, 65vh, 720px);
        height: 100%;
    }
}

.hero-threejs-preview__canvas .threejs-preview {
    width: 100%;
    height: 100%;
    border-radius: 0;
}

.hero-threejs-preview__canvas canvas[data-threejs="canvas"] {
    width: 100% !important;
    height: 100% !important;
}

.hero-threejs-preview__canvas .threejs-preview__right-rail,
.hero-threejs-preview__canvas .threejs-preview__actions,
.hero-threejs-preview__canvas .threejs-preview__panel {
    display: none !important;
}

/* Examples Section */
.examples-section {
    margin-top: 4rem;
}

.book-preview-small {
    transition: transform 0.3s ease;
}

.book-preview-small:hover {
    transform: translateY(-5px) scale(1.05);
}

/* Enhanced Interactive Hover Effects */
.card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover .card-body {
    transform: translateY(-2px);
}

.quick-start-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.quick-start-card:hover .icon {
    transform: scale(1.1) rotate(5deg);
    background: linear-gradient(135deg, var(--pe-primary-light) 0%, var(--pe-primary) 100%);
}

.feature-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.feature-card:hover .icon {
    transform: scale(1.05);
    background: linear-gradient(135deg, var(--pe-primary) 0%, var(--pe-primary-light) 100%);
    box-shadow: 0 8px 16px rgba(40, 167, 69, 0.2);
}

/* Button Hover Enhancements */
.btn {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

.btn-success:hover {
    background: linear-gradient(135deg, var(--pe-primary-light) 0%, var(--pe-primary) 100%);
    box-shadow: 0 6px 16px rgba(40, 167, 69, 0.3);
}

/* Project Card Interactions */
.project-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
}

.project-card:hover .book-preview {
    background: linear-gradient(135deg, #f8f9fa 0%, #fff 100%);
}

.project-card:hover .project-status {
    transform: scale(1.05);
}

/* Navigation Enhancements */
.navbar {
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.nav-link {
    position: relative;
    overflow: hidden;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--pe-primary);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.book-preview-small img {
    filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.1));
}

/* Forms and Inputs */
.form-control, .form-select {
    border: 1px solid var(--pe-border);
    border-radius: 8px;
    padding: 0.75rem;
    transition: border-color 0.2s ease;
}

.form-control:focus, .form-select:focus {
    border-color: var(--pe-primary);
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
}

/* Upload Areas */
.upload-area {
    border: 2px dashed var(--pe-border);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    background: var(--pe-bg-light);
    transition: all 0.3s ease;
    cursor: pointer;
}

.upload-area:hover {
    border-color: var(--pe-primary);
    background: var(--pe-light-green);
}

.upload-area.dragover {
    border-color: var(--pe-primary);
    background: var(--pe-light-green);
}

/* Modal Styles */
.modal-content {
    border-radius: 16px;
    border: none;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.modal-header {
    border-bottom: 1px solid var(--pe-border);
    padding: 1.5rem;
}

.modal-body {
    padding: 2rem;
}

/* Dashboard Specific Styles */
.dashboard-header {
    background-color: rgba(17, 114, 73, 0.08);
    border: 1px solid rgba(17, 114, 73, 0.15);
    color: var(--pe-text-dark);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.credits-display {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.dashboard-header-actions {
    gap: 0.75rem;
}

.stat-pill {
    background: var(--pe-bg-white);
    border: 1px solid rgba(17, 114, 73, 0.15);
    border-radius: 12px;
    padding: 0.85rem 1.1rem;
    min-width: 170px;
    color: var(--pe-text-dark);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    box-shadow: 0 6px 18px rgba(17, 114, 73, 0.08);
}

.stat-pill-value {
    font-size: 1.4rem;
    font-weight: 600;
    line-height: 1;
    color: var(--pe-primary);
    flex-shrink: 0;
}

.stat-pill-label {
    font-size: 0.75rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-left: 0;
    color: var(--pe-text-muted);
    text-align: right;
    line-height: 1.1;
    flex: 1 1 auto;
}

@media (max-width: 767.98px) {
    .stat-pill {
        flex: 1 1 100%;
        min-width: auto;
        justify-content: space-between;
        gap: 0.5rem;
    }

    .stat-pill-label {
        text-align: right;
    }
}

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

.section-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--pe-text-dark);
    margin: 0;
}

.project-thumbnail {
    width: 100%;
    height: 200px;
    background: var(--pe-bg-light);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    overflow: hidden;
}

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

.project-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: var(--pe-text-muted);
}

.project-download-card {
    border: 1px solid rgba(21, 71, 52, 0.08);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    background: #fff;
}

.project-download-card.locked {
    opacity: 0.6;
}

.project-download-card.highlight {
    background: var(--pe-light-green);
    border-color: rgba(40, 167, 69, 0.35);
}

.project-download-card.highlight .download-meta h6 {
    color: var(--pe-primary-dark);
}

.project-download-card .download-meta {
    flex: 1;
}

.project-download-card .download-meta h6 {
    margin-bottom: 0.25rem;
    font-weight: 600;
    color: var(--pe-text-dark);
}

.project-download-card .download-meta p {
    margin-bottom: 0;
    font-size: 0.875rem;
    color: var(--pe-text-muted);
}

.project-download-card .download-note {
    margin-top: 0.35rem;
    color: var(--pe-primary-dark);
}

.project-download-card .download-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.project-name-edit-btn {
    line-height: 1;
}

.project-name-edit-btn:hover,
.project-name-edit-btn:focus {
    color: var(--pe-primary);
    text-decoration: none;
}

.project-gallery-tile {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: #f7f9f8;
    box-shadow: 0 4px 12px rgba(31, 77, 45, 0.08);
}

.project-gallery-tile img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

[data-project-detail="cover-list"] .ratio {
    min-height: 180px;
}

[data-project-detail="cover-list"] .ratio img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-gallery-tile .tile-caption {
    position: absolute;
    left: 0.75rem;
    bottom: 0.75rem;
    right: 0.75rem;
    padding: 0.4rem 0.6rem;
    border-radius: 10px;
    background: rgba(15, 65, 41, 0.85);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
}

.tips-card {
    background: rgba(17, 114, 73, 0.08);
    border: 1px solid rgba(17, 114, 73, 0.15);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.tips-card h4 {
    color: var(--pe-primary-dark);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    background: var(--pe-bg-light);
    border-radius: 16px;
    border: 2px dashed var(--pe-border);
}

.stats-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--pe-bg-white);
    border: 1px solid var(--pe-border);
    border-radius: 12px;
    padding: 1.5rem;
    flex: 1;
    text-align: center;
}

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

.stat-label {
    color: var(--pe-text-muted);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Enhanced Responsive Design - Mobile First Approach */

/* Extra Small devices (portrait phones, less than 576px) */
@media (max-width: 575.98px) {
    .container-fluid {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
    
    .navbar-brand {
        font-size: 1.1rem;
    }
    
    .nav-link {
        font-size: 0.9rem;
        padding: 0.375rem 0.75rem;
    }
    
    .hero-section {
        padding: 2rem 1rem;
        margin-bottom: 2rem;
        text-align: center;
    }
    
    .hero-section h1 {
        font-size: 1.75rem;
        line-height: 1.2;
    }
    
    .hero-section p {
        font-size: 0.95rem;
    }
    
    .hero-image {
        position: static;
        transform: none;
        margin: 1.5rem auto 0;
        display: block;
        width: 200px;
    }
    
    .quick-start-card {
        padding: 1.5rem;
        margin-bottom: 1rem;
    }
    
    .quick-start-card .icon {
        width: 40px;
        height: 40px;
        font-size: 1.25rem;
    }
    
    .stats-row {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
}

/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
    .hero-section {
        padding: 3rem 1.5rem;
        text-align: center;
    }
    
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .hero-image {
        position: static;
        transform: none;
        margin: 2rem auto 0;
        display: block;
        width: 250px;
    }
    
    .quick-start-card {
        padding: 1.5rem;
        margin-bottom: 1rem;
    }
    
    .stats-row {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
    .hero-section {
        padding: 3.5rem 2rem;
    }
    
    .hero-image {
        width: 300px;
    }
}

/* Large devices (desktops, 992px and up) - Default styles apply */
@media (min-width: 992px) {
    .hero-section {
        padding: 2rem 2rem;
    }
}

/* Enhanced Form Controls */
.form-control, .form-select {
    transition: all 0.3s ease;
    border: 1.5px solid var(--pe-border);
}

.form-control:focus, .form-select:focus {
    border-color: var(--pe-primary);
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.1);
    transform: translateY(-1px);
}

/* Loading States */
.loading-shimmer {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* Entrance Animations */
.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-left {
    animation: fadeInLeft 0.6s ease-out;
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.scale-in {
    animation: scaleIn 0.4s ease-out;
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Staggered animations for lists */
.stagger-animation > * {
    animation: fadeInUp 0.6s ease-out;
    animation-fill-mode: both;
}

.stagger-animation > *:nth-child(1) { animation-delay: 0.1s; }
.stagger-animation > *:nth-child(2) { animation-delay: 0.2s; }
.stagger-animation > *:nth-child(3) { animation-delay: 0.3s; }
.stagger-animation > *:nth-child(4) { animation-delay: 0.4s; }
.stagger-animation > *:nth-child(5) { animation-delay: 0.5s; }
.stagger-animation > *:nth-child(6) { animation-delay: 0.6s; }

/* Micro-interactions */
.btn-sm {
    transition: all 0.2s ease;
}

.btn-sm:hover {
    transform: scale(1.05);
}

.badge {
    transition: all 0.2s ease;
}

.badge:hover {
    transform: scale(1.1);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--pe-bg-light);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--pe-primary);
    border-radius: 4px;
    transition: all 0.2s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--pe-primary-dark);
}

/* Responsive Typography */
@media (max-width: 575.98px) {
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }
    h4 { font-size: 1.1rem; }
    h5 { font-size: 1rem; }
    h6 { font-size: 0.9rem; }
    
    .lead {
        font-size: 1rem;
    }
}

/* Accessibility Enhancements */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Focus Indicators */
.btn:focus, .form-control:focus, .form-select:focus {
    outline: 2px solid var(--pe-primary);
    outline-offset: 2px;
}

/* Utilities */
.text-green {
    color: var(--pe-primary) !important;
}

.bg-green {
    background-color: var(--pe-primary) !important;
}

.border-green {
    border-color: var(--pe-primary) !important;
}

.shadow-custom {
    box-shadow: 0 4px 12px var(--pe-shadow) !important;
}

/* Animation utility classes */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease-out;
}

.animate-on-scroll.animate {
    opacity: 1;
    transform: translateY(0);
}

.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(40, 167, 69, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(40, 167, 69, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(40, 167, 69, 0);
    }
}

/* Credits Modal */
#v2-user-credits {
    transition: box-shadow 0.2s ease;
}

#v2-user-credits:hover,
#v2-user-credits:focus {
    box-shadow: 0 0.5rem 1rem rgba(15, 31, 49, 0.08);
}

#v2-user-credits.credits-empty {
    color: var(--bs-gray-600);
    border-color: var(--bs-gray-300);
}

.credits-summary-card {
    background: linear-gradient(135deg, rgba(248, 249, 250, 0.9), rgba(255, 255, 255, 0.95));
    border: 1px solid rgba(108, 117, 125, 0.15);
}

.credits-summary-icon {
    width: 56px;
    height: 56px;
    background: rgba(255, 193, 7, 0.15);
    color: #e0a800;
    font-size: 1.5rem;
}

.credits-summary-status {
    background: rgba(25, 135, 84, 0.08);
    color: #146c43;
    border: 1px dashed rgba(25, 135, 84, 0.35);
}

.credits-summary-status.is-empty {
    background: rgba(255, 193, 7, 0.12);
    color: #8f6a04;
    border-color: rgba(255, 193, 7, 0.4);
}

.credits-summary-status.is-error {
    background: rgba(220, 53, 69, 0.14);
    color: #b02a37;
    border-color: rgba(220, 53, 69, 0.45);
}

.credit-pack-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.credit-pack-card {
    border: 1px solid rgba(108, 117, 125, 0.18);
    border-radius: 1rem;
    background-color: #fff;
    padding: 1.25rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.credit-pack-card:hover {
    border-color: rgba(25, 135, 84, 0.35);
    box-shadow: 0 0.75rem 1.25rem rgba(25, 135, 84, 0.1);
    transform: translateY(-2px);
}

.credit-pack-card.is-selected {
    border-color: var(--pe-primary, rgba(25, 135, 84, 1));
    box-shadow: 0 0.9rem 1.5rem rgba(25, 135, 84, 0.12);
}

.credit-pack-card.is-disabled {
    opacity: 0.6;
    pointer-events: none;
}

.credit-pack-amount {
    font-weight: 700;
    font-size: 1.2rem;
}

.credit-pack-price-amount {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--pe-primary, #198754);
}

.credit-pack-card .btn {
    font-weight: 600;
}

.credit-checkout-panel {
    background-color: #fff;
    border: 1px solid rgba(108, 117, 125, 0.18);
    border-radius: 1.25rem;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.credit-checkout-summary {
    border-bottom: 1px solid rgba(108, 117, 125, 0.18);
    padding-bottom: 1rem;
    margin-bottom: 1.25rem;
}

.credit-checkout-stripe {
    background-color: var(--pe-bg-light, #f8f9fa);
    border-radius: 1rem;
    padding: 1rem;
    margin-top: 1rem;
}

.credit-checkout-placeholder {
    padding: 2rem 1.5rem;
    border: 1px dashed rgba(108, 117, 125, 0.35);
    border-radius: 1rem;
    margin-bottom: 1.25rem;
}

.credit-checkout-placeholder .bi {
    font-size: 2.6rem;
}

.credit-checkout-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 120px;
    border: 1px dashed rgba(25, 135, 84, 0.3);
    border-radius: 1rem;
    background-color: rgba(25, 135, 84, 0.05);
    padding: 1.5rem;
}

.credit-checkout-loading .spinner-border {
    width: 2.5rem;
    height: 2.5rem;
}

/* Footer */
.v2-footer {
    border-top: 1px solid var(--pe-border);
    font-size: 0.95rem;
}

.v2-footer-nav .v2-footer-link {
    color: var(--pe-text-muted);
    font-size: 0.95rem;
    padding-top: 0;
    padding-bottom: 0;
}

.v2-footer-nav .v2-footer-link:hover,
.v2-footer-nav .v2-footer-link:focus {
    color: var(--pe-primary);
}

/* Sale popup modal */
.sale-popup-card {
    background-color: var(--pe-bg-white);
    border-radius: 24px;
    text-align: center;
}

.sale-popup-pill {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
}

.sale-popup-price-block {
    background-color: var(--pe-bg-light);
    border-radius: 20px;
    padding: 1.5rem;
    display: inline-block;
}

.sale-popup-price-amount {
    font-size: 2.75rem;
    font-weight: 700;
    color: var(--pe-primary);
    line-height: 1.2;
}

.sale-popup-offers {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    padding: 0;
    background-color: transparent;
}

.sale-popup-offer-row {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.75rem;
    padding: 1.25rem 1.5rem;
    border-radius: 18px;
    border: 1px solid var(--pe-border);
    background-color: var(--pe-bg-light);
    width: 100%;
    max-width: 260px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.sale-popup-offer-name {
    font-weight: 600;
    font-size: 1.05rem;
}

.sale-popup-offer-prices {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.95rem;
}

.sale-popup-offer-original {
    color: var(--pe-text-muted);
    text-decoration: line-through;
}

.sale-popup-offer-final {
    font-weight: 600;
    font-size: 1.1rem;
}

.sale-popup-offer-badge {
    background-color: var(--pe-primary);
    color: #fff;
    font-weight: 600;
    border-radius: 999px;
    padding: 0.25rem 0.85rem;
    font-size: 0.9rem;
}

@media (min-width: 768px) {
    .w-md-auto {
        width: auto !important;
    }
}

@media (max-width: 575.98px) {
    .sale-popup-price-block,
    .sale-popup-offers {
        width: 100%;
    }

    .sale-popup-offer-row {
        max-width: 100%;
    }
}

.v2-footer-social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--pe-bg-light);
    color: var(--pe-text-muted);
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.v2-footer-social-link:hover,
.v2-footer-social-link:focus {
    background-color: var(--pe-primary);
    color: #fff;
    transform: translateY(-2px);
}

.v2-footer-social-link i {
    font-size: 1.1rem;
}

@media (max-width: 575.98px) {
    .v2-footer-nav {
        flex-direction: column;
        gap: 0.25rem;
    }

    .v2-footer-nav .v2-footer-link {
        padding: 0;
    }

    .v2-footer-social-link {
        width: 32px;
        height: 32px;
    }
}
