/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    
    align-items: center;
    justify-content: center;
    padding: 20px;
    color: #333;
}

/* Container and card */
.container {
    max-width: 400px;
    width: 100%;
}

.card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 40px 32px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #667eea, #764ba2, #667eea);
    background-size: 200% 100%;
    animation: gradient 3s ease infinite;
}

@keyframes gradient {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* App info section */
.app-info {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 40px;
}

.app-icon {
    width: 88px;
    height: 88px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.app-icon img {
    max-width: 88px;
    max-height: 88px;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 20px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.app-name {
    font-size: 24px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 4px;
    line-height: 1.2;
}

.app-description {
    font-size: 14px;
    color: #666;
    line-height: 1.4;
}

/* Promo section */
.promo-section {
    margin-bottom: 32px;
}

.remaining-count {
    text-align: center;
    margin-bottom: 24px;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9ff 0%, #e8f2ff 100%);
    border-radius: 16px;
    border: 1px solid rgba(102, 126, 234, 0.1);
}

.count-number {
    display: block;
    font-size: 48px;
    font-weight: 700;
    color: #667eea;
    line-height: 1;
    margin-bottom: 4px;
}

.count-label {
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

/* Claim button */
.claim-button {
    width: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 16px;
    padding: 18px 24px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.claim-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.claim-button:active {
    transform: translateY(0);
}

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

.button-icon {
    transition: transform 0.3s ease;
}

.claim-button:hover .button-icon {
    transform: translateX(4px);
}

/* Promo code display */
.promo-code-display {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 20px;
    padding: 32px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    z-index: 1001;
    max-width: 340px;
    width: 90%;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

.promo-code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.promo-code-header h3 {
    font-size: 20px;
    font-weight: 600;
    color: #1a1a1a;
}

.close-button {
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    padding: 4px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.close-button:hover {
    background: #f5f5f5;
    color: #666;
}

.promo-code {
    background: #f8f9ff;
    border: 2px solid #667eea;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    font-size: 24px;
    font-weight: 700;
    color: #667eea;
    font-family: 'Monaco', 'Courier New', monospace;
    margin-bottom: 16px;
    letter-spacing: 2px;
}

.copy-button {
    width: 100%;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 12px;
    padding: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 16px;
}

.copy-button:hover {
    background: #5a6fd8;
}

.copy-button.copied {
    background: #22c55e;
}

.warning-message {
    background: #fee2e2;
    border: 1px solid #ef4444;
    border-radius: 6px;
    padding: 8px 10px;
    text-align: left;
    margin: 8px 0;
    display: flex;
    align-items: flex-start;
    gap: 6px;
    border-left: 3px solid #dc2626;
}

.warning-message strong {
    color: #b91c1c;
    font-size: 10px;
    font-weight: 500;
    line-height: 1.2;
    flex: 1;
}



.instructions {
    font-size: 13px;
    color: #666;
    text-align: center;
    line-height: 1.4;
}

/* Overlay */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* App Store link */
.app-link {
    text-align: center;
}

.app-store-link img {
    height: 48px;
    transition: transform 0.2s ease;
}

.app-store-link:hover img {
    transform: scale(1.05);
}

/* Responsive design */
@media (max-width: 480px) {
    .card {
        padding: 32px 24px;
        margin: 16px;
    }
    
    .app-info {
        gap: 12px;
        margin-bottom: 32px;
    }
    
    .app-icon {
        width: 80px;
        height: 80px;
    }
    
    .app-icon img {
        max-width: 80px;
        max-height: 80px;
    }
    
    .app-name {
        font-size: 20px;
    }
    
    .count-number {
        font-size: 40px;
    }
    
    .promo-code-display {
        padding: 24px;
    }
    
    .promo-code {
        font-size: 20px;
        padding: 16px;
    }
}

/* Loading animation */
.loading {
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Already claimed button styling */
.claim-button.already-claimed {
    background: linear-gradient(135deg, #94a3b8 0%, #64748b 100%);
    cursor: not-allowed;
}

.claim-button.already-claimed:hover {
    transform: none;
    box-shadow: none;
}

/* View code button */
.view-code-button {
    width: 100%;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    border-radius: 16px;
    padding: 16px 24px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
    margin-top: 12px;
}

.view-code-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4);
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
}

.view-code-button:active {
    transform: translateY(0);
} 