/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

/* Header Styles */
.header {
    text-align: center;
    margin-bottom: 40px;
    color: white;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 10px;
}

.logo i {
    font-size: 2.5rem;
    color: #ffd700;
}

.logo h1 {
    font-size: 2.5rem;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.logo h1 .domain {
    color: #ffd700;
    font-weight: 600;
}

.tagline {
    font-size: 1.1rem;
    opacity: 0.9;
    font-weight: 300;
}

/* Main Content */
.main-content {
    margin-bottom: 40px;
}

.payment-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
    overflow: hidden;
    animation: slideUp 0.6s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card-header {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    padding: 40px 30px;
    text-align: center;
}

.card-header i {
    font-size: 3rem;
    margin-bottom: 15px;
    opacity: 0.9;
}

.card-header h2 {
    font-size: 2rem;
    margin-bottom: 10px;
    font-weight: 600;
}

.card-header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Form Styles */
.payment-form {
    padding: 40px 30px;
}

.form-section {
    margin-bottom: 35px;
    border-bottom: 1px solid #eee;
    padding-bottom: 30px;
}

.form-section:last-of-type {
    border-bottom: none;
    margin-bottom: 0;
}

.form-section h3 {
    color: #4facfe;
    font-size: 1.3rem;
    margin-bottom: 20px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-section h3 i {
    font-size: 1.1rem;
}

.form-group {
    margin-bottom: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #555;
}

input[type="text"],
input[type="number"],
input[type="month"],
input[type="email"] {
    width: 100%;
    padding: 15px;
    border: 2px solid #e1e5e9;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #fafbfc;
}

input:focus {
    outline: none;
    border-color: #4facfe;
    background: white;
    box-shadow: 0 0 0 3px rgba(79, 172, 254, 0.1);
    transform: translateY(-1px);
}

input:invalid {
    border-color: #ff6b6b;
}

input::placeholder {
    color: #999;
}

/* Payment Method Selector */
.payment-method-selector {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 25px;
}

.payment-option {
    position: relative;
    cursor: pointer;
}

.payment-option input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.option-content {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 20px;
    border: 2px solid #e1e5e9;
    border-radius: 10px;
    background: #fafbfc;
    transition: all 0.3s ease;
    font-weight: 500;
}

.option-content i {
    font-size: 1.2rem;
    color: #4facfe;
}

.payment-option input[type="radio"]:checked + .option-content {
    border-color: #4facfe;
    background: #f0f9ff;
    color: #4facfe;
}

.payment-option:hover .option-content {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* Payment Fields */
.payment-fields {
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.bank-info {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
}

.bank-info h4 {
    color: #4facfe;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.bank-info p {
    margin-bottom: 8px;
    font-size: 0.95rem;
}

/* Form Actions */
.form-actions {
    text-align: center;
    padding-top: 20px;
}

.pay-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 18px 40px;
    font-size: 1.2rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}

.pay-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.5);
}

.pay-button:active {
    transform: translateY(-1px);
}

.security-note {
    margin-top: 15px;
    color: #666;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.security-note i {
    color: #28a745;
}

/* Success Message */
.success-message {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
    animation: slideUp 0.6s ease-out;
}

.success-content {
    padding: 50px 30px;
    text-align: center;
}

.success-content i {
    font-size: 4rem;
    color: #28a745;
    margin-bottom: 20px;
}

.success-content h3 {
    font-size: 2rem;
    color: #28a745;
    margin-bottom: 15px;
    font-weight: 600;
}

.success-content p {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 30px;
}

.payment-summary {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 25px;
    margin: 30px 0;
    text-align: left;
}

.payment-summary h4 {
    color: #4facfe;
    margin-bottom: 15px;
    font-size: 1.2rem;
    text-align: center;
}

.payment-summary p {
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
}

.payment-summary strong {
    color: #333;
}

.new-payment-btn {
    background: #4facfe;
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.new-payment-btn:hover {
    background: #3d8bfe;
    transform: translateY(-2px);
}

/* Footer */
.footer {
    text-align: center;
    color: white;
    font-size: 0.9rem;
    opacity: 0.9;
    padding: 20px 0;
}

.footer-links {
    margin: 15px 0;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer a {
    color: #ffd700;
    text-decoration: none;
    transition: all 0.3s ease;
    padding: 5px 10px;
    border-radius: 15px;
}

.footer a:hover {
    background: rgba(255, 215, 0, 0.2);
    transform: translateY(-1px);
}

/* Mobile-optimized contact tooltip */
.footer-links a[title] {
    position: relative;
    cursor: help;
}

/* Tooltip for desktop (hover) */
@media (hover: hover) and (pointer: fine) {
    .footer-links a[title]:hover::after {
        content: attr(title);
        position: absolute;
        bottom: 100%;
        left: 50%;
        transform: translateX(-50%);
        background: #333;
        color: white;
        padding: 8px 12px;
        border-radius: 6px;
        font-size: 0.8rem;
        white-space: nowrap;
        z-index: 1000;
        margin-bottom: 5px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.2);
        animation: fadeInTooltip 0.2s ease-out;
    }
}

/* Mobile tooltip - show on focus/active */
@media (hover: none) or (pointer: coarse) {
    .footer-links a[title]:active::after,
    .footer-links a[title]:focus::after {
        content: attr(title);
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        background: #333;
        color: white;
        padding: 12px 16px;
        border-radius: 8px;
        font-size: 0.9rem;
        white-space: normal;
        max-width: 280px;
        text-align: center;
        z-index: 1000;
        box-shadow: 0 4px 20px rgba(0,0,0,0.3);
        animation: fadeInTooltip 0.3s ease-out;
        line-height: 1.4;
    }
    
    .footer-links a[title] {
        -webkit-tap-highlight-color: rgba(255, 215, 0, 0.3);
        outline: none;
    }
}

@keyframes fadeInTooltip {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

.footer-note {
    font-size: 0.8rem;
    opacity: 0.7;
    font-style: italic;
    margin-top: 10px;
}

/* Modal Styles */
/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .logo h1 {
        font-size: 2rem;
    }
    
    .card-header {
        padding: 30px 20px;
    }
    
    .card-header h2 {
        font-size: 1.5rem;
    }
    
    .payment-form {
        padding: 30px 20px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .payment-method-selector {
        grid-template-columns: 1fr;
    }
    
    .pay-button {
        padding: 15px 30px;
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .logo {
        flex-direction: column;
        gap: 10px;
    }
    
    .logo h1 {
        font-size: 1.8rem;
    }
    
    .card-header i {
        font-size: 2.5rem;
    }
    
    .form-section h3 {
        font-size: 1.1rem;
    }
    
    .pay-button {
        width: 100%;
        justify-content: center;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 10px;
    }
}

/* Legal Pages Styles */
.legal-content {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    padding: 3rem;
    margin: 2rem auto;
    max-width: 900px;
    line-height: 1.8;
}

.legal-content h1 {
    color: #333;
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    border-bottom: 3px solid #667eea;
    padding-bottom: 0.5rem;
}

.legal-content h2 {
    color: #444;
    font-size: 1.5rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    padding-left: 1rem;
    border-left: 4px solid #667eea;
}

.legal-content h3 {
    color: #555;
    font-size: 1.2rem;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.legal-content h4 {
    color: #666;
    font-size: 1.1rem;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}

.legal-content p {
    margin-bottom: 1rem;
    color: #666;
}

.legal-content ul, .legal-content ol {
    margin: 1rem 0;
    padding-left: 2rem;
}

.legal-content li {
    margin-bottom: 0.5rem;
    color: #666;
}

.legal-content a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
}

.legal-content a:hover {
    text-decoration: underline;
}

.contact-section {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 2rem;
    margin: 2rem 0;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.contact-item {
    text-align: center;
    padding: 1rem;
}

.contact-item i {
    font-size: 2rem;
    color: #667eea;
    margin-bottom: 0.5rem;
}

.contact-item h4 {
    color: #333;
    margin-bottom: 0.5rem;
}

.contact-item p {
    color: #666;
    font-size: 0.9rem;
}

.back-link {
    margin-top: 3rem;
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #eee;
}

.btn-secondary {
    display: inline-block;
    padding: 0.75rem 2rem;
    background: #6c757d;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Legal Pages Mobile Responsiveness */
@media (max-width: 768px) {
    .legal-content {
        padding: 2rem 1.5rem;
        margin: 1rem;
    }
    
    .legal-content h1 {
        font-size: 2rem;
    }
    
    .legal-content h2 {
        font-size: 1.3rem;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-section {
        padding: 1.5rem;
    }
}