/* SLOT Staking - Clean Professional Design */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800&display=swap');

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

body {
    font-family: 'Poppins', sans-serif;
    background: radial-gradient(ellipse at top, #1a0b2e 0%, #0a0612 50%, #000000 100%);
    color: #fff;
    min-height: 100vh;
    padding: 0;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(120, 40, 200, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(0, 200, 255, 0.1) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.container {
    position: relative;
    z-index: 1;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
header {
    background: linear-gradient(135deg, rgba(30, 10, 60, 0.8) 0%, rgba(10, 6, 25, 0.9) 100%);
    backdrop-filter: blur(10px);
    padding: 12px 25px;
    border-radius: 0 0 16px 16px;
    margin: 0 -20px 20px -20px;
    border-bottom: 2px solid rgba(120, 40, 200, 0.3);
    box-shadow: 0 4px 20px rgba(120, 40, 200, 0.2);
}

header > div:first-child {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.logo-icon {
    font-size: 32px;
}

.logo-image {
    height: 55px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 0 15px rgba(121, 40, 202, 0.6)) drop-shadow(0 0 25px rgba(0, 212, 255, 0.4));
}

h1 {
    font-size: 32px;
    font-weight: 700;
    margin: 0;
    background: linear-gradient(135deg, #00d4ff, #7928ca, #ff0080);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 20px rgba(0, 212, 255, 0.4));
}

.tagline {
    flex-basis: 100%;
    font-size: 13px;
    color: #8b92b0;
    margin: 2px 0 0 0;
    line-height: 1.4;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.tagline strong {
    font-weight: 800;
    background: linear-gradient(135deg, #00d4ff, #7928ca, #ff0080);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 8px rgba(0, 212, 255, 0.5));
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.3);
}

.subtitle {
    font-size: 14px;
    color: #8b92b0;
    text-align: center;
}

/* System Stats */
.system-stats {
    display: flex;
    gap: 20px;
}

.system-stat {
    text-align: center;
}

.system-stat-label {
    font-size: 9px;
    color: #8b92b0;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 3px;
    font-weight: 500;
}

.system-stat-value {
    font-size: 18px;
    font-weight: 700;
    background: linear-gradient(135deg, #00d4ff, #7928ca);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* User Address */
#userAddress {
    font-size: 14px;
    color: #8b92b0;
    font-weight: 500;
}

/* Buttons */
button {
    background: linear-gradient(135deg, #7928ca, #ff0080);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Poppins', sans-serif;
    box-shadow: 0 4px 20px rgba(121, 40, 202, 0.4);
}

button:hover {
    background: linear-gradient(135deg, #8b35d6, #ff1a8c);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(121, 40, 202, 0.6), 0 0 40px rgba(255, 0, 128, 0.3);
}

button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
}

.btn-primary {
    background: linear-gradient(135deg, #7928ca, #ff0080);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #8b35d6, #ff1a8c);
    box-shadow: 0 8px 30px rgba(121, 40, 202, 0.6);
}

.btn-warning {
    background: #f59e0b;
}

.btn-warning:hover {
    background: #d97706;
}

.btn-danger {
    background: linear-gradient(135deg, #B91C1C, #991B1B);
    box-shadow: 0 4px 12px rgba(185, 28, 28, 0.3);
}

.btn-danger:hover {
    background: linear-gradient(135deg, #DC2626, #B91C1C);
    box-shadow: 0 6px 16px rgba(185, 28, 28, 0.4);
}

/* Dashboard Stats */
.dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.stat-card {
    background: linear-gradient(135deg, rgba(30, 10, 60, 0.4) 0%, rgba(10, 6, 25, 0.6) 100%);
    backdrop-filter: blur(10px);
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    transition: all 0.3s;
    border: 1px solid rgba(121, 40, 202, 0.3);
}

.stat-card:hover {
    border-color: #7928ca;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(121, 40, 202, 0.3), 0 0 30px rgba(0, 212, 255, 0.1);
}

.stat-label {
    font-size: 11px;
    color: #8b92b0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: #fff;
}

/* Section */
.section {
    background: linear-gradient(135deg, rgba(30, 10, 60, 0.3) 0%, rgba(10, 6, 25, 0.5) 100%);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 20px;
    border: 1px solid rgba(121, 40, 202, 0.2);
}

.section h2 {
    margin-bottom: 20px;
    font-size: 24px;
    font-weight: 700;
    background: linear-gradient(135deg, #00d4ff, #7928ca, #ff0080);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 10px rgba(0, 212, 255, 0.3));
}

/* Tiers Grid */
.tiers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

/* Tier Card */
.tier-card {
    background: linear-gradient(135deg, #1a1614 0%, #221d18 100%);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid rgba(212, 175, 55, 0.2);
    transition: all 0.3s;
}

.tier-card:hover {
    border-color: #D4AF37;
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(212, 175, 55, 0.25);
}

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

.tier-title {
    font-size: 20px;
    font-weight: 700;
}

.tier-badge {
    background: linear-gradient(135deg, #2a2218, #3a2f1a);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    color: #D4AF37;
    border: 1px solid rgba(212, 175, 55, 0.3);
}

/* Progress Bar */
.progress-bar {
    background: linear-gradient(135deg, #0a0a0f 0%, #1a1410 100%);
    height: 32px;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 12px;
    border: 1px solid rgba(212, 175, 55, 0.2);
}

.progress-fill {
    background: linear-gradient(90deg, #10b981, #059669);
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    transition: width 0.5s;
}

.tier-info {
    display: flex;
    justify-content: space-between;
    margin: 10px 0;
    font-size: 13px;
    color: #8b92b0;
}

.timer {
    font-size: 28px;
    font-weight: 700;
    text-align: center;
    margin: 15px 0;
    padding: 15px;
    background: linear-gradient(135deg, #1a1614 0%, #2a2218 100%);
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    color: #D4AF37;
    border: 1px solid rgba(212, 175, 55, 0.3);
}

.timer.urgent {
    background: linear-gradient(135deg, #B91C1C, #7f1d1d);
    color: #FFD700;
    border-color: #DC2626;
    animation: pulse 1s infinite;
}

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

.action-buttons {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.action-buttons button {
    flex: 1;
    padding: 14px;
    font-size: 14px;
}

/* Tabs */
.tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #1a1614 0%, #2a2218 100%);
    padding: 6px;
    border-radius: 10px;
    border: 1px solid rgba(212, 175, 55, 0.15);
}

.tab {
    padding: 10px 20px;
    border-radius: 8px;
    background: transparent;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
    font-weight: 600;
    color: #8b92b0;
}

.tab:hover {
    color: #fff;
}

.tab.active {
    background: linear-gradient(135deg, #7928ca, #ff0080);
    color: white;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(121, 40, 202, 0.5), 0 0 20px rgba(255, 0, 128, 0.2);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Quick amount buttons */
.quick-amount {
    background: linear-gradient(135deg, #1a1614 0%, #2a2218 100%);
    border: 2px solid rgba(212, 175, 55, 0.3);
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.quick-amount:hover {
    background: linear-gradient(135deg, #2a2218 0%, #3a2f1a 100%);
    border-color: #D4AF37;
    color: #D4AF37;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.2);
}

/* Toast - Styled inline by JavaScript */

.loading {
    text-align: center;
    padding: 40px;
    font-size: 16px;
    color: #8b92b0;
}

/* Referral Box */
.referral-box {
    background: linear-gradient(135deg, #1a1614 0%, #221d18 100%);
    border: 1px solid rgba(212, 175, 55, 0.2);
    padding: 20px;
    border-radius: 12px;
    margin: 15px 0;
}

.referral-box h3 {
    font-size: 18px;
    margin-bottom: 15px;
}

.referral-link {
    background: #0a0a0f;
    padding: 12px 15px;
    border-radius: 8px;
    margin: 10px 0;
    word-break: break-all;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    color: #D4AF37;
    border: 1px solid rgba(212, 175, 55, 0.3);
}

/* Input */
input {
    width: 100%;
    padding: 12px 15px;
    border-radius: 8px;
    border: 1px solid rgba(121, 40, 202, 0.3);
    background: rgba(10, 6, 25, 0.6);
    backdrop-filter: blur(10px);
    color: white;
    font-size: 14px;
    margin: 8px 0;
    transition: all 0.3s;
    font-family: 'Poppins', sans-serif;
}

input:focus {
    outline: none;
    border-color: #00d4ff;
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.15), 0 0 20px rgba(0, 212, 255, 0.2);
}

input::placeholder {
    color: #8b92b0;
}

/* Admin Panel */
.admin-panel {
    background: linear-gradient(135deg, #1a1614 0%, #2a2218 100%);
    border: 2px solid #B91C1C;
    box-shadow: 0 0 20px rgba(185, 28, 28, 0.2);
}

/* Approval Notice */
#approvalNotice {
    background: linear-gradient(135deg, #78350f, #92400e);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #D4AF37;
    text-align: center;
    font-size: 14px;
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.15);
}

/* Footer */
footer a:hover {
    color: #00d4ff !important;
    transform: translateX(5px);
    filter: drop-shadow(0 0 10px rgba(0, 212, 255, 0.5));
}

footer a[href*="instagram"]:hover {
    color: #ff0080 !important;
    filter: drop-shadow(0 0 10px rgba(255, 0, 128, 0.5));
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    header {
        padding: 10px 15px;
        margin: 0 -10px 15px -10px;
    }
    
    h1 {
        font-size: 22px;
    }
    
    .logo-icon {
        font-size: 28px;
    }
    
    .logo-image {
        height: 45px;
    }
    
    header > div:first-child {
        flex-wrap: nowrap;
        gap: 10px;
        margin-bottom: 6px;
        justify-content: space-between;
    }
    
    header > div:first-child button {
        padding: 8px 12px !important;
        font-size: 12px !important;
        white-space: nowrap;
    }
    
    header > div:last-child {
        flex-direction: column;
        align-items: center;
        gap: 5px;
    }
    
    header > div:last-child > div:last-child {
        font-size: 11px !important;
        text-align: center;
    }
    
    #userAddress {
        font-size: 12px !important;
    }
    
    .system-stats {
        width: 100%;
        gap: 15px;
        justify-content: space-between;
    }
    
    .system-stat-label {
        font-size: 10px;
    }
    
    .system-stat-value {
        font-size: 20px;
    }
    
    /* Mobile stats card - stack vertically for better space */
    .section:first-of-type > div {
        padding: 15px !important;
    }
    
    .section:first-of-type > div > div {
        grid-template-columns: 1fr !important;
        gap: 0 !important;
    }
    
    .section:first-of-type > div > div > div {
        border-left: none !important;
        border-right: none !important;
        border-bottom: 1px solid rgba(212, 175, 55, 0.2) !important;
        padding: 15px 0;
    }
    
    .section:first-of-type > div > div > div:last-child {
        border-bottom: none !important;
    }
    
    /* Larger fonts on mobile with full width */
    .section:first-of-type #tvl,
    .section:first-of-type #totalPlayers {
        font-size: 32px !important;
    }
    
    .subtitle {
        font-size: 11px;
        line-height: 1.4;
        padding: 0 5px;
    }
    
    /* User address on mobile */
    #userAddress {
        font-size: 10px !important;
        text-align: center;
        width: 100%;
    }
    
    .section {
        padding: 15px;
        margin-bottom: 15px;
    }
    
    .section h2 {
        font-size: 18px;
        margin-bottom: 15px;
    }
    
    .dashboard {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    
    .stat-card {
        padding: 12px;
    }
    
    .stat-value {
        font-size: 20px;
    }
    
    .stat-label {
        font-size: 10px;
    }
    
    .tiers-grid {
        grid-template-columns: 1fr;
    }
    
    button {
        padding: 10px 16px;
        font-size: 13px;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    /* CRITICAL: Make dual-round grid stack vertically on mobile */
    .rounds-container {
        display: flex !important;
        flex-direction: column !important;
        gap: 15px !important;
    }
    
    /* Make portfolio stats stack vertically */
    .portfolio-container {
        display: flex !important;
        flex-direction: column !important;
        gap: 15px !important;
    }
    
    /* Smaller fonts in round cards */
    .rounds-container h2 {
        font-size: 20px !important;
    }
    
    /* Make input fields more mobile-friendly */
    .rounds-container input {
        font-size: 16px !important;
    }
    
    /* Better spacing in stake info sections */
    .rounds-container > div {
        padding: 15px !important;
    }
    
    /* Better touch targets for mobile */
    input[type="number"] {
        font-size: 16px !important;
        padding: 14px !important;
    }
    
    /* Referral section on mobile */
    .referral-box {
        padding: 15px;
    }
    
    /* Smaller padding for cards on mobile */
    .tier-card {
        padding: 15px;
    }
    
    /* Referral section mobile */
    .section h4 {
        font-size: 14px !important;
    }
    
    /* Admin panel mobile */
    .admin-panel {
        padding: 15px;
    }
    
    /* Responsive text in portfolio cards */
    .portfolio-container h3 {
        font-size: 16px !important;
    }
    
    .portfolio-container .stat-value {
        font-size: 18px !important;
    }
    
    /* Stake amount buttons - 2 columns on mobile */
    #stakeAmountButtons {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px !important;
    }
    
    #stakeAmountButtons button {
        padding: 10px !important;
        font-size: 14px !important;
        min-width: 0 !important;
    }
}

/* Desktop - 4 columns for stake buttons */
@media (min-width: 769px) {
    #stakeAmountButtons {
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 10px !important;
    }
}

/* Extra small devices (phones in portrait) */
@media (max-width: 480px) {
    h1 {
        font-size: 16px;
    }
    
    .logo-icon {
        font-size: 22px;
    }
    
    .logo-image {
        height: 38px;
    }
    
    header {
        padding: 10px 12px;
    }
    
    header > div:first-child {
        gap: 8px;
        flex-wrap: nowrap;
    }
    
    header > div:first-child button {
        font-size: 11px;
        padding: 6px 10px;
        min-width: auto;
    }
    
    .logo-section {
        flex-shrink: 1;
        min-width: 0;
    }
    
    .logo-section h1 {
        font-size: 16px;
    }
    
    .system-stats {
        gap: 8px;
    }
    
    .system-stat-label {
        font-size: 8px;
    }
    
    .system-stat-value {
        font-size: 14px;
    }
    
    /* Extra small - keep readable size with full width */
    .section:first-of-type #tvl,
    .section:first-of-type #totalPlayers {
        font-size: 28px !important;
    }
    
    .section h2 {
        font-size: 16px;
    }
    
    .dashboard {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    button {
        padding: 12px;
        font-size: 14px;
    }
    
    /* Smaller portfolio cards */
    .portfolio-container h3 {
        font-size: 14px !important;
    }
    
    .portfolio-container > div {
        padding: 12px !important;
    }
    
    /* Compact system stats */
    .system-stats {
        flex-wrap: wrap;
    }
    
    /* Smaller referral section */
    .section input[type="text"] {
        font-size: 11px !important;
    }
    
    /* Approval section mobile */
    #approvalSection {
        padding: 12px 15px !important;
    }
    
    #approvalSection > div:first-child {
        font-size: 14px !important;
        margin-bottom: 8px !important;
    }
    
    /* Footer mobile */
    footer {
        padding: 20px 15px !important;
    }
    
    footer > div:first-child {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }
}
