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

body {
    font-family: 'Inter', sans-serif;
    background: #0a0a0a;
    color: #ffffff;
    overflow-x: hidden;
    min-height: 100vh;
}

#particles-js {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 0;
}

.container {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    text-align: center;
}

.donation-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 48px;
    max-width: 480px;
    width: 100%;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
    animation: fadeInUp 0.8s ease-out;
    margin: 0 auto;
}

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

.header {
    text-align: center;
    margin-bottom: 40px;
}

.icon-wrapper {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.header h1 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.current-datetime {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 8px;
    font-weight: 400;
    letter-spacing: 0.3px;
}

.header p.swipe-instruction {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 8px;
    font-weight: 400;
    letter-spacing: 0.5px;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.header p.swipe-instruction:hover {
    opacity: 1;
}

/* Carousel Styles */
.carousel-container {
    position: relative;
    overflow: hidden;
    margin-bottom: 0;
    margin: 0 auto;
}

.carousel-wrapper {
    display: flex;
    transition: transform 0.3s ease-out;
    touch-action: pan-y;
}

.medication-slide {
    position: relative;
    min-width: 100%;
    padding: 30px;
    background: #ffffff;
    border-radius: 24px;
    border: 2px solid #e0e6ed;
    text-align: center;
    -webkit-user-select: none;
    user-select: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.medication-slide:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.12);
    border-color: #667eea;
}

.medication-slide.selected {
    background: #ffffff !important;
    border: 2px solid #e0e6ed !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08) !important;
    transform: none !important;
}

.medication-slide.selected::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    border-radius: 24px;
    z-index: -1;
}

.add-medication-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(102, 126, 234, 0.1);
    border: 2px solid rgba(102, 126, 234, 0.3);
    color: #667eea;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0.8;
    z-index: 10;
    font-size: 0;
}

.add-medication-btn:hover {
    background: rgba(102, 126, 234, 0.2);
    border-color: #667eea;
    opacity: 1;
    transform: scale(1.15);
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.3);
}

.add-medication-btn.added {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    border-color: #4CAF50;
    color: white;
    opacity: 1;
    animation: bounceIn 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 0 4px 16px rgba(76, 175, 80, 0.4);
}

@keyframes bounceIn {
    0% {
        transform: scale(0.3);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    70% {
        transform: scale(0.95);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.add-medication-btn svg {
    width: 24px;
    height: 24px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.add-medication-btn.added svg {
    transform: rotate(180deg);
}

.medication-image {
    width: 220px;
    height: 220px;
    object-fit: contain;
    margin: 0 auto 24px;
    border-radius: 16px;
    background: #ffffff;
    padding: 15px;
    cursor: zoom-in;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid #f0f2f5;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
}

.medication-image:hover {
    transform: scale(1.08);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border-color: #667eea;
}

.medication-name {
    font-size: 22px;
    margin-bottom: 8px;
    font-weight: 700;
    color: #2d3748;
    line-height: 1.3;
}

.medication-details {
    font-size: 16px;
    color: #718096;
    margin-bottom: 12px;
    font-weight: 500;
}

.medication-price {
    font-size: 28px;
    font-weight: 800;
    color: #667eea;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(102, 126, 234, 0.2);
}

.medication-description {
    font-size: 14px;
    color: #4a5568;
    margin-bottom: 20px;
    line-height: 1.6;
    max-height: 48px;
    overflow: hidden;
}

.dosage-info {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.badge {
    background: rgba(102, 126, 234, 0.2);
    color: #667eea;
    padding: 4px 8px;
    border-radius: 16px;
    font-size: 10px;
    font-weight: 500;
}

.badge:first-child {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
    color: white;
}

.carousel-indicators {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
}

.indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
}

.indicator.active {
    background: #667eea;
    transform: scale(1.2);
}

.swipe-hint {
    display: none;
}

@keyframes fadeInOut {
    0%,
    100% {
        opacity: 0.6;
    }
    50% {
        opacity: 1;
    }
}

.medication-info {
    text-align: center;
    margin-bottom: 40px;
    padding: 30px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.pill-icon {
    margin: 0 auto 20px;
    color: #667eea;
}

.medication-info h2 {
    font-size: 20px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 8px;
    font-weight: 400;
}

.medication-info h3 {
    font-size: 28px;
    margin-bottom: 8px;
    font-weight: 600;
}

.medication-info p {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 20px;
}

.dosage-info {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
}

.badge {
    background: rgba(102, 126, 234, 0.2);
    color: #667eea;
    padding: 4px 8px;
    border-radius: 16px;
    font-size: 10px;
    font-weight: 500;
}

.cta-section {
    margin-bottom: 32px;
    text-align: center;
}

.description {
    text-align: center;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
    margin-bottom: 32px;
}

.donate-btn {
    width: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 16px 32px;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.donate-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.donate-btn:hover::before {
    left: 100%;
}

.donate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}

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

.custom-donate-btn {
    width: 100%;
    background: transparent;
    color: #667eea;
    border: 2px solid #667eea;
    padding: 16px 32px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
    margin-top: 16px;
}

.custom-donate-btn:hover {
    background: rgba(102, 126, 234, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.2);
}

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

.custom-donate-btn svg {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

#custom-amount-section {
    animation: fadeIn 0.3s ease;
}

#custom-amount {
    margin-bottom: 16px;
}

#custom-paypal-btn {
    margin-top: 0;
}

.footer {
    text-align: center;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
}

.price-info {
    margin-top: 15px;
    text-align: center;
}

.price {
    font-size: 24px;
    font-weight: 600;
    color: #667eea;
    margin-bottom: 5px;
}

.availability {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
}

.loading {
    text-align: center;
    padding: 20px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(102, 126, 234, 0.3);
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

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

.loading p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
}

/* PayPal button container */
#paypal-button-container {
    margin: 20px 0;
    min-height: 45px;
}

/* Donation form inputs */
.donor-input {
    width: 100%;
    padding: 12px 16px;
    margin: 10px 0;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: white;
    font-size: 16px;
    transition: all 0.3s ease;
    text-align: center;
}

.donor-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.donor-input:focus {
    outline: none;
    border-color: #667eea;
    background: rgba(255, 255, 255, 0.15);
}

/* Donations table section */
.donations-table-section {
    margin-top: 40px;
    padding-top: 32px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.donations-table-section h3 {
    text-align: center;
    margin-bottom: 24px;
    font-size: 20px;
    color: rgba(255, 255, 255, 0.9);
}

.table-container {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
    margin: 0 auto;
}

#donations-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0 auto;
}

#donations-table th {
    background: rgba(102, 126, 234, 0.2);
    padding: 12px;
    text-align: center;
    font-weight: 600;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
}

#donations-table td {
    padding: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    text-align: center;
}

#donations-table tr:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* Success message */
.success-message {
    background: rgba(76, 175, 80, 0.2);
    border: 1px solid rgba(76, 175, 80, 0.4);
    color: #4CAF50;
    padding: 16px;
    border-radius: 8px;
    margin: 20px 0;
    text-align: center;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    animation: fadeIn 0.3s ease;
}

.modal-content {
    position: relative;
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 90%;
    top: 50%;
    transform: translateY(-50%);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 40px;
    color: #ffffff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1001;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.close-modal:hover {
    color: #667eea;
    transform: scale(1.1);
}

.close-modal:active {
    transform: scale(0.9);
}

#modal-image {
    width: 100%;
    height: auto;
    display: block;
    background: white;
    padding: 20px;
    border-radius: 16px;
}

/* Selected Products Modal - New inline positioning */
.selected-products-inline {
    position: relative !important;
    display: none;
    background: none !important;
    backdrop-filter: none !important;
    z-index: 10;
    margin-top: 20px;
    text-align: center;
    left: 0 !important;
    top: 0 !important;
    transform: none !important;
    width: 100% !important;
    height: auto !important;
}

.selected-products-inline .modal-content {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    transform: none !important;
    margin: 0 auto;
    max-width: 100%;
    width: 100%;
    max-height: 400px;
    animation: slideDown 0.3s ease;
    display: inline-block;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Shopping Cart Styles */
#cart-controls {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 24px;
    animation: fadeIn 0.3s ease;
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.cart-header h3 {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
}

.clear-cart-btn {
    background: rgba(220, 53, 69, 0.2);
    border: 1px solid rgba(220, 53, 69, 0.3);
    color: #dc3545;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
}

.clear-cart-btn:hover {
    background: rgba(220, 53, 69, 0.3);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.2);
}

.cart-items {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
}

.cart-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.cart-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(102, 126, 234, 0.3);
}

.cart-item-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cart-item-image {
    width: 50px;
    height: 50px;
    object-fit: contain;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    padding: 4px;
}

.cart-item-details {
    display: flex;
    flex-direction: column;
}

.cart-item-name {
    font-size: 14px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2px;
}

.cart-item-price {
    font-size: 12px;
    color: #667eea;
    font-weight: 600;
}

.cart-item-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.quantity-btn {
    width: 28px;
    height: 28px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.8);
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.quantity-btn:hover {
    background: rgba(102, 126, 234, 0.2);
    border-color: #667eea;
    color: #667eea;
}

.quantity {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
    min-width: 20px;
    text-align: center;
}

.remove-btn {
    background: rgba(220, 53, 69, 0.2);
    border: 1px solid rgba(220, 53, 69, 0.3);
    color: #dc3545;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.remove-btn:hover {
    background: rgba(220, 53, 69, 0.3);
    transform: scale(1.1);
}

.cart-total {
    text-align: right;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.cart-total span {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
}

#cart-total-amount {
    color: #667eea;
    font-weight: 700;
    font-size: 20px;
}

/* Add button styles */
.add-medication-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(102, 126, 234, 0.1);
    border: 2px solid rgba(102, 126, 234, 0.3);
    color: #667eea;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0.8;
    z-index: 10;
    font-size: 0;
}

.add-medication-btn:hover {
    background: rgba(102, 126, 234, 0.2);
    border-color: #667eea;
    opacity: 1;
    transform: scale(1.15);
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.3);
}

.add-medication-btn.added {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    border-color: #4CAF50;
    color: white;
    opacity: 1;
    animation: bounceIn 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 0 4px 16px rgba(76, 175, 80, 0.4);
}

@keyframes bounceIn {
    0% {
        transform: scale(0.3);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    70% {
        transform: scale(0.95);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.add-medication-btn svg {
    width: 24px;
    height: 24px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.add-medication-btn.added svg {
    transform: rotate(180deg);
}

/* Responsive design for cart */
@media (max-width: 480px) {
    .cart-item {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }

    .cart-item-info {
        flex-direction: column;
        text-align: center;
    }

    .cart-item-controls {
        justify-content: center;
    }

    .cart-header {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
}

/* Responsive design */
@media (max-width: 480px) {
    .modal-header {
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }

    .selected-products-container {
        padding: 12px 20px;
    }

    .selected-product-item {
        flex-direction: column;
        text-align: center;
        gap: 16px;
        padding: 16px;
    }

    .selected-product-image {
        width: 100px;
        height: 100px;
    }

    .modal-footer {
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }

    .donate-selected-now-btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .donation-card {
        padding: 32px 24px;
        margin: 0 auto;
    }

    .header h1 {
        font-size: 28px;
    }

    .medication-info h3 {
        font-size: 24px;
    }
}

.donation-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
    justify-content: center;
}

.donation-option-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.8);
    padding: 20px 16px;
    border-radius: 16px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: all 0.3s ease;
    min-height: 100px;
    position: relative;
    overflow: hidden;
    text-align: center;
}

.donation-option-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.1), transparent);
    transition: left 0.5s;
}

.donation-option-btn:hover::before {
    left: 100%;
}

.donation-option-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(102, 126, 234, 0.6);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.2);
}

.donation-option-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: transparent;
    color: white;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
    transform: translateY(-2px);
}

.donation-option-btn.active svg {
    animation: pulse 2s infinite;
}

.donation-option-btn svg {
    width: 32px;
    height: 32px;
    transition: all 0.3s ease;
}

.donation-option-btn span {
    text-align: center;
    line-height: 1.3;
}

/* Responsive design for smaller screens */
@media (max-width: 480px) {
    .donation-options {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
        justify-content: center;
    }

    .donation-option-btn {
        padding: 16px 12px;
        min-height: 80px;
        font-size: 13px;
    }

    .donation-option-btn svg {
        width: 28px;
        height: 28px;
    }
}

.total-donation-info {
    text-align: center;
    margin-bottom: 24px;
    padding: 24px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.total-donation-info h4 {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 8px;
}

.total-amount {
    font-size: 36px;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 8px;
}

.total-description {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
}

#individual-donation-section,
#total-donation-section {
    animation: fadeIn 0.3s ease;
    text-align: center;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Floating counter */
#floating-counter {
    position: fixed;
    bottom: 20px;
    left: 50% !important;
    transform: translateX(-50%) !important;
    right: auto !important;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(102, 126, 234, 0.3);
    border-radius: 50px;
    padding: 16px 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    animation: slideUp 0.3s ease;
}

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

.counter-content {
    display: flex;
    align-items: center;
    gap: 16px;
}

.counter-text {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    font-weight: 500;
}

#selected-count {
    color: #667eea;
    font-weight: 700;
}

.donate-selected-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    margin: 0 auto;
}

.donate-selected-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}

/* Mobile cart optimization - single line per medication */
@media (max-width: 768px) {
    .cart-item {
        display: grid;
        grid-template-columns: auto 1fr auto;
        grid-template-rows: auto;
        gap: 12px;
        align-items: center;
        padding: 12px 16px;
        margin-bottom: 8px;
        background: rgba(255, 255, 255, 0.03);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 12px;
        transition: all 0.2s ease;
    }

    .cart-item:hover {
        background: rgba(255, 255, 255, 0.05);
        border-color: rgba(102, 126, 234, 0.3);
    }

    .cart-item-info {
        display: contents;
        flex-direction: row;
        align-items: center;
        gap: 0;
    }

    .cart-item-image {
        width: 40px;
        height: 40px;
        grid-column: 1;
        grid-row: 1;
        padding: 2px;
        border-radius: 8px;
        background: rgba(255, 255, 255, 0.05);
        border: 1px solid rgba(255, 255, 255, 0.1);
    }

    .cart-item-details {
        grid-column: 2;
        grid-row: 1;
        display: flex;
        flex-direction: column;
        justify-content: center;
        min-width: 0;
    }

    .cart-item-name {
        font-size: 13px;
        font-weight: 600;
        color: rgba(255, 255, 255, 0.9);
        margin-bottom: 2px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        line-height: 1.3;
    }

    .cart-item-price {
        font-size: 11px;
        color: #667eea;
        font-weight: 500;
        white-space: nowrap;
    }

    .cart-item-controls {
        grid-column: 3;
        grid-row: 1;
        display: flex;
        align-items: center;
        gap: 6px;
        justify-content: flex-end;
    }

    .quantity-btn {
        width: 24px;
        height: 24px;
        font-size: 14px;
        border-radius: 6px;
        padding: 0;
        min-width: 24px;
    }

    .quantity {
        font-size: 12px;
        min-width: 16px;
        font-weight: 500;
    }

    .remove-btn {
        width: 24px;
        height: 24px;
        font-size: 16px;
        border-radius: 6px;
        padding: 0;
        min-width: 24px;
        margin-left: 4px;
    }

    .cart-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 12px;
        padding-bottom: 8px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .cart-header h3 {
        font-size: 16px;
        font-weight: 600;
        color: rgba(255, 255, 255, 0.9);
        margin: 0;
    }

    .clear-cart-btn {
        padding: 8px 12px;
        font-size: 12px;
        gap: 4px;
        border-radius: 6px;
        font-weight: 500;
    }

    .clear-cart-btn svg {
        width: 16px;
        height: 16px;
    }

    .cart-total {
        padding-top: 12px;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        text-align: right;
    }

    .cart-total span {
        font-size: 14px;
        color: rgba(255, 255, 255, 0.8);
    }

    #cart-total-amount {
        font-size: 16px;
        font-weight: 700;
    }

    #cart-controls {
        padding: 16px;
        margin-bottom: 20px;
        border-radius: 12px;
    }

    .cart-items {
        gap: 8px;
        margin-bottom: 12px;
        max-height: 200px;
        overflow-y: auto;
        padding-right: 4px;
    }

    .cart-items::-webkit-scrollbar {
        width: 4px;
    }

    .cart-items::-webkit-scrollbar-track {
        background: rgba(255, 255, 255, 0.05);
        border-radius: 2px;
    }

    .cart-items::-webkit-scrollbar-thumb {
        background: rgba(102, 126, 234, 0.3);
        border-radius: 2px;
    }

    .cart-items::-webkit-scrollbar-thumb:hover {
        background: rgba(102, 126, 234, 0.5);
    }
}

/* Ultra-small mobile screens */
@media (max-width: 360px) {
    .cart-item {
        grid-template-columns: auto 1fr auto;
        gap: 8px;
        padding: 10px 12px;
    }

    .cart-item-image {
        width: 36px;
        height: 36px;
    }

    .cart-item-name {
        font-size: 12px;
    }

    .cart-item-price {
        font-size: 10px;
    }

    .quantity-btn, .remove-btn {
        width: 22px;
        height: 22px;
        font-size: 12px;
        min-width: 22px;
    }

    .quantity {
        font-size: 11px;
        min-width: 14px;
    }
}

.donation-amount-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin: 20px 0;
}

.donation-amount-grid .amount-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.8);
    padding: 16px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.donation-amount-grid .amount-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(102, 126, 234, 0.6);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.2);
}

.donation-amount-grid .amount-btn.selected {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: transparent;
    color: white;
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
    transform: translateY(-2px);
}

@media (max-width: 480px) {
    .donation-amount-grid {
        gap: 8px;
        margin: 16px 0;
    }
    
    .donation-amount-grid .amount-btn {
        padding: 12px 8px;
        font-size: 14px;
        min-height: 50px;
        border-radius: 10px;
    }
}

@media (max-width: 360px) {
    .donation-amount-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
    }
    
    .donation-amount-grid .amount-btn {
        padding: 10px 6px;
        font-size: 13px;
        min-height: 45px;
    }
}