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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #fef3e7 0%, #fff8f0 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.container {
    width: 100%;
    max-width: 480px;
    background: #fafafa;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.header {
    padding: 24px;
    background: linear-gradient(135deg, #ff9800 0%, #ff6f00 100%);
    text-align: center;
}

.header h1 {
    color: white;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.content {
    padding: 32px 24px;
}

.store-info {
    text-align: center;
    margin-bottom: 24px;
    padding: 20px;
    background: linear-gradient(135deg, #fff8f0 0%, #ffffff 100%);
    border-radius: 16px;
    border: 2px solid #ffe4cc;
}

.store-name {
    font-size: 22px;
    font-weight: 700;
    color: #ff6b00;
    margin-bottom: 6px;
    letter-spacing: -0.3px;
}

.store-domain {
    font-size: 13px;
    color: #999;
    font-family: ui-monospace, 'SF Mono', 'Menlo', monospace;
    font-weight: 500;
}

.unlock-container {
    background: #fffbeb;
    border-radius: 16px;
    padding: 40px 24px;
    text-align: center;
    margin-bottom: 24px;
}

.unlock-icon {
    font-size: 64px;
    margin-bottom: 16px;
}

.unlock-message {
    font-size: 16px;
    font-weight: 500;
    color: #92400e;
    margin-bottom: 24px;
    line-height: 1.5;
}

.unlock-button {
    width: 100%;
    padding: 16px 24px;
    background: linear-gradient(135deg, #ff9800 0%, #ff6f00 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(255, 107, 0, 0.25);
}

.unlock-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255, 107, 0, 0.35);
}

.unlock-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(255, 107, 0, 0.3);
}

.unlock-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.coupons-container {
    display: none;
}

.coupons-container.show {
    display: flex;
    flex-direction: column;
}

#couponsList {
    max-height: 280px;
    overflow-y: auto;
    margin-bottom: 20px;
    padding-right: 4px;
    position: relative;
}

/* Fade indicator when scrollable */
#couponsList::after {
    content: '';
    position: sticky;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40px;
    background: linear-gradient(to top, #fafafa, transparent);
    pointer-events: none;
    display: block;
}

/* Custom scrollbar styling */
#couponsList::-webkit-scrollbar {
    width: 8px;
}

#couponsList::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 4px;
}

#couponsList::-webkit-scrollbar-thumb {
    background: #ff9800;
    border-radius: 4px;
}

#couponsList::-webkit-scrollbar-thumb:hover {
    background: #ff6b00;
}

.help-text {
    text-align: center;
    font-size: 14px;
    color: #666;
    margin-bottom: 20px;
    line-height: 1.5;
}

.coupon-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px;
    margin-bottom: 12px;
    background: #ffffff;
    border: 2px solid #ff9800;
    border-radius: 12px;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(255, 152, 0, 0.15);
}

.coupon-item:hover {
    border-color: #ff6b00;
    box-shadow: 0 4px 12px rgba(255, 152, 0, 0.25);
}

.coupon-code {
    flex: 1;
    font-family: ui-monospace, 'SF Mono', 'Menlo', 'Monaco', 'Consolas', monospace;
    font-weight: 700;
    font-size: 16px;
    color: #ff6b00;
    word-break: break-all;
}

.copy-button {
    padding: 10px 20px;
    background: linear-gradient(135deg, #ff9800 0%, #ff6f00 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    box-shadow: 0 2px 6px rgba(255, 107, 0, 0.2);
}

.copy-button:hover {
    transform: scale(1.05);
    box-shadow: 0 3px 8px rgba(255, 107, 0, 0.3);
}

.copy-button:active {
    transform: scale(0.98);
}

.copy-button.copied {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.store-link {
    display: block;
    width: 100%;
    padding: 16px 24px;
    margin-top: 0;
    background: linear-gradient(135deg, #ff9800 0%, #ff6f00 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(255, 107, 0, 0.25);
}

.store-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255, 107, 0, 0.35);
}

.store-link:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(255, 107, 0, 0.3);
}

.disclaimer {
    margin-top: 16px;
    padding: 14px;
    background: #f5f5f5;
    border-radius: 12px;
    font-size: 12px;
    color: #777;
    text-align: center;
    line-height: 1.5;
}

.loading-container {
    display: none;
    text-align: center;
    padding: 48px 24px;
}

.loading-container.show {
    display: block;
}

.loading-spinner-large {
    width: 48px;
    height: 48px;
    margin: 0 auto 24px;
    border: 4px solid rgba(255, 152, 0, 0.2);
    border-top-color: #ff6b00;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.loading-text {
    font-size: 16px;
    color: #666;
    font-weight: 500;
    margin: 0;
}

.error-container {
    display: none;
    background: #fff5f5;
    border-radius: 16px;
    padding: 32px 24px;
    text-align: center;
}

.error-container.show {
    display: block;
}

.error-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.error-message {
    font-size: 16px;
    color: #991b1b;
    font-weight: 500;
    line-height: 1.5;
}

.welcome-container {
    display: none;
    text-align: center;
}

.welcome-container.show {
    display: block;
}

.welcome-icon {
    font-size: 64px;
    margin-bottom: 16px;
}

.welcome-title {
    font-size: 32px;
    font-weight: 700;
    color: #ff6b00;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.welcome-slogan {
    font-size: 18px;
    font-weight: 600;
    color: #ff9800;
    margin-bottom: 24px;
    font-style: italic;
}

.welcome-text {
    font-size: 16px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 32px;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.download-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.download-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px 24px;
    background: linear-gradient(135deg, #ff9800 0%, #ff6f00 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(255, 107, 0, 0.25);
}

.download-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255, 107, 0, 0.35);
}

.download-link:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(255, 107, 0, 0.3);
}

.link-icon {
    font-size: 24px;
}

.link-text {
    font-size: 16px;
}

.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.hidden {
    display: none;
}

@media (max-width: 600px) {
    body {
        padding: 12px;
    }

    .container {
        max-width: 100%;
        border-radius: 16px;
    }

    .header {
        padding: 20px 16px;
    }

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

    .content {
        padding: 20px 16px;
    }

    .store-info {
        padding: 16px;
        margin-bottom: 20px;
    }

    .store-name {
        font-size: 20px;
    }

    .store-domain {
        font-size: 12px;
    }

    #couponsList {
        max-height: 240px;
        padding-right: 2px;
    }

    .coupon-item {
        flex-direction: column;
        text-align: center;
        padding: 14px;
        gap: 10px;
    }

    .coupon-code {
        font-size: 15px;
        word-break: break-word;
    }

    .copy-button {
        width: 100%;
        padding: 12px 20px;
        font-size: 15px;
    }

    .store-link {
        padding: 14px 24px;
        font-size: 15px;
    }

    .unlock-container {
        padding: 32px 20px;
    }

    .unlock-icon {
        font-size: 56px;
    }

    .unlock-message {
        font-size: 15px;
    }

    .unlock-button {
        padding: 14px 20px;
        font-size: 16px;
    }

    .disclaimer {
        padding: 12px;
        font-size: 11px;
        margin-top: 12px;
    }

    .error-container {
        padding: 24px 16px;
    }

    .error-icon {
        font-size: 40px;
    }

    .error-message {
        font-size: 15px;
    }

    .welcome-icon {
        font-size: 56px;
        margin-bottom: 12px;
    }

    .welcome-title {
        font-size: 28px;
        margin-bottom: 6px;
    }

    .welcome-slogan {
        font-size: 16px;
        margin-bottom: 20px;
    }

    .welcome-text {
        font-size: 15px;
        margin-bottom: 28px;
        padding: 0 8px;
    }

    .download-link {
        padding: 14px 20px;
        font-size: 15px;
    }

    .link-icon {
        font-size: 22px;
    }

    .link-text {
        font-size: 15px;
    }

    .loading-container {
        padding: 40px 20px;
    }

    .loading-spinner-large {
        width: 40px;
        height: 40px;
        margin-bottom: 20px;
    }

    .loading-text {
        font-size: 15px;
    }
}
