/**
 * Main stylesheet for FA Calculator
 * Base styles, layout, and core components
 */

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100'%3E%3Ctext x='25' y='30' fill='orange' font-size='9' font-family='sans-serif' opacity='0.15' text-anchor='middle' transform='rotate(-45 25 30)'%3Emoneydoot%3C/text%3E%3Ctext x='80' y='20' fill='orange' font-size='8' font-family='sans-serif' opacity='0.15' text-anchor='middle' transform='rotate(-45 80 20)'%3Emoneydoot%3C/text%3E%3Ctext x='55' y='80' fill='orange' font-size='8' font-family='sans-serif' opacity='0.15' text-anchor='middle' transform='rotate(-45 55 80)'%3Emoneydoot%3C/text%3E%3C/svg%3E") repeat, linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* Background animations */
.money-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

.money-symbol {
    position: absolute;
    font-family: 'Times New Roman', serif;
    font-weight: bold;
    color: rgba(255, 255, 255, 0.12);
    user-select: none;
    animation: float 20s infinite linear;
}

.money-symbol:nth-child(1) {
    top: 10%;
    left: 5%;
    font-size: 80px;
    animation-delay: 0s;
}

.money-symbol:nth-child(2) {
    top: 15%;
    left: 85%;
    font-size: 70px;
    animation-delay: -2s;
}

.money-symbol:nth-child(3) {
    top: 35%;
    left: 15%;
    font-size: 90px;
    animation-delay: -4s;
}

.money-symbol:nth-child(4) {
    top: 25%;
    left: 70%;
    font-size: 65px;
    animation-delay: -6s;
}

.money-symbol:nth-child(5) {
    top: 55%;
    left: 10%;
    font-size: 75px;
    animation-delay: -8s;
}

.money-symbol:nth-child(6) {
    top: 45%;
    left: 80%;
    font-size: 85px;
    animation-delay: -10s;
}

.money-symbol:nth-child(7) {
    top: 70%;
    left: 25%;
    font-size: 95px;
    animation-delay: -12s;
}

.money-symbol:nth-child(8) {
    top: 75%;
    left: 65%;
    font-size: 60px;
    animation-delay: -14s;
}

.money-symbol:nth-child(9) {
    top: 85%;
    left: 45%;
    font-size: 80px;
    animation-delay: -16s;
}

.money-symbol:nth-child(10) {
    top: 5%;
    left: 50%;
    font-size: 70px;
    animation-delay: -18s;
}

@keyframes float {
    0% {
        transform: translateY(0px) rotate(0deg);
        opacity: 0.12;
    }

    25% {
        transform: translateY(-20px) rotate(90deg);
        opacity: 0.08;
    }

    50% {
        transform: translateY(-10px) rotate(180deg);
        opacity: 0.15;
    }

    75% {
        transform: translateY(-30px) rotate(270deg);
        opacity: 0.06;
    }

    100% {
        transform: translateY(0px) rotate(360deg);
        opacity: 0.12;
    }
}

/* Container and layout */
.container {
    max-width: 2400px;
    margin: 0 auto;
    padding: 20px;
}

.main-layout {
    margin-right: 260px;
}

.content-area {
    width: 100%;
}

/* Header styles */
.header {
    text-align: center;
    color: white;
    margin-bottom: 30px;
    margin-right: 260px;
    padding-right: 20px;
}

.header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow:
        2px 2px 4px rgba(0, 0, 0, 0.3),
        0 0 20px rgba(255, 255, 255, 0.2);
    position: relative;
}

.header h1::before {
    content: "";
    position: absolute;
    left: -60px;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath d='M50 20 C20 20 10 60 10 75 A40 25 0 0 0 90 75 C90 60 80 20 50 20 Z' fill='%23FDE047' stroke='%23CA8A04' stroke-width='4'/%3E%3Cpath d='M40 5 L30 20 L70 20 L60 5 Z' fill='%23FDE047' stroke='%23CA8A04' stroke-width='4'/%3E%3Cpath d='M30 20 Q50 30 70 20' fill='none' stroke='%23CA8A04' stroke-width='4'/%3E%3Ctext x='50' y='75' font-family='Arial' font-weight='bold' font-size='45' text-anchor='middle' fill='%23CA8A04'%3E%E2%82%B9%3C/text%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    opacity: 0.7;
    animation: float-header 3s ease-in-out infinite;
}

.header h1::after {
    content: "📊";
    position: absolute;
    right: -60px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 2rem;
    opacity: 0.7;
    animation: float-header 3s ease-in-out infinite reverse;
}

@keyframes float-header {

    0%,
    100% {
        transform: translateY(-50%) translateX(0px);
    }

    50% {
        transform: translateY(-50%) translateX(-10px);
    }
}

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

/* Main card */
.main-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 250, 252, 0.98) 100%);
    border-radius: 15px;
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
    padding: 40px;
    margin-bottom: 30px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Form sections */
.form-section {
    margin-bottom: 30px;
}

.form-section h2 {
    color: #4a5568;
    margin-bottom: 20px;
    font-size: 1.5rem;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 10px;
}

/* Input groups */
.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #4a5568;
}

.input-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

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

/* Loading spinner */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

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

/* Custom Select Styles */
.custom-select-wrapper {
    position: relative;
    width: 100%;
    user-select: none;
}

.custom-select {
    position: relative;
    padding: 8px;
    border-radius: 4px;
    border: 1px solid #ccc;
    background: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.custom-select.disabled {
    background-color: #e9ecef;
    cursor: not-allowed;
    opacity: 0.7;
}

.custom-select-options {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    z-index: 99;
    max-height: 250px;
    overflow-y: auto;
    display: none;
    margin-top: 4px;
}

.custom-select-options.show {
    display: block;
}

.custom-option {
    padding: 10px;
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: background 0.2s;
}

.custom-option:hover {
    background-color: #f0f4f8;
}

.custom-option img, .custom-select img {
    width: 20px;
    height: 20px;
    margin-right: 10px;
    object-fit: contain;
}