* {
    font-family: 'Inter', sans-serif;
}

body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.calculator-container {
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    background: white;
    border-radius: 24px;
    overflow: hidden;
}

.input-group {
    transition: all 0.2s ease;
}

.input-group:focus-within {
    transform: translateY(-2px);
}

.input-field {
    transition: all 0.3s ease;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 12px 16px;
    width: 100%;
}

.input-field:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
    outline: none;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    font-weight: 600;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px -10px rgba(102, 126, 234, 0.6);
}

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

.btn-secondary {
    background: linear-gradient(135deg, #4b5563 0%, #1f2937 100%);
    transition: all 0.3s ease;
    border-radius: 12px;
    font-weight: 600;
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px -10px rgba(75, 85, 99, 0.5);
}

.result-card {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border-left: 6px solid #10b981;
    border-radius: 16px;
    padding: 20px;
}

.explanation-card {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border-left: 6px solid #3b82f6;
    border-radius: 16px;
    padding: 20px;
}

.percentage-btn {
    transition: all 0.3s ease;
    border-radius: 12px;
    padding: 12px 8px;
    font-weight: 500;
}

.percentage-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -5px rgba(102, 126, 234, 0.5);
}

.percentage-btn:not(.active):hover {
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    transform: translateY(-1px);
}

.visual-bar {
    height: 30px;
    border-radius: 15px;
    overflow: hidden;
    position: relative;
    background: #e5e7eb;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.bar-fill {
    height: 100%;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.bar-fill.bg-indigo-500 {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
}

.bar-fill.bg-blue-500 {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

.bar-fill.bg-green-500 {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.bar-fill.bg-red-500 {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.formula-box {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-left: 4px solid #3b82f6;
    padding: 12px 16px;
    border-radius: 12px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.stat-card {
    background: linear-gradient(135deg, #ffffff 0%, #f9fafb 100%);
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.2);
}

.toast-message {
    animation: slideIn 0.3s ease, fadeOut 0.3s ease 2.7s;
    border-radius: 12px;
    padding: 12px 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}

.progress-ring {
    transition: stroke-dashoffset 0.5s ease;
}

.glow {
    animation: glow 1s ease;
}

@keyframes glow {

    0%,
    100% {
        box-shadow: 0 0 0 rgba(102, 126, 234, 0.4);
    }

    50% {
        box-shadow: 0 0 30px rgba(102, 126, 234, 0.8);
    }
}

.floating-action {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 50;
}

@media print {
    .no-print {
        display: none !important;
    }

    body {
        background: white;
    }

    .calculator-container {
        box-shadow: none;
    }
}

.loading-spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: spin 1s linear infinite;
}

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

    100% {
        transform: rotate(360deg);
    }
}