/* FreeGiftZone Style - Version 5.0 Complete */
@import url('https://fonts.googleapis.com/css2?family=Quicksand:wght@300;400;500;600;700&display=swap');

/* ========================================
   BASE STYLES
   ======================================== */
.fgz-redeem-wrapper {
    max-width: 100%;
    font-family: 'Quicksand', sans-serif;
}

/* ========================================
   CARD CONTAINER
   ======================================== */
.fgz-whole-container {
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    border-radius: 10px;
    margin: 20px;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s;
    overflow: hidden;
    background: white;
}

.fgz-whole-container:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 12px rgba(0,0,0,0.2);
}

/* ========================================
   REDEEM CARD
   ======================================== */
.fgz-redeem-card {
    display: flex;
    align-items: center;
    background: #fff;
    border-radius: 8px 8px 0 0;
    padding: 20px;
}

/* Left Section */
.fgz-left-section {
    flex: 0 0 120px;
    text-align: center;
    position: relative;
}

.fgz-playstore-image {
    width: 80px;
    height: auto;
    border-radius: 10px;
}

.fgz-rating {
    background-color: #0da834;
    color: #fff;
    padding: 6px 8px;
    border-radius: 50%;
    font-size: 0.8em;
    position: absolute;
    top: -8px;
    left: -5px;
}

/* Middle Section */
.fgz-middle-section {
    flex: 1;
    padding: 0 20px;
    position: relative;
}

.fgz-middle-section::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    width: 1px;
    background: #e0e0e0;
}

.fgz-live {
    color: #fff;
    background-color: #0da834;
    font-size: 0.7em;
    padding: 2px 8px;
    border-radius: 3px;
    display: inline-block;
    margin-bottom: 8px;
}

.fgz-middle-section p {
    margin: 5px 0;
    font-size: 14px;
}

.fgz-middle-section p:first-child {
    font-size: 16px;
    margin-bottom: 5px;
}

/* Right Section */
.fgz-right-section {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    min-width: 140px;
}

.fgz-free-tag {
    background-color: transparent;
    color: #0da834;
    font-size: 1.2em;
    font-weight: bold;
    margin-bottom: 10px;
    white-space: nowrap;
}

.fgz-pricetag {
    color: #ff4444;
    font-size: 0.8em;
    text-decoration: line-through;
}

.fgz-redeem-button {
    background-color: #0da834;
    color: white;
    border: none;
    border-radius: 5px;
    padding: 10px 20px;
    font-weight: bold;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.fgz-redeem-button:hover {
    background-color: #0b8f2e;
    transform: scale(1.05);
}

/* Footer Section */
.fgz-footer-section {
    background-color: #f5f5f5;
    color: #888;
    padding: 10px;
    border-radius: 0 0 8px 8px;
    text-align: center;
    font-size: 0.75em;
}

.fgz-footer-section p {
    margin: auto;
}

/* ========================================
   MODAL POPUP STYLES
   ======================================== */
.fgz-modal {
    display: none;
    position: fixed;
    z-index: 99990;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.6);
    backdrop-filter: blur(3px);
}

.fgz-modal-content {
    background-color: #fff;
    border-radius: 20px;
    margin: 8% auto;
    padding: 25px;
    width: 90%;
    max-width: 450px;
    text-align: center;
    position: relative;
    z-index: 99995;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.fgz-modal-close {
    position: absolute;
    right: 15px;
    top: 10px;
    font-size: 28px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
    transition: color 0.2s;
}

.fgz-modal-close:hover {
    color: #333;
}

/* ========================================
   COUNTDOWN CIRCLE - RESPONSIVE
   ======================================== */
.fgz-countdown-container {
    text-align: center;
    padding: 20px 0;
}

.fgz-countdown-circle {
    position: relative;
    width: 180px;
    height: 180px;
    margin: 0 auto;
}

.fgz-progress-ring {
    transform: rotate(-90deg);
    width: 100%;
    height: 100%;
}

.fgz-progress-ring-bg {
    stroke: #e8e8e8;
    fill: transparent;
}

.fgz-progress-ring-fill {
    stroke: #0da834;
    fill: transparent;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.35s linear;
}

.fgz-countdown-timer {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 48px;
    font-weight: bold;
    color: #0da834;
}

.fgz-countdown-text {
    color: #666;
    font-size: 14px;
    margin-top: 15px;
}

/* Desktop Countdown Circle (Default) */
.fgz-progress-ring-bg,
.fgz-progress-ring-fill {
    stroke-width: 6;
}

/* ========================================
   CODE REVEAL BOX
   ======================================== */
.fgz-code-reveal {
    animation: fadeInUp 0.5s ease;
}

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

.fgz-code-box {
    background: linear-gradient(135deg, #667eea15 0%, #764ba215 100%);
    border-radius: 15px;
    padding: 20px;
    margin: 15px 0;
}

.fgz-code-label {
    font-size: 12px;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: block;
    margin-bottom: 10px;
}

.fgz-code-display {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    background: white;
    padding: 12px 15px;
    border-radius: 10px;
    border: 1px solid #e0e0e0;
}

.fgz-code-display span {
    font-size: 18px;
    font-weight: bold;
    font-family: monospace;
    letter-spacing: 1px;
    color: #333;
    flex: 1;
    word-break: break-all;
}

.fgz-mini-copy {
    background: #0da834;
    border: none;
    border-radius: 8px;
    padding: 8px 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fgz-mini-copy svg {
    stroke: white;
    width: 18px;
    height: 18px;
}

.fgz-mini-copy:hover {
    background: #0b8f2e;
    transform: scale(1.05);
}

.fgz-copy-success-msg {
    color: #0da834;
    font-size: 13px;
    margin-top: 8px;
    font-weight: 500;
}

/* Modal Footer */
.fgz-modal-footer {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.fgz-telegram-footer-btn {
    background: linear-gradient(135deg, #0088cc 0%, #005f8a 100%);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    width: 100%;
    transition: all 0.3s ease;
}

.fgz-telegram-footer-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 136, 204, 0.4);
}

/* ========================================
   PARTY EFFECT - CONFETTI CANVAS
   ======================================== */
.fgz-party-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 999999 !important;
}

canvas.confetti-canvas,
canvas.fgz-party-canvas {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    pointer-events: none !important;
    z-index: 999999 !important;
}

/* ========================================
   PAGINATION
   ======================================== */
.fgz-pagination {
    margin-top: 30px;
    text-align: center;
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    padding: 20px;
}

.fgz-page-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 8px 18px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.fgz-page-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
    color: white;
}

.fgz-page-current {
    padding: 8px 18px;
    background: #f0f0f0;
    border-radius: 5px;
    font-weight: 500;
}

/* No Codes */
.fgz-no-codes {
    text-align: center;
    padding: 40px;
    background: #f9f9f9;
    border-radius: 10px;
    margin: 20px;
    color: #999;
}

/* ========================================
   RESPONSIVE DESIGN - MOBILE FIXES
   ======================================== */

/* Tablet View (768px and below) */
@media (max-width: 768px) {
    /* Card layout */
    .fgz-redeem-card {
        flex-direction: column;
        text-align: center;
        padding: 15px;
    }
    
    .fgz-left-section {
        flex: auto;
        margin-bottom: 10px;
    }
    
    .fgz-middle-section {
        text-align: center;
        padding: 10px 0;
    }
    
    .fgz-middle-section::after {
        display: none;
    }
    
    .fgz-right-section {
        align-items: center;
        margin-top: 10px;
    }
    
    .fgz-free-tag {
        text-align: center;
    }
    
    .fgz-redeem-button {
        padding: 10px 25px;
    }
    
    /* Modal */
    .fgz-modal-content {
        width: 90%;
        max-width: 400px;
        margin: 15% auto;
        padding: 20px;
    }
    
    /* Countdown Circle - Tablet Size */
    .fgz-countdown-circle {
        width: 140px !important;
        height: 140px !important;
    }
    
    .fgz-progress-ring-bg,
    .fgz-progress-ring-fill {
        stroke-width: 5;
    }
    
    .fgz-countdown-timer {
        font-size: 38px !important;
    }
    
    .fgz-countdown-text {
        font-size: 13px;
    }
    
    /* Code display */
    .fgz-code-display span {
        font-size: 15px;
    }
}

/* Mobile View (480px and below) */
@media (max-width: 480px) {
    .fgz-whole-container {
        margin: 15px 10px;
    }
    
    /* Modal - Mobile */
    .fgz-modal-content {
        width: 95%;
        max-width: 320px;
        margin: 25% auto;
        padding: 18px 15px;
    }
    
    .fgz-modal-close {
        right: 12px;
        top: 8px;
        font-size: 24px;
    }
    
    /* Countdown Circle - Mobile Small Size */
    .fgz-countdown-circle {
        width: 120px !important;
        height: 120px !important;
    }
    
    .fgz-progress-ring-bg,
    .fgz-progress-ring-fill {
        stroke-width: 4;
    }
    
    .fgz-countdown-timer {
        font-size: 32px !important;
    }
    
    .fgz-countdown-text {
        font-size: 11px;
    }
    
    /* Code box mobile */
    .fgz-code-box {
        padding: 12px;
    }
    
    .fgz-code-display {
        padding: 8px 10px;
    }
    
    .fgz-code-display span {
        font-size: 12px;
    }
    
    .fgz-mini-copy {
        padding: 6px 8px;
    }
    
    .fgz-mini-copy svg {
        width: 14px;
        height: 14px;
    }
    
    .fgz-copy-success-msg {
        font-size: 11px;
    }
    
    /* Footer button mobile */
    .fgz-telegram-footer-btn {
        padding: 10px 15px;
        font-size: 12px;
    }
    
    /* Pagination mobile */
    .fgz-pagination {
        gap: 8px;
    }
    
    .fgz-page-btn,
    .fgz-page-current {
        padding: 6px 12px;
        font-size: 12px;
    }
}

/* Small Mobile (380px and below) */
@media (max-width: 380px) {
    .fgz-modal-content {
        max-width: 280px;
        padding: 15px 12px;
    }
    
    .fgz-countdown-circle {
        width: 100px !important;
        height: 100px !important;
    }
    
    .fgz-countdown-timer {
        font-size: 28px !important;
    }
    
    .fgz-code-display span {
        font-size: 10px;
    }
    
    .fgz-free-tag {
        font-size: 1em;
    }
    
    .fgz-redeem-button {
        padding: 8px 18px;
        font-size: 12px;
    }
}

/* ========================================
   ANIMATIONS
   ======================================== */
@keyframes fgzModalPulse {
    0% { box-shadow: 0 0 0 0 rgba(13, 168, 52, 0.7); }
    70% { box-shadow: 0 0 0 50px rgba(13, 168, 52, 0); }
    100% { box-shadow: 0 0 0 0 rgba(13, 168, 52, 0); }
}

@keyframes fgzSparkleFade {
    0% { transform: scale(1) translateY(0); opacity: 1; }
    100% { transform: scale(0) translateY(-100px); opacity: 0; }
}

@keyframes fgzFlash {
    0% { background: radial-gradient(circle, rgba(13,168,52,0.8) 0%, transparent 70%); }
    100% { background: radial-gradient(circle, transparent 0%, transparent 100%); }
}

.fgz-sparkle {
    position: fixed;
    pointer-events: none;
    z-index: 999999;
}

/* ========================================
   UTILITY CLASSES
   ======================================== */
.text-center {
    text-align: center;
}

.mt-10 {
    margin-top: 10px;
}

.mb-10 {
    margin-bottom: 10px;
}

.hidden {
    display: none;
}