/* style.css - Premium Dark Theme for Trust & Tech */
:root {
    --bg-main: #0a0f18;          /* Deep rich dark background */
    --card-bg: rgba(18, 25, 38, 0.7); /* Glassmorphism base */
    --card-border: rgba(255, 255, 255, 0.06);
    --text-primary: #ffffff;
    --text-secondary: #8b9bb4;
    --accent-cyan: #00E5FF;      /* Unexpected bright cyan for modern tech trust */
    --accent-green: #00FF88;     /* Bright glowing green for security/success */
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-primary);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    line-height: 1.6;
    /* Subtle background glows to make it look premium */
    background-image: 
        radial-gradient(circle at 20% 0%, rgba(0, 229, 255, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 80% 100%, rgba(0, 255, 136, 0.05) 0%, transparent 40%);
    background-attachment: fixed;
}

/* Custom Background Image for Homepage */
body.home-page {
    background-image: 
        linear-gradient(rgba(10, 15, 24, 0.75), rgba(10, 15, 24, 0.85)),
        url('img/background.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
}

/* Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 40px;
    border-bottom: 1px solid var(--card-border);
    background: rgba(10, 15, 24, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.logo svg {
    color: var(--accent-cyan);
    filter: drop-shadow(0 0 8px rgba(0, 229, 255, 0.4));
}

.header-trust {
    font-size: 14px;
    color: var(--accent-green);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(0, 255, 136, 0.1);
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid rgba(0, 255, 136, 0.2);
}

/* Main Content Centering */
main {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 60px 20px;
    position: relative;
    z-index: 1;
}

.hero-text {
    text-align: center;
    margin-bottom: 50px;
}

.hero-text h1 {
    font-size: 42px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
    letter-spacing: -1px;
    /* Subtle text gradient */
    background: linear-gradient(180deg, #FFFFFF 0%, #B0C4DE 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-text p {
    font-size: 18px;
    color: var(--text-secondary);
    max-width: 500px;
    margin: 0 auto;
}

/* 2x2 Grid Layout with Premium Glassmorphism */
.grid-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    width: 100%;
    max-width: 800px;
    margin-bottom: 50px;
}

.grid-btn {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 40px 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    position: relative;
    overflow: hidden;
}

/* Glowing border effect on hover */
.grid-btn::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    border-radius: 16px;
    padding: 2px;
    background: linear-gradient(135deg, var(--accent-cyan), transparent 60%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.grid-btn:hover {
    transform: translateY(-4px);
    background: rgba(22, 32, 48, 0.8);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 
                0 0 20px rgba(0, 229, 255, 0.05);
}

.grid-btn:hover::before {
    opacity: 1;
}

.grid-btn .btn-icon {
    font-size: 42px;
    margin-bottom: 16px;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.3));
    transition: transform 0.3s ease;
}

.grid-btn:hover .btn-icon {
    transform: scale(1.1);
}

.grid-btn h2 {
    font-size: 22px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.grid-btn p {
    font-size: 14px;
    color: var(--text-secondary);
}

/* Trust Badge Bottom */
.trust-badge {
    color: var(--text-secondary);
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0.8;
}

.trust-badge span {
    color: var(--text-primary);
    font-weight: 600;
}

/* Footer */
footer {
    text-align: center;
    padding: 30px;
    border-top: 1px solid var(--card-border);
    color: var(--text-secondary);
    font-size: 13px;
    background: rgba(10, 15, 24, 0.6);
}

footer p {
    margin-bottom: 6px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .grid-container {
        grid-template-columns: 1fr;
        padding: 0 10px;
    }
    
    .hero-text h1 {
        font-size: 32px;
    }
    
    header {
        padding: 16px 20px;
    }
    
    .grid-btn {
        padding: 30px 20px;
    }
}

/* Grid Button Background Images */
.grid-btn[data-action="buy_credits"] {
    background-image: linear-gradient(rgba(18, 25, 38, 0.75), rgba(18, 25, 38, 0.9)), url('img/1.png');
    background-size: cover;
    background-position: center;
}
.grid-btn[data-action="buy_credits"]:hover {
    background-image: linear-gradient(rgba(18, 25, 38, 0.6), rgba(18, 25, 38, 0.8)), url('img/1.png');
}

.grid-btn[data-action="transfer_funds"] {
    background-image: linear-gradient(rgba(18, 25, 38, 0.75), rgba(18, 25, 38, 0.9)), url('img/2.png');
    background-size: cover;
    background-position: center;
}
.grid-btn[data-action="transfer_funds"]:hover {
    background-image: linear-gradient(rgba(18, 25, 38, 0.6), rgba(18, 25, 38, 0.8)), url('img/2.png');
}

.grid-btn[data-action="view_history"] {
    background-image: linear-gradient(rgba(18, 25, 38, 0.75), rgba(18, 25, 38, 0.9)), url('img/3.png');
    background-size: cover;
    background-position: center;
}
.grid-btn[data-action="view_history"]:hover {
    background-image: linear-gradient(rgba(18, 25, 38, 0.6), rgba(18, 25, 38, 0.8)), url('img/3.png');
}

.grid-btn[data-action="contact_support"] {
    background-image: linear-gradient(rgba(18, 25, 38, 0.75), rgba(18, 25, 38, 0.9)), url('img/4.png');
    background-size: cover;
    background-position: center;
}
.grid-btn[data-action="contact_support"]:hover {
    background-image: linear-gradient(rgba(18, 25, 38, 0.6), rgba(18, 25, 38, 0.8)), url('img/4.png');
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(10, 15, 24, 0.9);
    backdrop-filter: blur(8px);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--card-border);
    border-top-color: var(--accent-cyan);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

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

/* Form Container */
.form-container {
    width: 100%;
    max-width: 700px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 40px;
    backdrop-filter: blur(16px);
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    font-size: 14px;
    color: var(--text-secondary);
}

.form-group input {
    background: rgba(0,0,0,0.2);
    border: 1px solid var(--card-border);
    color: var(--text-primary);
    padding: 12px 16px;
    border-radius: 8px;
    font-family: inherit;
    font-size: 15px;
    transition: all 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--accent-cyan);
    box-shadow: 0 0 0 2px rgba(0, 229, 255, 0.2);
}

/* Contract Box */
.contract-box {
    background: rgba(0,0,0,0.3);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 24px;
}

.contract-box h3 {
    margin-bottom: 12px;
    color: var(--accent-cyan);
    font-size: 18px;
}

.contract-text {
    max-height: 150px;
    overflow-y: auto;
    font-size: 13px;
    color: var(--text-secondary);
    padding-right: 10px;
}

.contract-text p {
    margin-bottom: 10px;
}

.contract-text::-webkit-scrollbar {
    width: 6px;
}
.contract-text::-webkit-scrollbar-thumb {
    background: var(--card-border);
    border-radius: 4px;
}

/* Checkbox */
.checkbox-group {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 30px;
}

.checkbox-group input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: var(--accent-green);
    cursor: pointer;
}

.checkbox-group label {
    font-size: 15px;
    cursor: pointer;
}

/* Submit Button */
.cta-button {
    width: 100%;
    padding: 16px;
    background: var(--accent-green);
    color: #000;
    font-weight: 700;
    font-size: 16px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.cta-button:disabled {
    background: #333;
    color: #666;
    cursor: not-allowed;
}

.cta-button:not(:disabled):hover {
    background: #00e67a;
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.3);
}

@media (max-width: 600px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
    .form-container {
        padding: 20px;
    }
}

/* Header Pay Button */
.header-pay-btn {
    text-decoration: none;
    font-size: 13px;
    color: #0a0f18;
    background: var(--accent-cyan);
    font-weight: 700;
    padding: 8px 16px;
    border-radius: 20px;
    border: 1px solid rgba(0, 229, 255, 0.2);
    box-shadow: 0 0 10px rgba(0, 229, 255, 0.2);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex;
    align-items: center;
    gap: 6px;
}
.header-pay-btn:hover {
    background: var(--accent-green);
    box-shadow: 0 0 15px rgba(0, 255, 136, 0.4);
    transform: translateY(-1px);
}

/* Grid Payment Button styling */
.grid-btn[data-action="payment"] {
    background-image: linear-gradient(rgba(18, 25, 38, 0.75), rgba(18, 25, 38, 0.9)), url('img/background.png');
    background-size: cover;
    background-position: center;
}
.grid-btn[data-action="payment"]:hover {
    background-image: linear-gradient(rgba(18, 25, 38, 0.6), rgba(18, 25, 38, 0.8)), url('img/background.png');
}

/* Crypto Payment Page Styles */
.target-box {
    background: rgba(0, 229, 255, 0.08);
    border: 1px solid rgba(0, 229, 255, 0.2);
    color: var(--accent-cyan);
    text-align: center;
    padding: 16px 24px;
    border-radius: 12px;
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 35px;
    box-shadow: 0 0 20px rgba(0, 229, 255, 0.05);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.crypto-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    width: 100%;
    max-width: 1000px;
}

.crypto-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 24px;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Specific Coin Border Colors on Hover */
.crypto-card[data-coin="bitcoin"]:hover {
    border-color: #FF9900;
    box-shadow: 0 10px 30px rgba(255, 153, 0, 0.1);
}
.crypto-card[data-coin="ethereum"]:hover {
    border-color: #627EEA;
    box-shadow: 0 10px 30px rgba(98, 126, 234, 0.1);
}
.crypto-card[data-coin="solana"]:hover {
    border-color: #14F195;
    box-shadow: 0 10px 30px rgba(20, 241, 149, 0.1);
}
.crypto-card[data-coin="tron"]:hover {
    border-color: #FF0013;
    box-shadow: 0 10px 30px rgba(255, 0, 19, 0.1);
}
.crypto-card[data-coin="binancecoin"]:hover {
    border-color: #F3BA2F;
    box-shadow: 0 10px 30px rgba(243, 186, 47, 0.1);
}

.coin-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    width: 100%;
    justify-content: center;
}

.coin-icon {
    width: 32px;
    height: 32px;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

.crypto-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.network-badge {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.05);
    padding: 3px 10px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.qr-container {
    background: #ffffff;
    padding: 10px;
    border-radius: 12px;
    margin: 20px 0;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    display: flex;
    justify-content: center;
    align-items: center;
}

.qr-code {
    width: 140px;
    height: 140px;
    display: block;
}

.address-box {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--card-border);
    color: var(--text-secondary);
    padding: 12px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-family: monospace;
    word-break: break-all;
    width: 100%;
    cursor: pointer;
    transition: all 0.2s;
    user-select: all;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 20px;
}

.address-box:hover {
    color: var(--text-primary);
    border-color: var(--accent-cyan);
    background: rgba(0, 229, 255, 0.03);
}

.address-box .copy-icon {
    font-size: 12px;
    opacity: 0.6;
}

.amount-box {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--accent-green);
    background: rgba(0, 255, 136, 0.06);
    border: 1px solid rgba(0, 255, 136, 0.15);
    padding: 10px 16px;
    border-radius: 8px;
    width: 100%;
    box-sizing: border-box;
}

.crypto-loading {
    color: var(--text-secondary);
    font-style: italic;
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    font-size: 1.1rem;
}

