* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background: linear-gradient(135deg, #e8f5f0, #d5f0dd);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 20px;
    position: relative;
    color: #2c3e50;
}

body::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 25% 35%, rgba(255, 255, 255, 0.6) 0%, transparent 50%),
        radial-gradient(circle at 75% 65%, rgba(213, 240, 221, 0.7) 0%, transparent 50%);
    pointer-events: none;
    filter: blur(30px);
    z-index: 0;
}

.container {
    background: rgba(255, 255, 255, 0.25);
    border-radius: 24px;
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.1);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    width: 100%;
    max-width: 520px;
    padding: 48px 48px 56px;
    text-align: center;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.logo {
    margin-bottom: 36px;
}

.logo h1 {
    color: #1f2937;
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.logo p {
    color: #4b5563;
    font-size: 17px;
    font-weight: 500;
}

.qr-container {
    margin: 36px 0;
    padding: 24px;
    background: rgba(255, 255, 255, 0.85);
    border-radius: 20px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.07);
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.qr-container:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 35px rgba(0, 0, 0, 0.12);
}

.qr-code {
    width: 230px;
    height: 230px;
    background: #fefefe;
    border: 2px solid #60a5fa;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
    transition: all 0.35s ease;
    box-shadow: 0 6px 15px rgba(96, 165, 250, 0.25);
}

.qr-grid {
    display: grid;
    grid-template-columns: repeat(11, 1fr);
    grid-template-rows: repeat(11, 1fr);
    gap: 3.5px;
    width: 190px;
    height: 190px;
}

.qr-cell {
    background-color: #1e293b;
    border-radius: 3px;
    transition: transform 0.25s ease;
}

.qr-container:hover .qr-cell {
    transform: scale(1.1);
}

.qr-markers {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.marker {
    position: absolute;
    width: 40px;
    height: 40px;
    border: 6px solid #1e293b;
    border-radius: 14px;
    box-shadow: 0 0 8px rgba(30, 41, 59, 0.35);
}

.marker-top-left {
    top: 14px;
    left: 14px;
}

.marker-top-right {
    top: 14px;
    right: 14px;
}

.marker-bottom-left {
    bottom: 14px;
    left: 14px;
}

.scan-text {
    margin-top: 28px;
    color: #1f2937;
    font-size: 20px;
    line-height: 1.5;
    max-width: 320px;
    font-weight: 600;
}

.scan-text i {
    color: #3b82f6;
    margin-right: 10px;
}

.scan-hint {
    position: absolute;
    bottom: 14px;
    left: 0;
    right: 0;
    background: rgba(59, 130, 246, 0.95);
    color: white;
    padding: 10px 0;
    border-radius: 0 0 20px 20px;
    font-size: 15px;
    font-weight: 600;
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.35s ease, transform 0.35s ease;
}

.buttons {
    margin-top: 26px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.btn {
    padding: 18px 36px;
    border: none;
    border-radius: 60px;
    font-size: 19px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.35s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
    background: #3b82f6;
    color: white;
}

.btn:hover {
    background: #2563eb;
    box-shadow: 0 8px 22px rgba(37, 99, 235, 0.4);
    transform: translateY(-3px);
}

.btn-activate {
    background: #10b981;
    box-shadow: 0 6px 18px rgba(16, 185, 129, 0.35);
    display: none;
}

.btn-activate:hover {
    background: #059669;
    box-shadow: 0 8px 22px rgba(5, 150, 105, 0.45);
    transform: translateY(-3px);
}

.hidden {
    display: none;
}

.visible {
    display: flex;
    animation: fadeIn 0.5s ease forwards;
}

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

.footer {
    margin-top: 36px;
    color: #6b7280;
    font-size: 15px;
    line-height: 1.7;
    font-weight: 500;
}

.pulse {
    animation: pulse 2.5s infinite ease-in-out;
}

.input-group {
    margin-top: 26px;
    width: 100%;
    text-align: left;
}

.input-group label {
    display: block;
    margin-bottom: 10px;
    color: #374151;
    font-weight: 600;
    font-size: 16px;
}

.input-group input {
    width: 100%;
    padding: 14px 18px;
    border: 1.8px solid #d1d5db;
    border-radius: 12px;
    font-size: 17px;
    margin-bottom: 24px;
    transition: border-color 0.35s ease, box-shadow 0.35s ease;
    background: rgba(255, 255, 255, 0.85);
    color: #1f2937;
    font-weight: 500;
}

.input-group input::placeholder {
    color: #9ca3af;
}

.input-group input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.25);
    outline: none;
}

.info-text {
    margin-top: 18px;
    color: #6b7280;
    font-size: 15px;
    text-align: left;
    font-weight: 500;
}

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

.status-message {
    margin-top: 24px;
    padding: 18px 22px;
    border-radius: 14px;
    font-weight: 600;
    font-size: 16px;
    display: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.status-message.visible {
    display: block;
    animation: fadeIn 0.5s ease forwards;
}

.status-scanned {
    background-color: #fff9db;
    color: #b45309;
    border: 1.5px solid #fbbf24;
}

.status-confirmed {
    background-color: #dbeafe;
    color: #1e40af;
    border: 1.5px solid #3b82f6;
}

.status-success {
    background-color: #d1fae5;
    color: #065f46;
    border: 1.5px solid #10b981;
}

.status-expired {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1.5px solid #ef4444;
}

.real-qr-code {
    width: 230px;
    height: 230px;
    object-fit: contain;
    border-radius: 16px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
}

.loading {
    display: inline-block;
    width: 22px;
    height: 22px;
    border: 3.5px solid rgba(255,255,255,0.35);
    border-radius: 50%;
    border-top-color: #3b82f6;
    animation: spin 1.1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@media (max-width: 500px) {
    .container {
        padding: 36px 28px 48px;
    }

    .qr-code {
        width: 200px;
        height: 200px;
    }

    .scan-text {
        font-size: 18px;
        max-width: 280px;
    }

    .btn {
        padding: 16px 28px;
        font-size: 17px;
        gap: 8px;
    }
}

/* Regenerate button */
.btn-regenerate {
    margin-top: 20px;
    padding: 12px 26px;
    background-color: #3b82f6;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 16px;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.35);
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.btn-regenerate:hover {
    background-color: #2563eb;
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.5);
}

.btn-regenerate i {
    margin-right: 8px;
}

.hidden {
    display: none;
}

.activation-success {
    background: #10b981;
    color: white;
    padding: 24px;
    border-radius: 16px;
    margin-top: 28px;
    animation: fadeIn 0.6s ease;
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.35);
}

.activation-success h3 {
    margin: 14px 0 10px;
}