.nav-dropdown {
    position: absolute;
}

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

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: #1f2937;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

.slide-in-right {
    animation: slideInRight 0.6s ease-out;
}

/* Premium gradient backgrounds */
.gradient-bg-1 {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.gradient-bg-2 {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.gradient-bg-3 {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

/* Custom button styles */
.btn-primary {
    background: linear-gradient(135deg, #1e40af 0%, #7c3aed 100%);
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(30, 64, 175, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(30, 64, 175, 0.4);
}

.btn-secondary {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(5, 150, 105, 0.3);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(5, 150, 105, 0.4);
}

/* Card hover effects */
.card-hover {
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.card-hover:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
    border-color: rgba(30, 64, 175, 0.1);
}

/* Premium calculator cards */
.calculator-card {
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease;
}

.calculator-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.calculator-card:hover::before {
    left: 100%;
}

.calculator-card:hover {
    transform: translateY(-5px) scale(1.02);
}

/* Loading spinner */
.spinner {
    border: 4px solid #f3f4f6;
    border-top: 4px solid #1e40af;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

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

/* Form styles */
.form-input {
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 16px 20px;
    font-size: 16px;
    transition: all 0.3s ease;
    width: 100%;
    background: #ffffff;
}

.form-input:focus {
    outline: none;
    border-color: #1e40af;
    box-shadow: 0 0 0 4px rgba(30, 64, 175, 0.1);
    background: #fafbff;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #374151;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Result display */
.result-box {
    background: linear-gradient(135deg, #1e40af 0%, #7c3aed 100%);
    color: white;
    padding: 32px;
    border-radius: 20px;
    text-align: center;
    margin-top: 24px;
    box-shadow: 0 20px 40px rgba(30, 64, 175, 0.3);
}

.result-amount {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 12px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.result-label {
    font-size: 1.2rem;
    opacity: 0.9;
    font-weight: 500;
}

/* Tax breakdown styles */
.tax-breakdown {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 24px;
    margin-top: 24px;
}

.breakdown-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #e2e8f0;
    font-weight: 500;
}

.breakdown-item:last-child {
    border-bottom: none;
    font-weight: 700;
    font-size: 1.1rem;
    color: #1e40af;
}

/* Affiliate product cards */
.affiliate-card {
    position: relative;
    background: white;
    border-radius: 20px;
    padding: 32px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.affiliate-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
    border-color: #1e40af;
}

.affiliate-badge {
    position: absolute;
    top: -10px;
    right: 20px;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Star ratings */
.star-rating {
    display: flex;
    gap: 2px;
    margin-bottom: 12px;
}

.star {
    color: #fbbf24;
    font-size: 18px;
}

/* Price display */
.price-display {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.current-price {
    font-size: 2rem;
    font-weight: 800;
    color: #059669;
}

.original-price {
    font-size: 1.2rem;
    color: #6b7280;
    text-decoration: line-through;
}

.discount-badge {
    background: #fef2f2;
    color: #dc2626;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
}

/* Modal styles */
.modal-backdrop {
    backdrop-filter: blur(8px);
    background: rgba(0, 0, 0, 0.6);
}

.modal-content {
    max-height: 90vh;
    overflow-y: auto;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #1e40af 0%, #7c3aed 100%);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #1d4ed8 0%, #8b5cf6 100%);
}

/* Google Ads responsive */
.adsbygoogle {
    display: block;
    margin: 24px auto;
    border-radius: 12px;
    overflow: hidden;
}

/* Country flags */
.country-flag {
    width: 24px;
    height: 18px;
    border-radius: 2px;
    margin-right: 8px;
}

/* Calculator specific styles */
.calculator-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-top: 32px;
}

.calculator-input-group {
    margin-bottom: 24px;
}

.calculator-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 16px;
    padding-right: 48px;
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding-left: 16px;
        padding-right: 16px;
    }
    
    .result-amount {
        font-size: 2rem;
    }
    
    .calculator-card {
        padding: 24px;
    }
    
    .affiliate-card {
        padding: 24px;
    }
    
    .hero-title {
        font-size: 3rem;
    }
}

@media (max-width: 640px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .result-amount {
        font-size: 1.8rem;
    }
}

/* Print styles */
@media print {
    .no-print {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .result-box {
        background: white;
        color: black;
        border: 2px solid black;
    }
}

/* Accessibility improvements */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus styles for better accessibility */
button:focus,
a:focus,
input:focus,
select:focus {
    outline: 2px solid #1e40af;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .card-hover {
        border: 2px solid #000;
    }
    
    .btn-primary {
        background: #000;
        color: #fff;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .form-input {
        background: #1f2937;
        border-color: #374151;
        color: #f9fafb;
    }
    
    .tax-breakdown {
        background: #1f2937;
        border-color: #374151;
    }
}

/* Utility classes */
.text-shadow {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.gradient-text {
    background: linear-gradient(135deg, #1e40af 0%, #7c3aed 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.glass-effect {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Error and success messages */
.alert {
    padding: 16px 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    font-weight: 500;
}

.alert-error {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    color: #dc2626;
    border: 1px solid #fecaca;
}

.alert-success {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    color: #16a34a;
    border: 1px solid #bbf7d0;
}

.alert-info {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    color: #2563eb;
    border: 1px solid #bfdbfe;
}

.alert-warning {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    color: #d97706;
    border: 1px solid #fed7aa;
}