:root {
    --primary: #ff6b6b;
    --secondary: #4ecdc4;
    --accent: #ffe66d;
    --bg-bright: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --bg-gradient: radial-gradient(at 40% 20%, hsla(330,100%,74%,0.2) 0px, transparent 50%),
                  radial-gradient(at 80% 0%, hsla(180,100%,56%,0.2) 0px, transparent 50%),
                  radial-gradient(at 0% 50%, hsla(60,100%,93%,0.2) 0px, transparent 50%),
                  radial-gradient(at 80% 50%, hsla(300,100%,76%,0.2) 0px, transparent 50%),
                  radial-gradient(at 0% 100%, hsla(120,100%,77%,0.2) 0px, transparent 50%),
                  radial-gradient(at 80% 100%, hsla(240,100%,70%,0.2) 0px, transparent 50%),
                  radial-gradient(at 0% 0%, hsla(30,100%,76%,0.2) 0px, transparent 50%);
    --card-bg: rgba(255, 255, 255, 0.9);
    --text-dark: #2d3748;
    --text-muted: #718096;
    --border-glow: rgba(255, 107, 107, 0.4);
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-bright);
    background-image: var(--bg-gradient);
    color: var(--text-dark);
    margin: 0;
    padding: 40px 20px;
    min-height: 100vh;
    overflow-x: hidden;
}

header h1 {
    text-align: center;
    font-size: 3rem;
    font-weight: 800;
    background: linear-gradient(90deg, var(--primary), var(--secondary), var(--accent));
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientShift 3s ease-in-out infinite;
    margin-bottom: 40px;
    text-shadow: 0 0 20px rgba(255, 107, 107, 0.5);
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    max-width: 1400px;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 0 10px;
    }
    header h1 {
        font-size: 2.5rem;
    }
    body {
        padding: 20px 10px;
    }
}

.tool-card {
    background: var(--card-bg);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-radius: 24px;
    padding: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3),
                inset 0 1px 0 rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}
.tool-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--secondary), var(--accent));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.tool-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4),
                0 0 40px var(--border-glow),
                inset 0 1px 0 rgba(255, 255, 255, 0.2);
    border-color: rgba(168, 85, 247, 0.3);
}

.tool-card:hover::before {
    opacity: 1;
}

/* Color Stripes - Now neon glows */
#currency-tool { box-shadow: 0 0 20px rgba(16, 185, 129, 0.2); }
#loan-tool { box-shadow: 0 0 20px rgba(59, 130, 246, 0.2); }
#savings-tool { box-shadow: 0 0 20px rgba(236, 72, 153, 0.2); }
#unit-tool { box-shadow: 0 0 20px rgba(6, 182, 212, 0.2); }
#bmi-tool { box-shadow: 0 0 20px rgba(245, 158, 11, 0.2); }
#math-tool { box-shadow: 0 0 20px rgba(139, 92, 246, 0.2); }

.full-width {
    grid-column: 1 / -1;
}

input, select {
    width: 100%;
    padding: 14px;
    margin: 12px 0;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.9);
    color: var(--text-dark);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

input:focus, select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 20px rgba(255, 107, 107, 0.3);
    background: rgba(255, 255, 255, 0.9);
}

.input-row {
    display: flex;
    gap: 10px;
    align-items: center;
}

.icon-btn {
    width: 50px;
    background: rgba(255, 255, 255, 0.9);
    color: var(--text-dark);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.icon-btn:hover {
    background: var(--primary);
    box-shadow: 0 0 15px rgba(168, 85, 247, 0.5);
    transform: scale(1.05);
}

.to-label {
    font-weight: 600;
    color: var(--text-muted);
}

.primary-btn {
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    font-weight: 700;
    cursor: pointer;
    margin-top: 15px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.primary-btn::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;
}

.primary-btn:hover::before {
    left: 100%;
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(168, 85, 247, 0.4);
}

.result-box {
    margin-top: 25px;
    padding: 18px;
    border-radius: 12px;
    background: rgba(168, 85, 247, 0.1);
    border: 1px solid rgba(168, 85, 247, 0.3);
    color: var(--primary);
    text-align: center;
    font-weight: 800;
    font-size: 1.2rem;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.result-box:hover {
    background: rgba(168, 85, 247, 0.2);
    box-shadow: 0 0 20px rgba(168, 85, 247, 0.3);
}

/* Calculator Grid */
.calc-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-top: 15px;
}

.calc-grid button {
    padding: 16px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.9);
    color: var(--text-dark);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.calc-grid button:hover {
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.1);
}

.sci-btn {
    background: rgba(139, 92, 246, 0.2) !important;
    border-color: rgba(139, 92, 246, 0.3) !important;
}

.sci-btn:hover {
    background: rgba(139, 92, 246, 0.4) !important;
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.5) !important;
}

.equal-btn {
    background: linear-gradient(135deg, var(--primary), var(--accent)) !important;
    color: white !important;
    border: none !important;
}

.equal-btn:hover {
    box-shadow: 0 0 25px rgba(168, 85, 247, 0.6) !important;
    transform: scale(1.05) !important;
}

.clear-btn {
    background: rgba(252, 165, 165, 0.2) !important;
    color: #fca5a5 !important;
    border-color: rgba(252, 165, 165, 0.3) !important;
}

.clear-btn:hover {
    background: rgba(252, 165, 165, 0.4) !important;
    box-shadow: 0 0 20px rgba(252, 165, 165, 0.5) !important;
}

/* History */
#history-list {
    list-style: none;
    padding: 0;
    max-height: 250px;
    overflow-y: auto;
}

#history-list li {
    padding: 12px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 10px;
    margin-bottom: 10px;
    border-left: 4px solid var(--primary);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

#history-list li:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(5px);
}

.secondary-btn {
    background: rgba(255, 255, 255, 0.9);
    color: var(--text-dark);
    border: 1px solid rgba(0, 0, 0, 0.1);
    padding: 12px 24px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.secondary-btn:hover {
    background: rgba(148, 163, 184, 0.4);
    box-shadow: 0 0 20px rgba(148, 163, 184, 0.5);
    transform: translateY(-2px);
}
