/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #f0f2f5, #dfe4ea);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 1rem;
    color: #1e293b;
    line-height: 1.6;
}

/* Container */
.container {
    max-width: 36rem;
    width: 100%;
    background: #ffffff;
    border-radius: 1.25rem;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
    padding: 2.5rem;
    margin: 1.5rem auto;
    animation: slideUp 0.6s ease-out;
}

/* Headings */
h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 1.5rem;
    text-align: center;
}

/* QR Code */
.qr-code {
    width: 100%;
    max-width: 14rem;
    border-radius: 0.75rem;
    border: 1px solid #e2e8f0;
    padding: 0.5rem;
    background: #f8fafc;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: block;
    margin: 0 auto 1rem;
}

.qr-code:hover {
    transform: scale(1.03);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Buttons */
.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 1.5rem;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    gap: 0.5rem;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

/* Inputs */
input,
input[type="file"] {
    width: 100%;
    padding: 0.875rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 1rem;
    color: #1e293b;
    background: #f9fafb;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus,
input[type="file"]:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

input::placeholder {
    color: #94a3b8;
}

/* Labels */
label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
}

/* Hidden Elements */
.hidden {
    display: none;
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    background: #1e293b;
    color: #ffffff;
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    animation: fadeIn 0.4s ease-in-out, fadeOut 0.4s ease-in-out 2.6s forwards;
}

/* Payment and Status Boxes */
.payment-box,
.status-box {
    background: #f8fafc;
    padding: 1.5rem;
    border-radius: 0.75rem;
    margin-bottom: 1.5rem;
    border: 1px solid #e2e8f0;
}

/* Timer Container */
#timer-container {
    font-size: 1rem;
    font-weight: 500;
    color: #475569;
    text-align: center;
    margin-top: 1rem;
}

/* Retry Button */
#retry-button {
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

#retry-button:hover {
    background-color: #d97706;
}

/* Spinner */
.spinner {
    border: 4px solid #e5e7eb;
    border-top: 4px solid #2563eb;
    border-radius: 50%;
    width: 1.5rem;
    height: 1.5rem;
    animation: spin 0.8s linear infinite;
    display: inline-block;
    margin-left: 0.75rem;
}

/* Loader */
#loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

#loader img {
    width: 3rem;
    height: 3rem;
}

/* Status Message */
#status-message {
    font-size: 1rem;
    font-weight: 500;
    text-align: center;
    margin-top: 1rem;
}

/* Color Classes */
.text-gray-600 {
    color: #475569;
}

.text-gray-700 {
    color: #374151;
}

.text-gray-800 {
    color: #1e293b;
}

.bg-gray-50 {
    background-color: #f8fafc;
}

.bg-green-500 {
    background-color: #22c55e;
}

.bg-blue {
    background-color: #2563eb;
}

.bg-purple {
    background-color: #9333ea;
}

.bg-yellow {
    background-color: #eab308;
}

.text-white {
    color: #ffffff;
}

/* Animations */
@keyframes slideUp {
    from {
        transform: translateY(1.5rem);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(0.5rem);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Responsive Design */
@media (max-width: 640px) {
    .container {
        padding: 1.5rem;
        margin: 0.5rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    .qr-code {
        max-width: 12rem;
    }

    .btn {
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
    }

    input,
    input[type="file"] {
        padding: 0.75rem;
        font-size: 0.875rem;
    }

    .payment-box,
    .status-box {
        padding: 1rem;
    }
}

@media (min-width: 1024px) {
    .container {
        max-width: 40rem;
        padding: 3rem;
    }

    .qr-code {
        max-width: 16rem;
    }
}