* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

header {
    background-color: rgba(52, 73, 94, 0.95);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 1rem;
    transition: all 0.3s ease;
}

.net-worth-container {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.main-title {
    color: white;
    font-size: 2rem;
    margin-bottom: 0;
    transition: all 0.4s ease;
    opacity: 1;
    height: auto;
    transform: translateY(0);
}

.scroll-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    opacity: 0;
    height: 0;
    transform: translateY(-20px);
    transition: all 0.4s ease;
    pointer-events: none;
}

header.scrolled .scroll-content {
    opacity: 1;
    height: auto;
    transform: translateY(0);
    pointer-events: auto;
}

header.scrolled .main-title {
    opacity: 0;
    height: 0;
    transform: translateY(20px);
    margin: 0;
    overflow: hidden;
}

.scroll-worth {
    color: white;
    font-size: 1.2rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 2px;
}

.money-icon {
    width: 24px;
    height: 24px;
}

.remaining-text {
    margin-right: 1px;
}

#net-worth-amount {
    font-weight: 700;
    color: #2ecc71;
    margin: 0 1px;
}

.currency {
    margin-left: 1px;
}

.scroll-spent {
    color: white;
    font-size: 1.2rem;
    font-weight: 500;
}

.progress-container {
    margin-top: 1rem;
    padding: 0 1rem;
}

.progress-bar {
    width: 100%;
    height: 10px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 5px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    width: 100%;
    background: linear-gradient(to right, #27ae60, #2ecc71);
    transition: width 0.3s ease;
    border-radius: 5px;
}

.progress-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 0.3rem;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.8);
}

.progress-spent {
    color: rgba(255, 255, 255, 0.8);
}

.progress-remaining {
    color: #2ecc71;
}

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

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    padding: 1rem;
}

.product-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    position: relative;
}

/* LA Mega Mansion Card */
.product-card:nth-child(1) {
    background: linear-gradient(145deg, #ffffff, #f0f7ff);
    border: 1px solid #e1ecf7;
}

.product-card:nth-child(1) .product-info {
    background: linear-gradient(to bottom, rgba(255,255,255,0.9), rgba(240,247,255,0.9));
}

/* Modern Building Card */
.product-card:nth-child(2) {
    background: linear-gradient(145deg, #ffffff, #fff5f0);
    border: 1px solid #f7e8e1;
}

.product-card:nth-child(2) .product-info {
    background: linear-gradient(to bottom, rgba(255,255,255,0.9), rgba(255,245,240,0.9));
}

/* Sailboat Card */
.product-card:nth-child(3) {
    background: linear-gradient(145deg, #ffffff, #f0fff5);
    border: 1px solid #e1f7e8;
}

.product-card:nth-child(3) .product-info {
    background: linear-gradient(to bottom, rgba(255,255,255,0.9), rgba(240,255,245,0.9));
}

/* Mega Yacht Card */
.product-card:nth-child(4) {
    background: linear-gradient(145deg, #ffffff, #f5f0ff);
    border: 1px solid #e8e1f7;
}

.product-card:nth-child(4) .product-info {
    background: linear-gradient(to bottom, rgba(255,255,255,0.9), rgba(245,240,255,0.9));
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.1);
}

.product-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    
    transition: transform 0.3s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-info {
    padding: 1.5rem;
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    min-height: 180px;
}

.product-info h3 {
    font-size: 1.2rem;
    margin-bottom: 0.8rem;
    color: #2c3e50;
    font-weight: 600;
    line-height: 1.4;
    min-height: 2.8em;
}

.price {
    font-size: 1.3rem;
    font-weight: 700;
    color: #2ecc71;
    margin-bottom: 1.2rem;
    text-shadow: 1px 1px 1px rgba(0,0,0,0.1);
}

.product-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    margin-top: auto;
}

.btn-sell,
.btn-buy {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 80px;
    text-align: center;
}

.btn-sell {
    background-color: #ff6b6b;
    color: white;
}

.btn-buy {
    background-color: #51cf66;
    color: white;
}

.btn-sell:hover {
    background-color: #ff5252;
}

.btn-buy:hover {
    background-color: #40c057;
}

.btn-sell:disabled,
.btn-buy:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.quantity {
    font-size: 1.2rem;
    font-weight: 600;
    color: #666;
    min-width: 30px;
    text-align: center;
}

footer {
    background-color: #fff;
    padding: 2rem;
    text-align: center;
    margin-top: 2rem;
    border-top: 1px solid #eee;
}

footer p {
    color: #666;
}

@media (max-width: 768px) {
    .main-title {
        font-size: 1.5rem;
    }

    .scroll-content {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .scroll-worth, .scroll-spent {
        font-size: 1rem;
        text-align: center;
        justify-content: center;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 0.5rem;
    }
    
    .product-card {
        max-width: 400px;
        margin: 0 auto;
    }

    .progress-container {
        margin-top: 0.5rem;
    }

    .product-info {
        padding: 1rem;
        min-height: 160px;
    }

    .product-info h3 {
        font-size: 1.1rem;
        margin-bottom: 0.5rem;
    }

    .price {
        font-size: 1.1rem;
        margin-bottom: 1rem;
    }

    .product-actions {
        flex-wrap: wrap;
        justify-content: space-evenly;
    }

    .btn-sell, .btn-buy {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }

    .quantity-input-container {
        order: -1;
        width: 100%;
        margin-bottom: 0.5rem;
    }

    .quantity-input {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .container {
        margin: 1rem auto;
        padding: 0 0.5rem;
    }

    .main-title {
        font-size: 1.2rem;
    }

    .intro-section {
        padding: 1.5rem 0;
    }

    .intro-text {
        font-size: 1rem;
    }

    .intro-question {
        font-size: 1.3rem;
    }

    .product-card {
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }

    .product-image {
        height: 180px;
    }

    .receipt {
        padding: 1rem;
        margin: 0 0.5rem;
    }

    .receipt-header h3 {
        font-size: 1.2rem;
    }

    .download-btn {
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
        width: 100%;
    }

    .share-buttons {
        grid-template-columns: 1fr;
    }

    .share-btn {
        font-size: 0.9rem;
        padding: 0.7rem 1rem;
    }
}

.receipt-section {
    background-color: #fff;
    padding: 2rem 0;
    margin-top: 2rem;
    border-top: 1px solid #eee;
}

.receipt-section h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: #333;
}

.receipt {
    background-color: #fff;
    max-width: 600px;
    margin: 0 auto;
    padding: 2rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.receipt-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px dashed #eee;
}

.receipt-header h3 {
    margin-bottom: 0.5rem;
}

.receipt-date-container {
    margin-top: 1rem;
}

.receipt-date {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #666;
    font-size: 0.9rem;
}

.date-icon, .time-icon {
    width: 16px;
    height: 16px;
    opacity: 0.7;
}

.date-text, .time-text {
    display: inline-block;
}

.receipt-items {
    margin-bottom: 2rem;
}

.receipt-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
}

.receipt-item:last-child {
    border-bottom: none;
}

.receipt-item-name {
    flex: 1;
}

.receipt-item-quantity {
    margin: 0 1rem;
    color: #666;
}

.receipt-item-price {
    font-weight: 600;
    color: #2c3e50;
}

.receipt-total {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 2px dashed #eee;
    text-align: right;
    font-weight: 700;
    font-size: 1.1rem;
}

.download-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 2rem auto 0;
    padding: 0.9rem 2.2rem;
    background-color: #2ecc71;
    color: white;
    border: none;
    border-radius: 7px;
    font-weight: 500;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(46, 204, 113, 0.2);
}

.download-btn:hover {
    background-color: #27ae60;
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 4px 8px rgba(46, 204, 113, 0.3);
}

.download-btn:active {
    transform: translateY(0) scale(0.98);
}

.download-icon {
    width: 22px;
    height: 22px;
    transition: transform 0.3s ease;
}

.download-btn:hover .download-icon {
    transform: translateY(1px);
}

.spending-message {
    font-size: 1rem;
    color: #666;
    margin-top: 0.5rem;
    font-style: italic;
}

.intro-section {
    background-color: #f8f9fa;
    padding: 3rem 0;
    text-align: center;
    border-bottom: 1px solid #eee;
}

.intro-text {
    font-size: 1.2rem;
    color: #2c3e50;
    margin-bottom: 1.5rem;
    line-height: 1.8;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.highlight {
    color: #27ae60;
    font-weight: 700;
    font-size: 1.3rem;
}

.intro-question {
    font-size: 1.8rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 1rem;
}

.intro-note {
    font-size: 1.2rem;
    color: #666;
    font-style: italic;
}

@media (max-width: 768px) {
    .intro-section {
        padding: 2rem 0;
    }

    .intro-text {
        font-size: 1.1rem;
        padding: 0 1rem;
    }

    .intro-question {
        font-size: 1.5rem;
    }

    .intro-note {
        font-size: 1.1rem;
    }
}

.forbes-link {
    color: #2c3e50;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.forbes-link:hover {
    color: #2ecc71;
}

.current-year {
    font-weight: 500;
}

.custom-name-input {
    margin: 1rem 0;
}

.input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
    max-width: 300px;
    margin: 0 auto;
}

.name-input-icon {
    width: 24px;
    height: 24px;
    position: absolute;
    left: 10px;
    opacity: 0.7;
}

.name-input {
    padding: 0.5rem 1rem 0.5rem 40px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    width: 100%;
    text-align: left;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s ease;
}

.name-input:focus {
    outline: none;
    border-color: #2ecc71;
    box-shadow: 0 0 0 2px rgba(46, 204, 113, 0.1);
}

.name-input::placeholder {
    color: #999;
    transition: opacity 0.3s ease;
}

.name-input:focus::placeholder {
    opacity: 0;
}

.intro-image-container {
    text-align: center;
    margin-bottom: 2rem;
}

.intro-image-container img {
    max-width: 100%;
}

.receipt-coins-icon {
    width: 20px;
    height: 20px;
    vertical-align: middle;
    margin-right: 5px;
}

.receipt-header-icon {
    width: 24px;
    height: 24px;
    vertical-align: middle;
    margin-right: 8px;
}

.footer-link {
    color: #2ecc71;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-link:hover {
    color: #27ae60;
    text-decoration: underline;
}

.privacy-container {
    max-width: 800px;
    margin: 2rem auto;
    padding: 2rem;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.privacy-container h1 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 2rem;
}

.last-updated {
    color: #666;
    font-style: italic;
    margin-bottom: 2rem;
}

.policy-section {
    margin-bottom: 2rem;
}

.policy-section h2 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.policy-section p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.back-link {
    display: inline-block;
    color: #2ecc71;
    text-decoration: none;
    margin-bottom: 2rem;
    font-weight: 600;
    transition: all 0.3s ease;
    background-color: #fff;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    border: 2px solid #2ecc71;
    box-shadow: 0 2px 4px rgba(46, 204, 113, 0.1);
}

.back-link:hover {
    color: #fff;
    background-color: #2ecc71;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(46, 204, 113, 0.2);
}

.back-link:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(46, 204, 113, 0.1);
}

@media (max-width: 768px) {
    .privacy-container {
        margin: 1rem;
        padding: 1.5rem;
    }

    .privacy-container h1 {
        font-size: 1.75rem;
    }

    .policy-section h2 {
        font-size: 1.25rem;
    }
}

.total-spent {
    margin-top: 1rem;
    font-size: 1.3rem;
    color: #2c3e50;
    font-weight: 700;
}

.total-spent p {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
}

#total-spent-amount {
    color: #2ecc71;
}

.share-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-top: 2rem;
}

.share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    color: white;
    width: 100%;
    font-size: 1rem;
}

.share-btn img {
    width: 20px;
    height: 20px;
}

.print-btn {
    background-color: #6c757d;
}

.print-btn:hover {
    background-color: #5a6268;
}

.twitter-btn {
    background-color: #000;
}

.twitter-btn:hover {
    background-color: #333;
}

.facebook-btn {
    background-color: #1877f2;
}

.facebook-btn:hover {
    background-color: #1664d9;
}

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

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

@media (max-width: 600px) {
    .share-buttons {
        grid-template-columns: 1fr;
    }
}

.tip-section {
    background-color: #fff;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    text-align: center;
    border: 2px solid #2ecc71;
}

.tip-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 1.5rem;
    color: #2c3e50;
    font-size: 1.6rem;
    font-weight: 700;
}

.doge-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

.tip-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.tip-btn {
    padding: 0.8rem 1.5rem;
    border: 2px solid #2ecc71;
    border-radius: 6px;
    background-color: #fff;
    color: #2ecc71;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 100px;
    font-size: 1.1rem;
}

.tip-btn:hover {
    background-color: #2ecc71;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(46, 204, 113, 0.2);
}

.tip-btn.active {
    background-color: #2ecc71;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(46, 204, 113, 0.2);
}

.tip-amount {
    margin-top: 1rem;
    font-size: 1.1rem;
    color: #2c3e50;
}

.grand-total {
    margin-top: 1rem;
    font-size: 1.3rem;
    color: #2c3e50;
    font-weight: 700;
    border-top: 2px dashed #eee;
    padding-top: 1rem;
}

@media (max-width: 768px) {
    .tip-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .tip-btn {
        width: 100%;
        max-width: 200px;
    }
}

.doge-response-container {
    margin-top: 1rem;
    padding: 0.8rem;
    background-color: rgba(46, 204, 113, 0.1);
    border-radius: 6px;
    border: 1px solid #2ecc71;
}

.doge-message {
    color: #2c3e50;
    font-size: 1.1rem;
    margin: 0;
    text-align: center;
}

.quantity-input-container {
    position: relative;
    display: flex;
    align-items: center;
    background: white;
    border: 1px solid #ddd;
    border-radius: 6px;
    overflow: hidden;
}

.quantity-input {
    width: 60px;
    height: 40px;
    padding: 0.5rem;
    border: none;
    text-align: center;
    font-size: 1rem;
    font-weight: 600;
    color: #2c3e50;
    -moz-appearance: textfield;
}

.quantity-input::-webkit-outer-spin-button,
.quantity-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.quantity-controls {
    display: flex;
    flex-direction: column;
    border-left: 1px solid #ddd;
}

.quantity-up,
.quantity-down {
    border: none;
    background: #f8f9fa;
    color: #666;
    padding: 2px 6px;
    cursor: pointer;
    font-size: 8px;
    transition: all 0.2s ease;
}

.quantity-up:hover,
.quantity-down:hover {
    background: #e9ecef;
    color: #2c3e50;
}

.quantity-up {
    border-bottom: 1px solid #ddd;
}

/* FAQ Section Styles */
.faq-section {
    background-color: #f9f9f9;
    padding: 60px 0;
    margin-top: 50px;
}

.faq-title {
    text-align: center;
    color: #333;
    margin-bottom: 40px;
    font-size: 32px;
    font-weight: 700;
}

.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 16px;
    overflow: hidden;
}

.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.faq-question:hover {
    background-color: #f0f0f0;
}

.faq-question h3 {
    margin: 0;
    font-size: 18px;
    color: #333;
    font-weight: 600;
}

.faq-toggle {
    font-size: 24px;
    color: #2ecc71;
    transition: transform 0.3s ease;
}

.faq-item.active .faq-toggle {
    transform: rotate(45deg);
}

.faq-answer {
    padding: 0 20px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease, padding 0.5s ease;
}

.faq-item.active .faq-answer {
    padding: 0 20px 20px;
    max-height: 1000px;
}

.faq-answer p {
    margin: 0;
    line-height: 1.6;
    color: #666;
}

@media (max-width: 768px) {
    .faq-title {
        font-size: 28px;
    }
    
    .faq-question h3 {
        font-size: 16px;
    }
    
    .faq-answer p {
        font-size: 14px;
    }
}

/* Reset button styling */
.reset-btn {
    display: block;
    margin: 15px auto;
    padding: 10px 20px;
    background-color: #e74c3c;
    color: white;
    border: none;
    border-radius: 5px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.reset-btn:hover {
    background-color: #c0392b;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.reset-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 3px rgba(0,0,0,0.2);
}

@media (max-width: 768px) {
    .faq-title {
        font-size: 28px;
    }
    
    .faq-question h3 {
        font-size: 16px;
    }
    
    .faq-answer p {
        font-size: 14px;
    }
}

/* Sorting Section Styles */
.sorting-section {
    margin: 2rem 0;
    display: flex;
    justify-content: center;
    padding: 0 1rem;
}

.sorting-tabs {
    display: flex;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.sort-tab {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: #333;
    font-weight: 500;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.sort-tab::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #2ecc71;
    border-radius: 8px;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.3s ease;
    z-index: -1;
}

.sort-tab:hover::before {
    opacity: 0.1;
    transform: scale(1);
}

.sort-tab.active {
    color: #fff;
    background: #2ecc71;
    box-shadow: 0 2px 4px rgba(46, 204, 113, 0.2);
}

.sort-tab.active::before {
    opacity: 1;
    transform: scale(1);
}

@media (max-width: 768px) {
    .sorting-tabs {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem;
        width: 100%;
        max-width: 400px;
    }

    .sort-tab {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
        flex: 1 1 calc(50% - 0.5rem);
        text-align: center;
        min-width: 120px;
    }
}

@media (max-width: 480px) {
    .sort-tab {
        flex: 1 1 100%;
    }
}

/* Enhanced Responsive Styles */
/* Make all images responsive */
img {
    max-width: 100%;
    height: auto;
}

/* General responsive improvements */
@media (max-width: 1200px) {
    .container {
        max-width: 95%;
    }

    .products-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

@media (max-width: 992px) {
    .products-grid {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
        gap: 1.5rem;
    }

    .intro-image-container img {
        width: 200px;
        height: auto;
    }

    .receipt {
        max-width: 95%;
    }
}

@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .product-image {
        height: auto;
        max-height: 180px;
    }

    .product-card {
        width: 100%;
    }

    .faq-container {
        padding: 0 15px;
    }

    .receipt-section .container {
        padding: 0 10px;
    }

    .intro-text, .intro-question, .intro-note {
        padding: 0 15px;
    }
}

@media (max-width: 576px) {
    .products-grid {
        grid-template-columns: 1fr;
    }

    .product-image {
        height: auto;
        max-height: 200px;
    }

    .product-info {
        min-height: auto;
        padding: 1rem;
    }

    .product-actions {
        flex-direction: column;
        gap: 10px;
    }

    .btn-sell, .btn-buy {
        width: 100%;
    }

    .quantity-input-container {
        width: 100%;
    }

    .intro-section {
        padding: 1.5rem 10px;
    }

    .main-title {
        font-size: 1.2rem;
        padding: 0 10px;
    }

    .scroll-worth, .scroll-spent {
        font-size: 0.9rem;
    }

    .receipt-header {
        margin-bottom: 1rem;
    }

    .receipt-header h3 {
        font-size: 1.1rem;
    }

    .name-input {
        font-size: 0.9rem;
    }

    .receipt-item {
        flex-direction: column;
        align-items: flex-start;
        padding: 10px 0;
    }

    .receipt-item-quantity, .receipt-item-price {
        margin-top: 5px;
    }

    .total-spent, .tip-amount, .grand-total {
        font-size: 1.1rem;
    }

    .download-btn, .share-btn {
        font-size: 0.9rem;
        padding: 10px;
    }

    .faq-question h3 {
        font-size: 0.95rem;
    }

    .faq-answer p {
        font-size: 0.9rem;
    }

    .tip-title {
        font-size: 1.3rem;
    }

    .tip-btn {
        font-size: 0.9rem;
        padding: 8px 12px;
    }

    .doge-message {
        font-size: 0.9rem;
    }
}

/* Fix for small mobile devices */
@media (max-width: 375px) {
    .product-card {
        margin: 0 auto;
        width: 100%;
    }

    .product-info h3 {
        font-size: 1rem;
        min-height: auto;
    }

    .price {
        font-size: 1rem;
    }

    .sorting-tabs {
        flex-direction: column;
        width: 100%;
    }

    .sort-tab {
        width: 100%;
    }

    .receipt {
        padding: 1rem;
    }

    header {
        padding: 0.8rem 0.5rem;
    }

    .progress-container {
        padding: 0 0.5rem;
    }

    .progress-labels {
        font-size: 0.7rem;
    }

    footer p {
        font-size: 0.8rem;
    }
}

/* High resolution device optimization */
@media (min-width: 1920px) {
    .container {
        max-width: 1400px;
    }

    .products-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Fix for iPad and similar tablets */
@media only screen and (min-device-width: 768px) and (max-device-width: 1024px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .product-image {
        height: 180px;
    }
    
    .product-info {
        min-height: 180px;
    }
}

/* Ensure all product images maintain aspect ratio */
.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Responsive layout for quantity controls */
@media (max-width: 768px) {
    .product-actions {
        flex-wrap: wrap;
        gap: 8px;
    }

    .quantity-input-container {
        order: 2;
        flex-basis: 100%;
        margin: 5px 0;
    }
    
    .btn-sell {
        order: 1;
        flex-basis: 48%;
    }
    
    .btn-buy {
        order: 3;
        flex-basis: 48%;
    }
}

/* Responsive header transition improvements */
@media (max-width: 576px) {
    header.scrolled .scroll-content {
        flex-direction: column;
        gap: 5px;
    }
    
    .scroll-worth, .scroll-spent {
        width: 100%;
        justify-content: center;
    }
}

/* Mobile product card improvements */
@media (max-width: 767px) {
    /* Fix for quantity input container alignment */
    .product-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto auto;
        gap: 10px;
        width: 100%;
        margin-top: 15px;
    }
    
    .quantity-input-container {
        grid-column: 1 / span 2;
        grid-row: 1;
        width: 100%;
        max-width: 150px;
        margin: 0 auto 10px;
        height: 42px;
    }
    
    .btn-sell {
        grid-column: 1;
        grid-row: 2;
        width: 100%;
    }
    
    .btn-buy {
        grid-column: 2;
        grid-row: 2;
        width: 100%;
    }
    
    /* Make quantity input more touch-friendly */
    .quantity-input {
        width: calc(100% - 30px);
        height: 42px;
        font-size: 16px;
    }
    
    .quantity-controls {
        width: 30px;
    }
    
    .quantity-up,
    .quantity-down {
        height: 21px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 12px;
    }
    
    /* Fix for screenshots showing off-center inputs */
    .product-info {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .product-info h3 {
        text-align: center;
        min-height: auto;
        margin-bottom: 10px;
    }
    
    .price {
        margin-bottom: 10px;
    }
}

/* Specific fixes for the input styles seen in screenshots */
@media (max-width: 480px) {
    .product-actions {
        width: 100%;
    }
    
    .quantity-input-container {
        max-width: 120px;
    }
    
    .btn-sell, .btn-buy {
        padding: 10px 0;
        font-size: 16px;
    }
}
