/* styles.css - Sophisticated & Elegant Theme */

/* 1. Reset & Base */
:root {
    /* Primary Brand Gradient */
    --gradient-primary: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    /* Indigo to Violet */
    --gradient-accent: linear-gradient(135deg, #ec4899 0%, #f43f5e 100%);
    /* Pink to Rose */
    --gradient-success: linear-gradient(135deg, #10b981 0%, #059669 100%);
    /* Emerald */
    --gradient-surface: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);

    /* Colors */
    --color-text-primary: #1e293b;
    /* Slate 800 */
    --color-text-secondary: #475569;
    /* Slate 600 */
    --color-border: #e2e8f0;
    --color-bg: #f8fafc;
    /* Slate 50 */

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-glow: 0 0 20px rgba(79, 70, 229, 0.15);

    /* Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.9);
    --glass-border: 1px solid rgba(255, 255, 255, 0.5);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.05);
}

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

body {
    background-color: var(--color-bg);
    background-image:
        radial-gradient(at 0% 0%, rgba(79, 70, 229, 0.03) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(236, 72, 153, 0.03) 0px, transparent 50%);
    background-attachment: fixed;
    font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
    color: var(--color-text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* 2. Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    color: #0f172a;
    /* Slate 900 */
    letter-spacing: -0.025em;
}

h1 {
    line-height: 1.1;
}

/* 3. Components */

/* Elegant Card */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: var(--glass-border);
    box-shadow: var(--glass-shadow);
    border-radius: 1rem;
    /* 16px */
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease;
}

.glass-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px 0 rgba(31, 38, 135, 0.08);
}

/* Inputs */
input[type="number"],
input[type="text"],
select,
textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--color-text-primary);
    background-color: #fff;
    border: 1px solid #cbd5e1;
    /* Slate 300 */
    border-radius: 0.5rem;
    transition: all 0.2s ease-in-out;
    box-shadow: var(--shadow-sm);
}

/* Input Groups */
.input-group {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.input-icon {
    position: absolute;
    left: 12px;
    z-index: 10;
    color: #94a3b8;
    /* Slate 400 */
    pointer-events: none;
    transition: color 0.2s;
}

.input-group:focus-within .input-icon {
    color: #6366f1;
    /* Indigo 500 */
}

.input-with-icon {
    padding-left: 2.5rem !important;
    /* Make room for icon */
}

/* Adornments (Right side) */
.input-suffix {
    position: absolute;
    right: 12px;
    z-index: 10;
    color: #64748b;
    font-size: 0.875rem;
    font-weight: 600;
    pointer-events: none;
    background: rgba(255, 255, 255, 0.8);
    /* Slight backdrop */
    padding-left: 4px;
}

/* Gradient Focus Ring */
input:focus {
    border-color: transparent !important;
    background-image: linear-gradient(white, white), var(--gradient-primary);
    background-origin: border-box;
    background-clip: padding-box, border-box;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15) !important;
}

input:hover {
    border-color: #94a3b8;
    /* Slate 400 */
}

/* Form Grid */
.form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
}

@media (min-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr 1fr;
    }

    .form-grid-full {
        grid-column: 1 / -1;
    }
}

label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-text-secondary);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Buttons */
.btn-primary {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    font-size: 1rem;
    color: white;
    background: var(--gradient-primary);
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    box-shadow: 0 4px 6px -1px rgba(79, 70, 229, 0.3);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-primary:hover {
    box-shadow: 0 10px 15px -3px rgba(79, 70, 229, 0.4);
    transform: translateY(-1px);
}

.btn-secondary {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    font-size: 1rem;
    color: #475569;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #1e293b;
}

.btn-accent {
    background: var(--gradient-accent);
    color: white;
    box-shadow: 0 4px 6px -1px rgba(244, 63, 94, 0.3);
}

.btn-accent:hover {
    box-shadow: 0 10px 15px -3px rgba(244, 63, 94, 0.4);
}

/* Table */
.table-container {
    overflow: hidden;
    border-radius: 0.75rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--color-border);
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

th {
    background: #f8fafc;
    color: var(--color-text-secondary);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
    padding: 1rem;
    text-align: left;
    border-bottom: 2px solid var(--color-border);
}

td {
    padding: 1rem;
    border-bottom: 1px solid var(--color-border);
    font-size: 0.9rem;
    color: #334155;
}

tr:last-child td {
    border-bottom: none;
}

tr:hover td {
    background-color: #f8fafc;
}

/* Utility */
.text-gradient {
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-image: var(--gradient-primary);
}

.text-gradient-accent {
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-image: var(--gradient-accent);
}

/* Animations */
@keyframes float {
    0% {
        transform: translateY(0px);
    }

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

    100% {
        transform: translateY(0px);
    }
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

/* Custom Range Slider */
input[type=range] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    background: transparent;
}

input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    height: 16px;
    width: 16px;
    border-radius: 50%;
    background: #4f46e5;
    cursor: pointer;
    margin-top: -6px;
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
}

input[type=range]::-webkit-slider-runnable-track {
    width: 100%;
    height: 4px;
    cursor: pointer;
    background: #e2e8f0;
    border-radius: 2px;
}
/* --- Goal Reverser Styles --- */
.hero-input {
    background: transparent;
    border: none;
    border-bottom: 2px solid #e2e8f0;
    text-align: center;
    color: var(--color-text-primary);
    font-size: 3rem;
    font-weight: 800;
    width: 100%;
    padding: 10px 0;
    transition: all 0.3s ease;
}

.hero-input:focus {
    outline: none;
    border-bottom-color: #6366f1; /* Indigo 500 */
    transform: scale(1.02);
}

.pill-input {
    display: inline-flex;
    align-items: center;
    background-color: white;
    box-shadow: var(--shadow-sm);
    border-radius: 9999px;
    padding: 8px 20px;
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
}

.pill-input:focus-within {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.pill-input label {
    margin-right: 8px;
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    margin-bottom: 0;
    text-transform: none;
    letter-spacing: normal;
    font-weight: 500;
}

.pill-input input {
    background: transparent;
    border: none;
    color: var(--color-text-primary);
    width: 60px;
    padding: 0;
    box-shadow: none;
    font-weight: 700;
    text-align: right;
}

.pill-input input:focus {
    outline: none;
    box-shadow: none;
}

/* Staircase Visualization */
.staircase-container {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    height: 300px;
    padding: 20px;
    gap: 6px;
    background: rgba(255,255,255,0.5);
    border-radius: 1rem;
    border: 1px solid var(--color-border);
}

.stair-step {
    flex-grow: 1;
    background-image: linear-gradient(to top, #4f46e5, #818cf8);
    border-radius: 6px 6px 0 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    cursor: pointer;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.stair-step:hover {
    transform: translateY(-4px) scale(1.02);
    background-image: linear-gradient(to top, #4338ca, #6366f1);
    box-shadow: 0 10px 15px -3px rgba(79, 70, 229, 0.3);
}

.stair-step .tooltip {
    visibility: hidden;
    width: max-content;
    background-color: #1e293b;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 8px 12px;
    position: absolute;
    z-index: 20;
    bottom: 110%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: all 0.2s ease;
    font-size: 0.85rem;
    font-weight: 600;
    pointer-events: none;
    box-shadow: var(--shadow-lg);
}

.stair-step:hover .tooltip {
    visibility: visible;
    opacity: 1;
    bottom: 120%;
}


/* --- Navbar Styles --- */
.navbar-glass {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

