* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #4c1d95;
    --primary-dark: #3b1580;
    --secondary-color: #6b21a8;
    --success-color: #059669;
    --danger-color: #dc2626;
    --warning-color: #d97706;
    --bg-color: #1e1b2e;
    --card-bg: #2d2a3e;
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --border-color: #475569;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -2px rgba(0, 0, 0, 0.3);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1e1b2e 0%, #2d1b3d 25%, #3d1b4d 50%, #2d1b3d 75%, #1e1b2e 100%);
    background-size: 200% 200%;
    animation: gradientShift 15s ease infinite;
    min-height: 100vh;
    padding: 20px;
    color: var(--text-primary);
    line-height: 1.6;
    position: relative;
    overflow-x: hidden;
    overflow-y: auto;
}

/* Floating Money Background */
.money-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.money {
    position: absolute;
    font-size: 2rem;
    opacity: 0.3;
    animation: floatMoney 20s infinite ease-in-out;
    user-select: none;
}

.money-1 {
    left: 10%;
    animation-delay: 0s;
    animation-duration: 18s;
}

.money-2 {
    left: 20%;
    animation-delay: 2s;
    animation-duration: 22s;
}

.money-3 {
    left: 30%;
    animation-delay: 1s;
    animation-duration: 20s;
}

.money-4 {
    left: 40%;
    animation-delay: 3s;
    animation-duration: 25s;
}

.money-5 {
    left: 50%;
    animation-delay: 0.5s;
    animation-duration: 19s;
}

.money-6 {
    left: 60%;
    animation-delay: 2.5s;
    animation-duration: 23s;
}

.money-7 {
    left: 70%;
    animation-delay: 1.5s;
    animation-duration: 21s;
}

.money-8 {
    left: 80%;
    animation-delay: 3.5s;
    animation-duration: 24s;
}

.money-9 {
    left: 15%;
    animation-delay: 4s;
    animation-duration: 26s;
}

.money-10 {
    left: 35%;
    animation-delay: 4.5s;
    animation-duration: 17s;
}

.money-11 {
    left: 55%;
    animation-delay: 5s;
    animation-duration: 28s;
}

.money-12 {
    left: 75%;
    animation-delay: 5.5s;
    animation-duration: 20s;
}

@keyframes floatMoney {
    0% {
        transform: translateY(100vh) rotate(0deg) scale(0.8);
        opacity: 0;
    }
    10% {
        opacity: 0.3;
    }
    50% {
        transform: translateY(50vh) rotate(180deg) scale(1.2);
        opacity: 0.5;
    }
    90% {
        opacity: 0.3;
    }
    100% {
        transform: translateY(-10vh) rotate(360deg) scale(0.8);
        opacity: 0;
    }
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.container {
    max-width: 600px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

header {
    text-align: center;
    margin-bottom: 40px;
    color: white;
    position: relative;
    z-index: 1;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.logo {
    font-size: 3.5rem;
    font-weight: bold;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
    animation: bounce 2s ease-in-out infinite;
    cursor: default;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.tagline {
    font-size: 1.3rem;
    opacity: 0.95;
    font-weight: 600;
    margin-bottom: 8px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.sub-tagline {
    font-size: 1rem;
    opacity: 0.85;
    font-weight: 300;
    font-style: italic;
}

.card {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 30px;
    box-shadow: var(--shadow-lg);
    margin-bottom: 30px;
    animation: fadeInUp 0.6s ease-out;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 2px solid rgba(124, 58, 237, 0.3);
    position: relative;
    z-index: 1;
    backdrop-filter: blur(10px);
    background: rgba(45, 42, 62, 0.95);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.15), 0 10px 10px -5px rgba(0, 0, 0, 0.1);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card-header {
    text-align: center;
    margin-bottom: 30px;
}

.card-header h2 {
    font-size: 2.2rem;
    color: var(--primary-color);
    margin-bottom: 8px;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
}

.subtitle {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-style: italic;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #1e1b2e;
    color: var(--text-primary);
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
    transform: scale(1.02);
    transition: all 0.3s ease;
}

.input-hint {
    display: block;
    margin-top: 5px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-style: italic;
}

.stripe-element-container {
    padding: 14px 16px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    background: #1e1b2e;
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

.stripe-element-container:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

/* تنسيقات Stripe Elements - نص أبيض واضح */
.stripe-element-container .StripeElement {
    color: #f1f5f9 !important;
}

.stripe-element-container input,
.stripe-element-container .InputElement {
    color: #f1f5f9 !important;
    background: transparent !important;
}

.stripe-element-container .InputElement::placeholder {
    color: #94a3b8 !important;
    opacity: 0.7 !important;
}

/* التأكد من أن النص واضح في جميع حالات Stripe */
.stripe-element-container * {
    color: #f1f5f9 !important;
}

.stripe-element-container .InputElement--focus,
.stripe-element-container .InputElement--complete {
    color: #f1f5f9 !important;
}

.card-errors,
#payment-errors {
    color: var(--danger-color);
    font-size: 0.9rem;
    margin-bottom: 15px;
    padding: 12px 15px;
    background: rgba(239, 68, 68, 0.1);
    border-right: 4px solid var(--danger-color);
    border-radius: 8px;
    display: none;
    min-height: 20px;
}

.card-errors:not(:empty),
#payment-errors:not(:empty) {
    display: block;
}

/* رسائل الخطأ للحقول */
.amount-error-message {
    color: var(--danger-color);
    font-size: 0.85rem;
    margin-top: 5px;
    padding: 8px 12px;
    background: rgba(239, 68, 68, 0.1);
    border-right: 3px solid var(--danger-color);
    border-radius: 6px;
    display: none;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.btn-primary {
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: inherit;
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.loader {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}


.warning {
    margin-top: 20px;
    padding: 18px;
    background: linear-gradient(135deg, #451a03 0%, #7c2d12 100%);
    border-right: 4px solid var(--warning-color);
    border-radius: 12px;
    text-align: center;
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.warning p {
    color: #fbbf24;
    font-size: 0.95rem;
    margin: 0;
    line-height: 1.6;
    font-weight: 600;
}

.info-section {
    background: rgba(45, 42, 62, 0.95);
    border-radius: 20px;
    padding: 30px;
    box-shadow: var(--shadow);
    margin-bottom: 30px;
    transition: transform 0.3s ease;
    position: relative;
    z-index: 1;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(124, 58, 237, 0.3);
}

.info-section:hover {
    transform: translateY(-3px);
}

.info-section h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.5rem;
    font-weight: 700;
}

.info-section p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 20px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-top: 20px;
}

.feature-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px;
    background: linear-gradient(135deg, #1e1b2e 0%, #2d1b3d 100%);
    border-radius: 12px;
    transition: all 0.3s ease;
    cursor: default;
    border: 1px solid rgba(124, 58, 237, 0.3);
}

.feature-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.feature-icon {
    font-size: 2rem;
    margin-bottom: 8px;
    animation: float 3s ease-in-out infinite;
}

.feature-item:nth-child(2) .feature-icon {
    animation-delay: 0.5s;
}

.feature-item:nth-child(3) .feature-icon {
    animation-delay: 1s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.feature-item span:last-child {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 0.9rem;
}

footer {
    text-align: center;
    color: white;
    opacity: 0.9;
    padding: 20px 0;
    font-size: 0.9rem;
    position: relative;
    z-index: 1;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.footer-links {
    margin-bottom: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.footer-links a {
    color: white;
    text-decoration: none;
    transition: opacity 0.3s ease;
    font-size: 0.9rem;
}

.footer-links a:hover {
    opacity: 1;
    text-decoration: underline;
    transform: scale(1.05);
    transition: all 0.2s ease;
}

.footer-links span {
    color: rgba(255, 255, 255, 0.5);
    margin: 0 5px;
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding: 15px;
    }

    .logo {
        font-size: 2.5rem;
    }

    .tagline {
        font-size: 1rem;
    }

    .card {
        padding: 25px 20px;
    }

    .card-header h2 {
        font-size: 1.6rem;
    }

    .form-group input,
    .form-group select {
        padding: 12px 14px;
        font-size: 16px; /* Prevents zoom on iOS */
    }

    .btn-primary {
        padding: 14px;
        font-size: 1rem;
    }
}

@media (max-width: 768px) {
    .features-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .feature-item {
        flex-direction: row;
        justify-content: center;
        gap: 10px;
    }
    
    .feature-icon {
        margin-bottom: 0;
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .money {
        font-size: 1.5rem;
    }
    
    .logo {
        font-size: 2.5rem;
    }
    
    .tagline {
        font-size: 1.1rem;
    }
    
    .sub-tagline {
        font-size: 0.9rem;
    }

    .card {
        padding: 20px 15px;
        border-radius: 15px;
    }

    .card-header h2 {
        font-size: 1.6rem;
    }

    .subtitle {
        font-size: 0.85rem;
    }

    .form-group label {
        font-size: 0.9rem;
    }
    
    .input-hint {
        font-size: 0.8rem;
    }

    .info-section {
        padding: 20px 15px;
    }

    .info-section h3 {
        font-size: 1.2rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .btn-primary {
        font-size: 1rem;
        padding: 16px;
    }
}

/* Loading state */
.loading {
    pointer-events: none;
    opacity: 0.7;
}

/* Success animation */
@keyframes successPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.success {
    animation: successPulse 0.5s ease-in-out;
}

/* Success and Cancel Pages */
.success-card,
.cancel-card {
    text-align: center;
    padding: 50px 30px;
}

.success-icon,
.cancel-icon {
    font-size: 5rem;
    margin-bottom: 20px;
    animation: fadeInUp 0.6s ease-out;
}

.success-card h2 {
    color: var(--success-color);
    font-size: 2rem;
    margin-bottom: 15px;
}

.cancel-card h2 {
    color: var(--danger-color);
    font-size: 2rem;
    margin-bottom: 15px;
}

.success-message,
.cancel-message {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 30px;
    line-height: 1.8;
}

.success-card .btn-primary,
.cancel-card .btn-primary {
    max-width: 300px;
    margin: 0 auto;
}

@media (max-width: 480px) {
    .success-card,
    .cancel-card {
        padding: 40px 20px;
    }

    .success-icon,
    .cancel-icon {
        font-size: 4rem;
    }

    .success-card h2,
    .cancel-card h2 {
        font-size: 1.6rem;
    }
}

/* Telegram Icon Styles */
a[href*="t.me"] svg {
    transition: all 0.3s ease;
}

a[href*="t.me"]:hover svg {
    transform: scale(1.15);
    filter: drop-shadow(0 4px 8px rgba(124, 58, 237, 0.5));
}

a[href*="t.me"]:active svg {
    transform: scale(1.05);
}

/* Stripe Elements - تأكد من وضوح النص */
#payment-element,
#card-element {
    color: #f1f5f9 !important;
}

#card-element .InputElement,
#card-element input {
    color: #f1f5f9 !important;
    background: transparent !important;
}

#card-element .InputElement::placeholder {
    color: #94a3b8 !important;
    opacity: 0.7 !important;
}

/* التأكد من أن جميع عناصر Stripe واضحة */
#card-element * {
    color: #f1f5f9 !important;
}

#card-element .InputElement--empty,
#card-element .InputElement--focus,
#card-element .InputElement--complete {
    color: #f1f5f9 !important;
}
