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

:root {
    --primary: #2563eb;
    --primary-light: #3b82f6;
    --secondary: #06b6d4;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --dark: #0f172a;
    --darker: #020617;
    --card: #1e293b;
    --card-hover: #334155;
    --text: #f8fafc;
    --text-muted: #94a3b8;
    --border: #475569;
    --glow: rgba(37, 99, 235, 0.4);
    --grid-color: rgba(59, 130, 246, 0.1);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--dark);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    zoom: 1;
}

/* Grid Background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(var(--grid-color) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-color) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
    z-index: 0;
}

/* Animated Background */
.animated-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.floating-btc {
    position: absolute;
    color: rgba(37, 99, 235, 0.15);
    font-size: 2.5rem;
    animation: float 20s infinite ease-in-out;
}

.floating-btc:nth-child(1) {
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.floating-btc:nth-child(2) {
    top: 60%;
    right: 10%;
    animation-delay: 5s;
}

.floating-btc:nth-child(3) {
    bottom: 20%;
    left: 50%;
    animation-delay: 10s;
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-20px) rotate(5deg); }
    50% { transform: translateY(0) rotate(-5deg); }
    75% { transform: translateY(20px) rotate(3deg); }
}

/* Container */
.container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 15px;
    position: relative;
    z-index: 2;
}

/* Main Grid */
.main-grid {
    display: grid;
    grid-template-columns: 1fr minmax(600px, 800px) 1fr;
    gap: 20px;
    align-items: start;
    justify-items: center;
}

/* Ad Containers - ACTUALIZADOS para diseño más cuadrado */
.ad-container {
    display: flex;
    flex-direction: column;
    gap: 25px;
    height: fit-content;
    justify-self: center;
    width: 100%;
    max-width: 280px;
}

.ad-card {
    background: rgba(30, 41, 59, 0.95);
    backdrop-filter: blur(20px);
    border: 2px solid var(--border);
    border-radius: 20px; /* Más redondeado */
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    min-height: 220px; /* Más cuadrado */
    aspect-ratio: 1.2/1; /* Proporción más cuadrada */
    display: flex;
    flex-direction: column;
}

.ad-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px var(--glow);
    border-color: var(--primary);
    background: rgba(30, 41, 59, 1);
}

.ad-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(37, 99, 235, 0.15), transparent);
    transition: left 0.6s ease;
}

.ad-card:hover::before {
    left: 100%;
}

.ad-header {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    text-align: center;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.ad-header i {
    color: var(--primary);
    font-size: 0.8rem;
}

.ad-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: rgba(51, 65, 85, 0.3);
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.ad-content iframe {
    border-radius: 12px !important;
    transition: all 0.3s ease;
}

.ad-card:hover .ad-content iframe {
    transform: scale(1.02);
    box-shadow: 0 4px 20px rgba(37, 99, 235, 0.3);
}

/* Efectos adicionales para los iframes A-ADS */
.ad-content::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, transparent, rgba(37, 99, 235, 0.05), transparent);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.ad-card:hover .ad-content::after {
    opacity: 1;
}

/* Faucet Container */
.faucet-container {
    background: rgba(30, 41, 59, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 0;
    border: 1px solid var(--border);
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

/* Live Stats Bar */
.live-stats-bar {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1), rgba(6, 182, 212, 0.1));
    padding: 18px 25px;
    display: flex;
    justify-content: space-around;
    border-bottom: 1px solid var(--border);
}

.live-stat {
    display: flex;
    align-items: center;
    gap: 8px;
}

.live-stat i {
    color: var(--primary);
    font-size: 1.1rem;
}

.live-stat .label {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.live-stat .value {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
    transition: all 0.3s ease;
}

.live-stat .value.highlight {
    color: var(--success);
    text-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
}

/* Balance loading animation */
.live-stat .value.loading {
    color: var(--text-muted);
    position: relative;
}

.live-stat .value.loading::after {
    content: '...';
    animation: dots 1.5s infinite;
}

@keyframes dots {
    0%, 20% { opacity: 0; }
    40% { opacity: 1; }
    100% { opacity: 0; }
}

/* Connection Status */
.connection-status {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(239, 68, 68, 0.05));
    padding: 15px 20px;
    text-align: center;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: var(--warning);
    font-weight: 600;
    font-size: 0.9rem;
}

.connection-status i {
    animation: pulse 1.5s infinite;
}

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

/* Countdown Timer */
.countdown-timer {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(239, 68, 68, 0.05));
    padding: 15px;
    text-align: center;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: var(--danger);
    font-weight: 600;
}

.countdown-value {
    font-size: 1.2rem;
    font-family: 'Courier New', monospace;
}

/* Steps Section */
.steps-section {
    padding: 25px;
}

/* Main Title */
.main-title {
    text-align: center;
    margin-bottom: 30px;
    position: relative;
}

.brand-title {
    font-size: 2.8rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--primary), var(--secondary), #10b981);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 30px rgba(37, 99, 235, 0.3);
    margin-bottom: 5px;
    letter-spacing: 3px;
    animation: shimmer 3s ease-in-out infinite;
}

.brand-subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin: 0;
    position: relative;
}

.brand-subtitle::before,
.brand-subtitle::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 40px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
}

.brand-subtitle::before {
    left: -60px;
}

.brand-subtitle::after {
    right: -60px;
}

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

.section-title {
    text-align: center;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 1.2rem;
}

.title-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

/* Steps Grid */
.steps-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    margin-bottom: 25px;
}

.step-card {
    background: rgba(51, 65, 85, 0.5);
    backdrop-filter: blur(10px);
    border: 2px solid var(--border);
    border-radius: 15px;
    padding: 18px;
    position: relative;
    transition: all 0.3s ease;
}

.step-card.completed {
    border-color: var(--success);
    background: rgba(16, 185, 129, 0.05);
}

.step-card.completed .step-status {
    color: var(--success);
}

.step-card.error {
    border-color: var(--danger);
    background: rgba(239, 68, 68, 0.05);
}

.step-card.error .step-status {
    color: var(--danger);
}

.step-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.step-number {
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: white;
    font-size: 0.9rem;
}

.step-status {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.step-content h3 {
    font-size: 1rem;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.step-content h3 i {
    color: var(--primary);
    font-size: 0.9rem;
}

.step-content p {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 12px;
}

.step-button {
    width: 100%;
    padding: 10px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border: none;
    border-radius: 10px;
    color: white;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
}

.step-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    transition: left 0.3s;
}

.step-button:hover::before {
    left: 100%;
}

.step-button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px var(--glow);
}

.step-button:disabled {
    background: var(--border);
    color: var(--text-muted);
    cursor: not-allowed;
    transform: none;
}

.step-button.error {
    background: linear-gradient(135deg, var(--danger), #dc2626);
}

.step-button.processing {
    background: linear-gradient(135deg, var(--warning), #d97706);
    animation: pulse-button 1.5s infinite;
}

@keyframes pulse-button {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

/* Wallet Section */
.wallet-section {
    margin-bottom: 20px;
}

.input-group {
    position: relative;
    display: flex;
    align-items: center;
    margin-bottom: 18px;
}

.input-icon {
    position: absolute;
    left: 15px;
    color: var(--primary);
    font-size: 1.1rem;
}

.wallet-input {
    width: 100%;
    padding: 14px 45px;
    background: rgba(51, 65, 85, 0.5);
    backdrop-filter: blur(10px);
    border: 2px solid var(--border);
    border-radius: 12px;
    color: var(--text);
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.wallet-input:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(51, 65, 85, 0.8);
    box-shadow: 0 0 20px var(--glow);
}

.wallet-input::placeholder {
    color: var(--text-muted);
}

.input-status {
    position: absolute;
    right: 15px;
    color: var(--text-muted);
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.input-status.valid {
    color: var(--success);
}

.input-status.invalid {
    color: var(--danger);
}

/* Captcha Box */
.captcha-box {
    background: rgba(51, 65, 85, 0.5);
    backdrop-filter: blur(10px);
    border: 2px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    max-width: 400px;
    margin: 0 auto;
}

.captcha-header {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1), rgba(37, 99, 235, 0.05));
    padding: 10px 15px;
    font-size: 0.85rem;
    color: var(--primary);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.captcha-content {
    padding: 18px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.captcha-placeholder {
    text-align: center;
    color: var(--text-muted);
}

.captcha-placeholder i {
    font-size: 1.8rem;
    margin-bottom: 8px;
    color: var(--primary);
}

.captcha-placeholder small {
    display: block;
    margin-top: 8px;
    color: var(--text-muted);
    font-size: 0.75rem;
}

.captcha-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: var(--success);
    font-weight: 600;
    padding: 15px;
    background: rgba(16, 185, 129, 0.1);
    border-radius: 8px;
    margin-top: 10px;
}

.captcha-status i {
    font-size: 1.2rem;
}

/* hCaptcha specific centering */
#hcaptcha-widget {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    width: 100% !important;
    text-align: center !important;
}

#hcaptcha-widget iframe {
    margin: 0 auto !important;
    display: block !important;
}

#hcaptcha-widget > div {
    margin: 0 auto !important;
    text-align: center !important;
}

#hcaptcha-widget * {
    margin-left: auto !important;
    margin-right: auto !important;
}

/* Claim Button */
.claim-button {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--border), #475569);
    border: 2px solid var(--border);
    border-radius: 15px;
    color: var(--text-muted);
    font-size: 1rem;
    font-weight: 700;
    cursor: not-allowed;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    margin-bottom: 18px;
}

.claim-button:not(:disabled) {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-color: var(--primary);
    color: white;
    cursor: pointer;
    animation: glow 2s ease-in-out infinite;
}

@keyframes glow {
    0%, 100% { box-shadow: 0 0 20px var(--glow); }
    50% { box-shadow: 0 0 40px rgba(37, 99, 235, 0.6); }
}

.claim-button:not(:disabled):hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px var(--glow);
}

.button-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    position: relative;
    z-index: 1;
}

.button-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transition: all 0.5s ease;
}

.claim-button:not(:disabled):active .button-glow {
    width: 300px;
    height: 300px;
    opacity: 0;
}

/* Progress Bar */
.progress-container {
    position: relative;
    height: 8px;
    background: rgba(71, 85, 105, 0.5);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 20px;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--success));
    border-radius: 10px;
    width: 0%;
    transition: width 0.5s ease;
    box-shadow: 0 0 10px var(--glow);
}

.progress-text {
    position: absolute;
    top: -22px;
    right: 0;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

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

/* Notifications */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 14px 18px;
    border-radius: 12px;
    color: white;
    font-weight: 600;
    z-index: 10000;
    animation: slideIn 0.3s ease;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    max-width: 300px;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Tooltips */
.tooltip {
    position: absolute;
    background: var(--darker);
    color: var(--text);
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.8rem;
    z-index: 1000;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border);
}

/* Responsive Design */
@media (max-width: 1200px) {
    .main-grid {
        grid-template-columns: 1fr minmax(500px, 700px) 1fr;
        gap: 15px;
    }
    
    .ad-container {
        max-width: 240px;
    }
    
    .ad-card {
        min-height: 200px;
        padding: 12px;
    }
    
    .container {
        max-width: 1400px;
    }
}

@media (max-width: 1024px) {
    .main-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .left-ads, .right-ads {
        order: 2;
        flex-direction: row;
        justify-content: space-between;
        max-width: 100%;
        gap: 15px;
    }
    
    .left-ads .ad-card, .right-ads .ad-card {
        flex: 1;
        margin: 0 10px;
        min-height: 180px;
        max-width: 300px;
    }
    
    .faucet-container {
        order: 1;
    }
}

@media (max-width: 768px) {
    body::before {
        background-size: 30px 30px;
    }
    
    .container {
        padding: 12px;
    }
    
    .brand-title {
        font-size: 2.2rem;
        letter-spacing: 2px;
    }
    
    .brand-subtitle {
        font-size: 0.95rem;
        letter-spacing: 1px;
    }
    
    .brand-subtitle::before,
    .brand-subtitle::after {
        width: 25px;
    }
    
    .brand-subtitle::before {
        left: -35px;
    }
    
    .brand-subtitle::after {
        right: -35px;
    }
    
    .steps-grid {
        grid-template-columns: 1fr;
    }
    
    .live-stats-bar {
        flex-direction: column;
        gap: 12px;
        text-align: center;
        padding: 15px 20px;
    }
    
    .left-ads, .right-ads {
        flex-direction: column;
        gap: 15px;
    }
    
    .left-ads .ad-card, .right-ads .ad-card {
        margin: 0;
        min-height: 160px;
        max-width: 100%;
    }
    
    .ad-card {
        padding: 12px;
    }
    
    .notification {
        max-width: 250px;
        right: 10px;
    }
}