@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;800&display=swap');

:root {
    --primary: #9d50bb;
    --secondary: #6e48aa;
    --accent: #00d2ff;
    --bg-dark: #0f0c29;
    --text-main: #ffffff;
    --text-dim: rgba(255, 255, 255, 0.7);
    --glass: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background: var(--bg-dark);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 20px;
    overflow-x: hidden;
    background-image: url('../image/bg.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, transparent 0%, rgba(15, 12, 41, 0.8) 100%);
    z-index: -1;
}

.container {
    width: 100%;
    max-width: 1200px;
    perspective: 1000px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.header {
    text-align: center;
    margin-bottom: 50px;
}

.voucher-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    width: 100%;
}

.glass-card {
    background: var(--glass);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 30px;
    box-shadow: var(--glass-shadow);
    text-align: center;
    animation: fadeInUp 1s ease-out;
    position: relative;
    overflow: hidden;
    transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
    transform-style: preserve-3d;
}

.glass-card::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg,
            transparent,
            rgba(255, 255, 255, 0.05),
            transparent);
    transform: rotate(45deg);
    animation: shine 10s infinite linear;
    pointer-events: none;
}

@keyframes shine {
    0% {
        transform: translateX(-100%) rotate(45deg);
    }

    100% {
        transform: translateX(100%) rotate(45deg);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.logo {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(to right, #00d2ff, #9d50bb);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 10px;
    letter-spacing: -1px;
}

h1 {
    font-size: 2.2rem;
    font-weight: 600;
    margin-bottom: 15px;
}

header p {
    color: var(--text-dim);
    font-weight: 300;
    line-height: 1.6;
    max-width: 600px;
    margin: 0 auto;
}

.voucher-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 20px;
}

.voucher-container {
    background: rgba(0, 0, 0, 0.3);
    border: 1px dashed var(--accent);
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 25px;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
}

.voucher-container:hover {
    border-style: solid;
    transform: scale(1.02);
    box-shadow: 0 0 20px rgba(0, 210, 255, 0.2);
}

.voucher-hidden {
    filter: blur(8px);
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: 3px;
    user-select: none;
}

.lock-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 16px;
    transition: opacity 0.3s ease;
}

.lock-icon {
    font-size: 1.8rem;
    margin-bottom: 5px;
}

.claim-btn {
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    padding: 14px 30px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    box-shadow: 0 4px 15px rgba(157, 80, 187, 0.4);
}

.claim-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(157, 80, 187, 0.6);
    filter: brightness(1.1);
}

.claim-btn:active {
    transform: translateY(0);
}

.footer-info {
    margin-top: 50px;
    font-size: 0.9rem;
    color: var(--text-dim);
    text-align: center;
}

.badge {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.badge.premium {
    background: linear-gradient(45deg, #FFD700, #FFA500);
    color: #000;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.4);
}

.badge.gold {
    background: linear-gradient(45deg, #e0e0e0, #bdbdbd);
    color: #000;
}

.badge.silver {
    background: linear-gradient(45deg, #cd7f32, #8b4513);
    color: #fff;
}

/* 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.8);
    backdrop-filter: blur(5px);
    justify-content: center;
    align-items: center;
}

.modal-content {
    max-width: 450px;
    width: 90%;
    margin: auto;
    position: relative;
    padding: 40px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.close-btn {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 28px;
    font-weight: bold;
    color: var(--text-dim);
    cursor: pointer;
    transition: color 0.3s;
}

.close-btn:hover {
    color: #fff;
}

.task-list {
    margin: 30px 0;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.task-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 15px 20px;
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
    text-decoration: none;
    color: var(--text-main);
}

.task-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(5px);
}

.task-item.completed {
    border-color: #4CAF50 !important;
    background: rgba(76, 175, 80, 0.1);
}

.task-status {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.2);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 12px;
}

.task-item.completed .task-status {
    background: #4CAF50;
    border-color: #4CAF50;
}

.task-item.completed .task-status::after {
    content: '✓';
    color: white;
}

.progress-container {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 15px;
}

.progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(to right, var(--accent), var(--primary));
    transition: width 0.5s ease;
}

.progress-text {
    font-size: 0.85rem;
    color: var(--text-dim);
    text-align: center;
}

/* Revealed State */
.voucher-container.revealed {
    border-style: solid !important;
    border-color: #4CAF50 !important;
    background: rgba(76, 175, 80, 0.1) !important;
    box-shadow: 0 0 20px rgba(76, 175, 80, 0.3) !important;
}

.voucher-container.revealed .voucher-hidden {
    filter: none !important;
    color: #fff !important;
    letter-spacing: 2px !important;
}

.voucher-container.revealed .lock-overlay {
    display: none !important;
}

.copy-badge {
    position: absolute;
    top: -10px;
    right: 10px;
    background: #4CAF50;
    color: white;
    padding: 2px 10px;
    border-radius: 5px;
    font-size: 0.7rem;
    display: none;
    z-index: 10;
}

.voucher-container.revealed .copy-badge {
    display: block;
}

/* Floating Ad Banner */
.floating-ad-container {
    position: fixed !important;
    bottom: 30px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: 90%;
    max-width: 728px;
    z-index: 999999 !important;
    transition: all 0.5s ease;
}

.ad-content {
    background: rgba(0, 0, 0, 0.8) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    padding: 10px !important;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 50px;
    width: fit-content;
    max-width: 100%;
    margin: 0 auto;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 16px !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8) !important;
    overflow: visible !important;
    /* Fixed clipping */
}

.ad-placeholder {
    width: auto;
    height: auto;
    min-width: 300px;
    min-height: 50px;
    background: transparent;
    border: none;
    display: flex;
    justify-content: center;
    align-items: center;
}

.ad-close {
    position: absolute;
    top: -15px;
    right: -15px;
    width: 32px;
    height: 32px;
    background: #ff4757;
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    box-shadow: 0 4px 15px rgba(255, 71, 87, 0.5);
    z-index: 1000000 !important;
    transition: all 0.3s ease;
}

.ad-close:hover {
    transform: scale(1.1) rotate(90deg);
    background: #ff6b81;
}

@media (max-width: 768px) {
    .floating-ad-container {
        bottom: 20px !important;
        width: 95%;
    }
}