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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 40px;
    color: white;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    font-weight: 700;
}

header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

.calculator-form {
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
    font-size: 0.95rem;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #fafbfc;
    /* Consistent height across all form elements */
    height: 48px;
    box-sizing: border-box;
    /* Mobile-first dropdown styling */
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    /* Ensure proper touch targets on mobile */
    touch-action: manipulation;
    /* Mobile text alignment - start clean */
    text-align: left;
    line-height: 1.4;
    vertical-align: middle;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group input[type="date"] {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 10px;
    font-size: 16px;
    background: white;
    transition: all 0.3s ease;
    cursor: pointer;
    /* Consistent height with other form elements */
    height: 48px;
    box-sizing: border-box;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    /* Ensure proper touch targets on mobile */
    touch-action: manipulation;
}

.form-group input[type="date"]:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Make it clear that date inputs are calendar-only */
.form-group input[type="date"]::before {
    content: "📅 ";
    margin-right: 5px;
    color: #667eea;
}

/* Disable text selection and show calendar-only behavior */
.form-group input[type="date"] {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Add a subtle hint that this is calendar-only */
.form-group input[type="date"]:hover {
    background-color: #f8f9fa;
}

/* Attempt to hide invalid dates in the calendar dropdown */
.form-group input[type="date"]::-webkit-calendar-picker-indicator {
    background-color: #667eea;
    border-radius: 5px;
    cursor: pointer;
    padding: 5px;
}

/* Custom styling to make it clear dates are restricted */
.form-group input[type="date"]:invalid {
    border-color: #dc3545;
    background-color: #fff5f5;
}

.form-group input[type="date"]:invalid::after {
    content: "⚠️ Invalid date range";
    color: #dc3545;
    font-size: 0.8em;
    position: absolute;
    bottom: -20px;
    left: 0;
}

/* Data cutoff notice */
.data-cutoff-notice {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    margin-bottom: 8px;
    font-size: 0.85em;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.notice-icon {
    font-size: 1.1em;
}

.notice-text {
    font-weight: 500;
}

.date-input-group {
    display: flex;
    flex-direction: column;
    gap: 15px;
    /* Ensure proper layout without stretching */
    width: 100%;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    /* Ensure checkbox group doesn't stretch to full width */
    width: auto;
    align-self: flex-start;
}

.checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
    cursor: pointer;
    /* Ensure proper checkbox appearance across browsers */
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    border: 2px solid #667eea;
    border-radius: 4px;
    background: white;
    position: relative;
    transition: all 0.2s ease;
    /* Prevent checkbox from stretching */
    flex-shrink: 0;
}

.checkbox-group input[type="checkbox"]:checked {
    background: #667eea;
    border-color: #667eea;
}

.checkbox-group input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.checkbox-group input[type="checkbox"]:hover {
    border-color: #5a67d8;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.1);
}

.checkbox-group label {
    margin: 0;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.9rem;
    color: #374151;
    /* Prevent label from stretching */
    white-space: nowrap;
}



.checkbox-group label {
    margin: 0;
    cursor: pointer;
    font-weight: 500;
}

.calculate-btn {
    width: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.calculate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
}

.calculate-btn:active {
    transform: translateY(0);
}

.results {
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.results.hidden {
    display: none;
}

.results h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
    font-size: 1.8rem;
}

.result-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.result-item {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 15px;
    border-left: 4px solid #667eea;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.result-item .label {
    font-size: 0.9rem;
    color: #666;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.result-item .value {
    font-size: 1.3rem;
    font-weight: 700;
    color: #333;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .calculator-form,
    .results {
        padding: 25px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .result-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .calculator-form,
    .results {
        padding: 20px;
    }
    
    header h1 {
        font-size: 1.8rem;
    }
    
    .form-group input,
    .form-group select {
        padding: 10px 14px;
    }
}

/* Animation for results */
.results:not(.hidden) {
    animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Custom styling for date inputs - removed to avoid conflicts with .form-group specific rule */

/* Focus states for better accessibility */
.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Safari-specific fixes for consistent alignment */
@supports (-webkit-appearance: none) {
    .form-group select {
        /* Force consistent height in Safari */
        height: 48px !important;
        line-height: 48px;
        padding-top: 0;
        padding-bottom: 0;
        /* Ensure proper vertical centering */
        display: flex;
        align-items: center;
    }
    
    .form-group input[type="date"] {
        /* Force consistent height in Safari */
        height: 48px !important;
        line-height: 48px;
        padding-top: 0;
        padding-bottom: 0;
        /* Ensure proper vertical centering */
        display: flex;
        align-items: center;
    }
    
    /* Fix Safari dropdown arrow positioning */
    .form-group select::-ms-expand {
        display: none;
    }
    
    .form-group select {
        background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
        background-repeat: no-repeat;
        background-position: right 12px center;
        background-size: 16px;
        padding-right: 40px;
    }
}



/* Hover effects for interactive elements */
.form-group input:hover,
.form-group select:hover {
    border-color: #b8c2e8;
    background: white;
}

/* Disabled state styling */
.form-group select:disabled {
    background: #f5f5f5;
    color: #999;
    cursor: not-allowed;
    border-color: #ddd;
}

.form-group select:disabled:focus {
    border-color: #ddd;
    box-shadow: none;
}

/* Visual connection between investment class and asset */
.form-group:nth-child(2) {
    margin-top: -5px;
}

.form-group:nth-child(2) label {
    color: #667eea;
    font-weight: 700;
}

/* Custom date picker styling */
.custom-date-display {
    width: 100%;
    margin-bottom: 15px;
}

.date-display-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.date-label {
    font-weight: 600;
    color: #555;
    font-size: 0.95rem;
}

.date-value {
    background: #f8f9fa;
    border: 2px solid #e1e5e9;
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 1rem;
    color: #333;
    height: 48px;
    display: flex;
    align-items: center;
    box-sizing: border-box;
}

.date-picker-btn {
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 10px 16px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    align-self: flex-start;
}

.date-picker-btn:hover {
    background: #5a67d8;
    transform: translateY(-1px);
}

/* Custom date picker modal */
.custom-date-picker-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.date-picker-content {
    background: white;
    border-radius: 15px;
    padding: 25px;
    max-width: 400px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

.date-picker-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e1e5e9;
}

.date-picker-header h3 {
    margin: 0;
    color: #333;
    font-size: 1.2rem;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.close-btn:hover {
    background: #f0f0f0;
    color: #333;
}

.date-picker-body {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 25px;
}

.year-selector,
.month-selector,
.day-selector {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.year-selector label,
.month-selector label,
.day-selector label {
    font-weight: 600;
    color: #555;
    font-size: 0.9rem;
}

.year-selector select,
.month-selector select,
.day-selector select {
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 1rem;
    background: white;
    transition: all 0.2s ease;
    height: 48px;
    box-sizing: border-box;
}

.year-selector select:focus,
.month-selector select:focus,
.day-selector select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    outline: none;
}

.date-picker-footer {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
}

.cancel-btn,
.confirm-btn {
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.cancel-btn {
    background: #f8f9fa;
    color: #666;
    border: 2px solid #e1e5e9;
}

.cancel-btn:hover {
    background: #e9ecef;
    color: #333;
}

.confirm-btn {
    background: #667eea;
    color: white;
}

.confirm-btn:hover {
    background: #5a67d8;
    transform: translateY(-1px);
}

/* Enhanced responsive design for mobile and tablet */
@media (max-width: 768px) {
    .calculator-form {
        padding: 30px 20px;
        margin: 20px 10px;
    }
    
    .form-group {
        margin-bottom: 20px;
    }
    
    .form-group label {
        font-size: 0.9rem;
        margin-bottom: 6px;
    }
    
    .form-group input,
    .form-group select {
        /* Mobile-first form styling */
        padding: 12px 16px;
        font-size: 16px; /* Prevent zoom on iOS */
        height: 48px;
        box-sizing: border-box;
        /* Clean mobile text alignment */
        text-align: left;
        line-height: 1.4;
        vertical-align: middle;
    }
    
    .form-group input[type="date"] {
        padding: 10px 14px;
        height: 48px;
    }
    
    /* MOBILE DROPDOWN STYLING - COMPLETE REWRITE */
    .form-group select {
        /* Remove all browser default styling */
        -webkit-appearance: none;
        -moz-appearance: none;
        appearance: none;
        
        /* Custom dropdown arrow */
        background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
        background-repeat: no-repeat;
        background-position: right 16px center;
        background-size: 18px;
        padding-right: 50px;
        
        /* Mobile text positioning - clean approach */
        text-align: left;
        line-height: 1.4;
        vertical-align: middle;
        
        /* Ensure proper display */
        display: block;
        box-sizing: border-box;
        
        /* Mobile-specific adjustments */
        padding-top: 12px;
        padding-bottom: 12px;
        padding-left: 16px;
    }
    
    /* Dropdown option styling */
    .form-group select option {
        padding: 8px 12px;
        text-align: left;
        background: white;
        color: #333;
    }
    
    /* Cross-browser compatibility */
    .form-group select::-ms-expand {
        display: none;
    }
    
    .form-group select:-moz-focusring {
        color: transparent;
        text-shadow: 0 0 0 #000;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    header p {
        font-size: 1rem;
    }
    
    /* Mobile date picker adjustments */
    .date-picker-content {
        padding: 20px;
        margin: 20px;
        width: calc(100% - 40px);
    }
    
    .date-picker-body {
        gap: 15px;
    }
    
    .year-selector select,
    .month-selector select,
    .day-selector select {
        height: 48px; /* Consistent with form elements */
        padding: 10px 14px;
    }
}

@media (max-width: 480px) {
    .calculator-form {
        padding: 25px 15px;
        margin: 15px 5px;
        border-radius: 15px;
    }
    
    .form-group input,
    .form-group select {
        height: 48px;
        box-sizing: border-box;
        /* Clean mobile text alignment for small screens */
        text-align: left;
        line-height: 1.4;
        vertical-align: middle;
        padding: 12px 16px;
    }
    
    /* Small mobile dropdown specific styling */
    .form-group select {
        padding-right: 50px; /* Space for arrow */
        padding-left: 16px;
        padding-top: 12px;
        padding-bottom: 12px;
    }
    
    .form-group input[type="date"] {
        height: 48px;
    }
    
    .checkbox-group {
        padding: 8px 0;
    }
    
    .checkbox-group input[type="checkbox"] {
        width: 20px;
        height: 20px;
    }
    
    /* iPhone-specific adjustments */
    .date-value {
        height: 48px;
        padding: 10px 14px;
    }
    
    .date-picker-btn {
        padding: 8px 14px;
        font-size: 0.85rem;
    }
}

/* Quick links styling */
.quick-links {
    margin: 20px 0;
    text-align: center;
}

.quick-link-btn {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.quick-link-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

/* Page navigation styling */
.page-navigation {
    margin: 20px 0;
    text-align: center;
}

.nav-link {
    display: inline-block;
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 8px 16px;
    border: 2px solid #667eea;
    border-radius: 20px;
    transition: all 0.3s ease;
}

.nav-link:hover {
    background: #667eea;
    color: white;
    transform: translateY(-1px);
}

/* Enhanced Quick Links Styling - Modern Card Design */
.quick-links {
    margin: 30px 0;
    padding: 0;
}

.quick-links-title {
    color: rgba(255, 255, 255, 0.95);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 20px;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.crypto-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 15px;
    max-width: 800px;
    margin: 0 auto;
}

.crypto-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 20px 16px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    text-align: center;
}

.crypto-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.crypto-card:hover::before {
    transform: scaleX(1);
}

.crypto-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin: 0 auto 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    overflow: hidden;
}

.asset-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 50%;
    background: transparent;
}

.crypto-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: #333;
    margin-bottom: 4px;
    transition: color 0.3s ease;
}

.crypto-symbol {
    font-size: 0.8rem;
    color: #666;
    font-weight: 500;
    transition: color 0.3s ease;
}

.crypto-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(102, 126, 234, 0.2);
    background: rgba(255, 255, 255, 1);
}

.crypto-card:hover .crypto-icon {
    transform: scale(1.1);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}

.crypto-card:hover .crypto-name {
    color: #667eea;
}

.crypto-card:hover .crypto-symbol {
    color: #764ba2;
}

/* Tablet responsiveness for crypto grid */
@media (max-width: 1024px) {
    .crypto-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 15px;
        max-width: 600px;
    }
}

/* Mobile responsiveness for crypto grid */
@media (max-width: 768px) {
    .crypto-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        max-width: 400px;
    }
    
    .crypto-card {
        padding: 16px 12px;
    }
    
    .crypto-icon {
        width: 36px;
        height: 36px;
        font-size: 1rem;
        margin-bottom: 10px;
    }
    
    .asset-logo {
        width: 100%;
        height: 100%;
        object-fit: contain;
    }
    
    .crypto-name {
        font-size: 0.9rem;
    }
    
    .crypto-symbol {
        font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    .crypto-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        max-width: 320px;
    }
    
    .crypto-card {
        padding: 14px 10px;
        border-radius: 12px;
    }
    
    .crypto-icon {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
        margin-bottom: 8px;
    }
    
    .asset-logo {
        width: 100%;
        height: 100%;
        object-fit: contain;
    }
    
    .crypto-name {
        font-size: 0.85rem;
        margin-bottom: 2px;
    }
    
    .crypto-symbol {
        font-size: 0.7rem;
    }
}

/* Cryptocurrency Calculators Section - Bottom of Page */
.crypto-calculators-section {
    margin-top: 60px;
    padding: 40px 0;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.crypto-calculators-section .quick-links {
    margin: 0;
    padding: 0 20px;
    max-width: 800px;
    margin: 0 auto;
}

.crypto-calculators-section .quick-links-title {
    color: rgba(255, 255, 255, 0.95);
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 25px;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.crypto-calculators-section .crypto-grid {
    max-width: 800px;
    margin: 0 auto;
}

.stock-calculators-section .stock-grid {
    max-width: 800px;
    margin: 0 auto;
}

.etf-calculators-section .etf-grid {
    max-width: 800px;
    margin: 0 auto;
}

/* Ensure proper spacing from main calculator */
main {
    margin-bottom: 0;
}

.results {
    margin-bottom: 0;
}

/* Mobile responsiveness for bottom section */
@media (max-width: 768px) {
    .crypto-calculators-section {
        margin-top: 40px;
        padding: 30px 0;
    }
    
    .crypto-calculators-section .quick-links {
        padding: 0 25px;
    }
    
    .crypto-calculators-section .quick-links-title {
        font-size: 1.1rem;
        margin-bottom: 20px;
    }
}

@media (max-width: 480px) {
    .crypto-calculators-section {
        margin-top: 30px;
        padding: 25px 0;
    }
    
    .crypto-calculators-section .quick-links {
        padding: 0 20px;
    }
    
    .crypto-calculators-section .quick-links-title {
        font-size: 1rem;
        margin-bottom: 18px;
        letter-spacing: 1px;
    }
}

/* Stock Calculators Section - Bottom of Page */
.stock-calculators-section {
    margin-top: 40px;
    padding: 40px 0;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.stock-calculators-section .quick-links {
    margin: 0;
    padding: 0 20px;
    max-width: 800px;
    margin: 0 auto;
}

.stock-calculators-section .quick-links-title {
    color: rgba(255, 255, 255, 0.95);
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 25px;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.stock-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 15px;
    max-width: 800px;
    margin: 0 auto;
}

.stock-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 20px 16px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    text-align: center;
}

.stock-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.stock-card:hover::before {
    transform: scaleX(1);
}

.stock-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin: 0 auto 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    overflow: hidden;
}

.stock-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: #333;
    margin-bottom: 4px;
    transition: color 0.3s ease;
}

.stock-symbol {
    font-size: 0.8rem;
    color: #666;
    font-weight: 500;
    transition: color 0.3s ease;
}

.stock-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(102, 126, 234, 0.2);
    background: rgba(255, 255, 255, 1);
}

.stock-card:hover .stock-icon {
    transform: scale(1.1);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}

.stock-card:hover .stock-name {
    color: #667eea;
}

.stock-card:hover .stock-symbol {
    color: #764ba2;
}

/* Tablet responsiveness for stock grid */
@media (max-width: 1024px) {
    .stock-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 15px;
        max-width: 600px;
    }
}

/* Mobile responsiveness for stock grid */
@media (max-width: 768px) {
    .stock-calculators-section {
        margin-top: 40px;
        padding: 30px 0;
    }
    
    .stock-calculators-section .quick-links {
        padding: 0 25px;
    }
    
    .stock-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        max-width: 400px;
    }
    
    .stock-card {
        padding: 16px 12px;
    }
    
    .stock-icon {
        width: 36px;
        height: 36px;
        font-size: 1rem;
        margin-bottom: 10px;
    }
    
    .asset-logo {
        width: 100%;
        height: 100%;
        object-fit: contain;
    }
    
    .stock-name {
        font-size: 0.9rem;
    }
    
    .stock-symbol {
        font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    .stock-calculators-section {
        margin-top: 30px;
        padding: 25px 0;
    }
    
    .stock-calculators-section .quick-links {
        padding: 0 20px;
    }
    
    .stock-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        max-width: 320px;
    }
    
    .stock-card {
        padding: 14px 10px;
        border-radius: 12px;
    }
    
    .stock-icon {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
        margin-bottom: 8px;
    }
    
    .asset-logo {
        width: 100%;
        height: 100%;
        object-fit: contain;
    }
    
    .stock-name {
        font-size: 0.85rem;
        margin-bottom: 2px;
    }
    
    .stock-symbol {
        font-size: 0.7rem;
    }
}

/* ETF Calculators Section - Bottom of Page */
.etf-calculators-section {
    margin-top: 40px;
    padding: 40px 0;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.etf-calculators-section .quick-links {
    margin: 0;
    padding: 0 20px;
    max-width: 800px;
    margin: 0 auto;
}

.etf-calculators-section .quick-links-title {
    color: rgba(255, 255, 255, 0.95);
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 25px;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.etf-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 15px;
    max-width: 800px;
    margin: 0 auto;
}

.etf-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 20px 16px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    text-align: center;
}

.etf-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.etf-card:hover::before {
    transform: scaleX(1);
}

.etf-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin: 0 auto 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    overflow: hidden;
}

.etf-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: #333;
    margin-bottom: 4px;
    transition: color 0.3s ease;
}

.etf-symbol {
    font-size: 0.8rem;
    color: #666;
    font-weight: 500;
    transition: color 0.3s ease;
}

.etf-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(102, 126, 234, 0.2);
    background: rgba(255, 255, 255, 1);
}

.etf-card:hover .etf-icon {
    transform: scale(1.1);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}

.etf-card:hover .etf-name {
    color: #667eea;
}

.etf-card:hover .etf-symbol {
    color: #764ba2;
}

/* Tablet responsiveness for etf grid */
@media (max-width: 1024px) {
    .etf-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 15px;
        max-width: 600px;
    }
}

/* Mobile responsiveness for etf grid */
@media (max-width: 768px) {
    .etf-calculators-section {
        margin-top: 40px;
        padding: 30px 0;
    }
    
    .etf-calculators-section .quick-links {
        padding: 0 25px;
    }
    
    .etf-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        max-width: 400px;
    }
    
    .etf-card {
        padding: 16px 12px;
    }
    
    .etf-icon {
        width: 36px;
        height: 36px;
        font-size: 1rem;
        margin-bottom: 10px;
    }
    
    .asset-logo {
        width: 100%;
        height: 100%;
        object-fit: contain;
    }
    
    .etf-name {
        font-size: 0.9rem;
    }
    
    .etf-symbol {
        font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    .etf-calculators-section {
        margin-top: 30px;
        padding: 25px 0;
    }
    
    .etf-calculators-section .quick-links {
        padding: 0 20px;
    }
    
    .etf-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        max-width: 320px;
    }
    
    .etf-card {
        padding: 14px 10px;
        border-radius: 12px;
    }
    
    .etf-icon {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
        margin-bottom: 8px;
    }
    
    .asset-logo {
        width: 100%;
        height: 100%;
        object-fit: contain;
    }
    
    .etf-name {
        font-size: 0.85rem;
        margin-bottom: 2px;
    }
    
    .etf-symbol {
        font-size: 0.7rem;
    }
}
