body {
    font-family: Arial, sans-serif;
    max-width: 350px;
    margin: 40px auto;
    padding: 15px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}
@media (max-width: 480px) {
    body { margin: 15px auto; padding: 8px; }
}
.container {
    background: white;
    padding: 15px;
    border-radius: 12px;
    box-shadow: 0 6px 24px rgba(0,0,0,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    min-height: 350px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
@media (max-width: 480px) {
    .container { padding: 12px; min-height: auto; }
}
p { text-align: center; color: #666; margin-bottom: 8px; }
.instruction { font-size: 12px; margin-bottom: 15px; }
form { display: flex; flex-direction: column; gap: 12px; flex-grow: 1; }
input { 
    padding: 10px; 
    font-size: 14px; 
    border: 2px solid #ddd; 
    border-radius: 6px; 
    box-sizing: border-box; 
    width: 100%; 
    transition: border-color 0.3s;
}
input:focus { border-color: #007bff; outline: none; }
@media (max-width: 480px) {
    input { font-size: 14px; padding: 10px; }
}
.amount-buttons { display: flex; flex-direction: column; gap: 8px; justify-content: center; margin-top: 8px; }
.amount-row { display: flex; gap: 8px; justify-content: center; width: 100%; flex-wrap: wrap; }
.amount-btn { 
    padding: 6px 10px; 
    background: #e9ecef; 
    color: #495057; 
    border: none; 
    border-radius: 15px; 
    cursor: pointer; 
    font-size: 12px; 
    font-weight: bold; 
    flex: 1 0 auto; 
    min-width: 60px; 
    transition: background 0.3s, color 0.3s;
}
.amount-btn:hover { background: #dee2e6; }
@media (max-width: 480px) {
    .amount-btn { padding: 8px 12px; font-size: 12px; }
}
.amount-btn.active { background: #007bff; color: white; }
button {
    padding: 10px;
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    border: none;
    cursor: pointer;
    border-radius: 6px;
    font-weight: bold;
    font-size: 14px;
    transition: opacity 0.3s;
}
button:hover { opacity: 0.9; }
@media (max-width: 480px) {
    button { padding: 10px; font-size: 14px; }
}
.error { color: #dc3545; display: none; text-align: center; margin-top: 4px; }
.success { color: #28a745; text-align: center; margin: 8px 0; display: none; font-weight: bold; }
.qr-container { display: none; text-align: center; margin-top: 12px; flex-grow: 1; display: flex; flex-direction: column; justify-content: center; align-items: center; }
.qr-card {
    border-radius: 12px;
    margin: 8px auto;
    position: relative;
    width: 100%;
    max-width: 220px;
    height: auto;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
@media (max-width: 480px) {
    .qr-card { height: auto; max-width: 100%; }
}
.qr-header {
    background: linear-gradient(135deg, #ff0000, #cc0000);
    color: white;
    padding: 6px 10px;
    border-radius: 10px 10px 0 0;
    text-align: center;
    font-weight: bold;
    font-size: 12px;
    margin: 0;
}
@media (max-width: 480px) {
    .qr-header { font-size: 11px; padding: 5px 9px; }
}
.qr-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 9px;
    border-bottom: 1px solid #eee;
    background: #f8f9fa;
    border-radius: 0;
    margin-bottom: 0;
}
.qr-name { font-size: 11px; font-weight: bold; color: #333; }
.qr-amount { font-size: 12px; font-weight: bold; color: #007bff; }
@media (max-width: 480px) {
    .qr-name { font-size: 10px; }
    .qr-amount { font-size: 11px; }
}
.qr-divider { height: 1px; background: linear-gradient(to right, #eee, #ff0000, #eee); margin: 3px 0; border-radius: 1px; }
.qr-image { padding: 12px; display: flex; justify-content: center; align-items: center; flex-grow: 1; }
img { width: 140px; height: 140px; object-fit: contain; border: none; }
@media (max-width: 480px) {
    img { width: 120px; height: 120px; }
}
.warning { color: #fd7e14; margin: 5px 0; font-style: italic; font-size: 11px; }
.scan-instruction { 
    font-size: 11px; 
    color: #28a745; 
    margin: 3px 0; 
    font-weight: bold; 
    text-align: center;
    background: #e8f4f0;
    padding: 5px;
    border-radius: 5px;
    border: 1px solid #28a745;
}
@media (max-width: 480px) {
    .scan-instruction { font-size: 10px; }
}
.status-pending { color: #007bff; font-style: italic; margin: 3px 0; font-weight: bold; font-size: 10px; }
.status-checking {
    color: #007bff;
    font-style: italic;
    margin: 3px 0;
    font-weight: bold;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}
.status-paid { color: #28a745; font-weight: bold; margin: 3px 0; font-size: 10px; }
.status-expired { color: #dc3545; font-weight: bold; margin: 3px 0; font-size: 10px; }
.countdown {
    color: #007bff;
    font-weight: bold;
    font-size: 11px;
    margin: 3px 0;
    text-align: center;
    background: #e7f3ff;
    padding: 5px;
    border-radius: 5px;
    border: 1px solid #b3d9ff;
}
.countdown.expired {
    color: #dc3545;
    background: #ffe6e6;
    border-color: #ff9999;
}
.expired-message {
    color: #dc3545;
    font-weight: bold;
    font-size: 11px;
    margin: 8px 0;
    text-align: center;
    display: none;
}
.new-payment-btn {
    background: linear-gradient(135deg, #28a745, #20c997);
    margin-top: 6px;
    display: none;
    padding: 8px;
    font-size: 12px;
}
.new-payment-btn.visible {
    display: block;
}
.checking-dots {
    display: inline-block;
    animation: dots 1.5s infinite;
}
@keyframes dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}
.form-container { display: block; flex-grow: 1; }
.results-container { display: none; flex-grow: 1; justify-content: center; align-items: center; }
.animate-checking::after {
    content: '';
    display: inline-block;
    width: 10px;
    height: 10px;
    border: 2px solid #007bff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
    margin-left: 6px;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}