/* ==================== Global Styles ==================== */

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

:root {
    --primary-purple: #667eea;
    --primary-dark: #764ba2;
    --mpesa-green: #4caf50;
    --mpesa-dark: #45a049;
    --usdt-teal: #26a69a;
    --usdt-dark: #1e8e79;
    --accent-blue: #667eea;
    --text-dark: #1a1a2e;
    --text-light: #999;
    --border-light: #eee;
    --bg-light: #f9f9f9;
}

html, body {
    height: 100%;
}

body {
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 20px;
    position: relative;
    overflow-x: hidden;
}

/* ==================== Background & Animations ==================== */

.background-gradient {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    z-index: -1;
}

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

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

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ==================== Main Container ==================== */

.container {
    max-width: 1100px;
    margin: 0 auto;
    width: 100%;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 40px;
    animation: slideIn 0.6s ease-out;
}

/* ==================== Hero Section ==================== */

.hero {
    text-align: center;
    color: white;
    animation: slideIn 0.6s ease-out;
    margin-bottom: 20px;
}

.hero-icon {
    font-size: 100px;
    margin-bottom: 30px;
    display: block;
    animation: bounce 2s infinite;
}

.hero h1 {
    font-size: 52px;
    font-weight: 700;
    margin-bottom: 15px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 18px;
    opacity: 0.95;
    margin-bottom: 40px;
    font-weight: 300;
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.1);
}

/* ==================== Pricing Card ==================== */

.pricing-card {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 30px 40px;
    max-width: 400px;
    margin: 0 auto;
    animation: scaleIn 0.7s ease-out 0.2s both;
}

.price-amount {
    display: flex;
    align-items: baseline;
    justify-content: center;
    margin-bottom: 15px;
}

.currency {
    font-size: 36px;
    font-weight: 600;
    margin-right: 5px;
}

.amount {
    font-size: 72px;
    font-weight: 700;
}

.period {
    font-size: 24px;
    font-weight: 500;
    margin-left: 10px;
    opacity: 0.9;
}

.price-equivalent {
    font-size: 18px;
    opacity: 0.85;
    margin-bottom: 15px;
}

.price-note {
    font-size: 14px;
    opacity: 0.8;
    font-weight: 300;
}

/* ==================== Payment Methods Section ==================== */

.payment-methods-container {
    animation: slideIn 0.6s ease-out 0.3s both;
}

.section-title {
    font-size: 38px;
    font-weight: 700;
    text-align: center;
    color: white;
    margin-bottom: 10px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.section-subtitle {
    font-size: 16px;
    text-align: center;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 40px;
}

.payment-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

/* ==================== Payment Cards ==================== */

.payment-card {
    background: white;
    border-radius: 16px;
    padding: 40px 30px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    animation: scaleIn 0.6s ease-out;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.payment-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--card-color-1), var(--card-color-2));
}

.payment-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.2);
}

.mpesa-card {
    --card-color-1: #4caf50;
    --card-color-2: #45a049;
}

.usdt-card {
    --card-color-1: #26a69a;
    --card-color-2: #1e8e79;
}

.card-icon {
    font-size: 60px;
    margin-bottom: 20px;
    display: block;
    animation: scaleIn 0.6s ease-out 0.2s both;
}

.payment-card h3 {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.card-description {
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 25px;
    font-weight: 400;
}

.card-features {
    background: var(--bg-light);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 25px;
    flex-grow: 1;
}

.feature {
    font-size: 13px;
    color: var(--text-dark);
    margin: 8px 0;
    display: flex;
    align-items: center;
}

.feature::before {
    content: '';
    margin-right: 8px;
}

/* ==================== Card Input Group ==================== */

.card-input-group {
    margin-bottom: 25px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.card-input-group label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-dark);
    display: block;
}

.card-input {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid var(--border-light);
    border-radius: 8px;
    font-size: 14px;
    font-family: 'Segoe UI', sans-serif;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.card-input:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.card-amount {
    font-size: 24px;
    font-weight: 700;
    color: var(--accent-blue);
    margin-bottom: 25px;
    text-align: center;
}

/* ==================== Buttons ==================== */

.pay-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 14px 28px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pay-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.3);
}

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

.mpesa-button {
    background: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
}

.mpesa-button:hover {
    box-shadow: 0 15px 40px rgba(76, 175, 80, 0.3);
}

.usdt-button {
    background: linear-gradient(135deg, #26a69a 0%, #1e8e79 100%);
}

.usdt-button:hover {
    box-shadow: 0 15px 40px rgba(38, 166, 154, 0.3);
}

.btn-full {
    width: 100%;
    margin-top: 20px;
}

/* ==================== Info Section ==================== */

.info-section {
    animation: slideIn 0.6s ease-out 0.4s both;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 25px;
}

.info-box {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    color: white;
    transition: transform 0.3s, backdrop-filter 0.3s;
}

.info-box:hover {
    transform: translateY(-5px);
    backdrop-filter: blur(15px);
}

.info-icon {
    font-size: 40px;
    margin-bottom: 15px;
    display: block;
}

.info-box h4 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.info-box p {
    font-size: 14px;
    opacity: 0.9;
    font-weight: 300;
}

/* ==================== Modal Styles ==================== */

.modal {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    animation: fadeIn 0.3s ease-out;
}

.modal-container {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: white;
    border-radius: 16px;
    box-shadow: 0 30px 100px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 550px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: scaleIn 0.3s ease-out;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30px;
    border-bottom: 1px solid var(--border-light);
    background: linear-gradient(135deg, #f5f7ff 0%, #fff 100%);
    border-radius: 16px 16px 0 0;
}

.modal-header h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0;
}

.close {
    font-size: 32px;
    font-weight: 300;
    color: var(--text-light);
    cursor: pointer;
    transition: color 0.3s, transform 0.3s;
    border: none;
    background: none;
    padding: 0;
    line-height: 1;
}

.close:hover {
    color: var(--text-dark);
    transform: rotate(90deg);
}

.modal-step {
    display: none;
    animation: slideIn 0.3s ease-out;
}

.modal-step.active-step {
    display: block;
}

.step-content {
    padding: 30px;
}

.step-indicator {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-bottom: 30px;
    padding: 0 30px;
    padding-top: 30px;
}

.step-num {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg-light);
    color: var(--text-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s;
}

.step-num.active {
    background: linear-gradient(135deg, #26a69a 0%, #1e8e79 100%);
    color: white;
}

.step-line {
    width: 30px;
    height: 2px;
    background: var(--border-light);
    transition: all 0.3s;
}

.step-line.active {
    background: linear-gradient(90deg, #26a69a 0%, #1e8e79 100%);
}

/* ==================== Modal Sections ==================== */

.step-content h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 25px;
}

.amount-display {
    background: var(--bg-light);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
    text-align: center;
}

.amount-label {
    color: var(--text-light);
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 10px;
}

.amount-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--usdt-teal);
}

.address-section,
.email-section,
.hash-section {
    margin-bottom: 25px;
}

.section-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-dark);
    display: block;
    margin-bottom: 12px;
}

.address-box {
    background: var(--bg-light);
    border: 2px solid var(--accent-blue);
    border-radius: 10px;
    padding: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 15px;
}

.address-box code {
    flex: 1;
    font-size: 12px;
    color: var(--accent-blue);
    font-family: 'Courier New', monospace;
    word-break: break-all;
}

.copy-btn {
    background: var(--accent-blue);
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    transition: all 0.3s;
}

.copy-btn:hover {
    background: #764ba2;
    transform: translateY(-2px);
}

/* ==================== Warning Section ==================== */

.warning-section {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 25px;
}

.warning-title {
    font-size: 13px;
    font-weight: 700;
    color: #856404;
    margin-bottom: 10px;
}

.warning-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.warning-list li {
    font-size: 13px;
    color: #856404;
    margin: 6px 0;
    padding-left: 20px;
    position: relative;
}

.warning-list li::before {
    content: '•';
    position: absolute;
    left: 0;
    font-weight: bold;
}

/* ==================== Modal Inputs ==================== */

.modal-input {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid var(--border-light);
    border-radius: 8px;
    font-size: 14px;
    font-family: 'Segoe UI', sans-serif;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.modal-input:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.input-help {
    font-size: 12px;
    color: var(--text-light);
    margin-bottom: 12px;
}

.input-help a {
    color: var(--accent-blue);
    text-decoration: none;
    font-weight: 600;
}

.input-help a:hover {
    text-decoration: underline;
}

/* ==================== Email Display ==================== */

.email-display {
    background: var(--bg-light);
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 25px;
}

.email-display p {
    font-size: 13px;
    color: var(--text-light);
    margin: 0 0 8px 0;
}

.email-value {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0;
}

/* ==================== Fallback Section ==================== */

.fallback-section {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid var(--border-light);
    text-align: center;
}

.fallback-section p {
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: 12px;
}

.btn-fallback {
    background: #25D366;
    width: 100%;
}

.btn-fallback:hover {
    box-shadow: 0 15px 40px rgba(37, 211, 102, 0.3);
}

/* ==================== Success Container ==================== */

.success-container {
    text-align: center;
    padding: 40px 0;
}

.success-container > div {
    animation: bounce 0.8s ease-out;
    font-size: 80px;
    margin-bottom: 20px;
}

.success-container p {
    margin: 12px 0;
}

.success-container p:first-of-type {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-dark);
}

.success-container p:nth-of-type(2) {
    font-size: 14px;
    color: var(--text-light);
}

.success-container code {
    background: var(--bg-light);
    padding: 8px;
    border-radius: 4px;
    display: block;
    margin: 10px 0;
    word-break: break-all;
    font-size: 11px;
    color: var(--accent-blue);
}

/* ==================== Responsive Design ==================== */

@media (max-width: 768px) {
    .container {
        gap: 30px;
    }

    .hero h1 {
        font-size: 38px;
    }

    .hero-icon {
        font-size: 70px;
    }

    .pricing-card {
        padding: 25px 30px;
    }

    .currency {
        font-size: 28px;
    }

    .amount {
        font-size: 56px;
    }

    .period {
        font-size: 20px;
    }

    .section-title {
        font-size: 28px;
    }

    .payment-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .payment-card {
        padding: 30px 25px;
    }

    .modal-content {
        border-radius: 16px;
    }

    .modal-header {
        padding: 25px;
    }

    .modal-header h2 {
        font-size: 20px;
    }

    .step-content {
        padding: 25px;
    }

    .step-indicator {
        padding: 0 25px;
        padding-top: 25px;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 28px;
    }

    .hero-icon {
        font-size: 50px;
    }

    .pricing-card {
        padding: 20px 25px;
    }

    .currency {
        font-size: 24px;
    }

    .amount {
        font-size: 44px;
    }

    .period {
        font-size: 16px;
    }

    .section-title {
        font-size: 22px;
    }

    .payment-card {
        padding: 25px 20px;
    }

    .card-icon {
        font-size: 48px;
    }

    .payment-card h3 {
        font-size: 22px;
    }

    .modal-content {
        max-height: 95vh;
    }

    .modal-header {
        padding: 20px;
    }

    .modal-header h2 {
        font-size: 18px;
    }

    .step-content {
        padding: 20px;
    }

    .step-indicator {
        padding: 0 20px;
        padding-top: 20px;
        gap: 5px;
    }

    .step-num {
        width: 32px;
        height: 32px;
        font-size: 12px;
    }

    .step-line {
        width: 20px;
    }

    .info-grid {
        grid-template-columns: 1fr;
    }

    body {
        padding: 10px;
    }

    .container {
        gap: 20px;
    }
}
