:root {
    --bg-deep: #05060e;
    --accent-indigo: #6366f1;
    --accent-indigo-glow: rgba(99, 102, 241, 0.5);
    --accent-cyan: #06b6d4;
    --accent-cyan-glow: rgba(6, 182, 212, 0.5);
    --accent-purple: #a855f7;
    
    --text-primary: #ffffff;
    --text-secondary: #94a3b8;
    --text-dim: #64748b;
    
    --glass-bg: rgba(13, 17, 34, 0.7);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-border-bright: rgba(255, 255, 255, 0.15);
    
    --level-r: #ff4d4d;
    --level-p: #ffcc00;
    --level-s: #00ff88;
    
    --font-main: 'Outfit', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

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

body {
    font-family: var(--font-main);
    background-color: var(--bg-deep);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
}

/* Aurora Background */
.aurora-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    filter: blur(100px);
    opacity: 0.6;
}

.aurora {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    mix-blend-mode: screen;
    animation: animateAurora 20s infinite alternate ease-in-out;
}

.aurora-1 {
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, var(--accent-indigo-glow) 0%, transparent 70%);
    top: -200px;
    left: -200px;
}

.aurora-2 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--accent-cyan-glow) 0%, transparent 70%);
    bottom: -100px;
    right: -100px;
    animation-delay: -5s;
}

.aurora-3 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.3) 0%, transparent 70%);
    top: 40%;
    left: 50%;
    animation-delay: -10s;
}

.aurora-4 {
    width: 700px;
    height: 700px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.2) 0%, transparent 70%);
    top: 10%;
    right: 20%;
    animation-delay: -15s;
}

@keyframes animateAurora {
    0% { transform: translate(0, 0) rotate(0deg) scale(1); }
    100% { transform: translate(100px, 50px) rotate(30deg) scale(1.2); }
}

/* Main Layout */
.container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    position: relative;
    z-index: 1;
}

.header {
    text-align: center;
    margin-bottom: 2.5rem;
    animation: fadeDown 1s ease-out;
}

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

.header h1 {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #fff 30%, var(--accent-indigo) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 20px rgba(99, 102, 241, 0.2));
}

.header p {
    font-size: 1rem;
    color: var(--text-secondary);
    max-width: 500px;
    margin: 0 auto;
    font-weight: 300;
}

/* Glass Panels */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 1.25rem;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.glass-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255,255,255,0.05) 0%, transparent 100%);
    pointer-events: none;
}

.glass-panel:hover {
    border-color: var(--glass-border-bright);
    box-shadow: 0 20px 40px -10px rgba(0,0,0,0.6);
    transform: translateY(-2px);
}

/* Input Section */
.input-section {
    padding: 1.5rem;
    max-width: 900px;
    margin: 0 auto 2.5rem;
}

.api-fetch-section {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--glass-border);
}

.api-input-group {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

/* Custom Select Styling */
.ticker-input {
    flex: 1;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid var(--glass-border);
    border-radius: 0.75rem;
    padding: 0.75rem 1.25rem;
    color: #fff;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='white'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1rem;
}

.ticker-input:focus {
    border-color: var(--accent-indigo);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
    outline: none;
}

/* Buttons */
button {
    cursor: pointer;
    font-family: inherit;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-indigo), var(--accent-purple));
    color: #fff;
    border: none;
    border-radius: 0.75rem;
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 700;
    box-shadow: 0 5px 15px -3px rgba(99, 102, 241, 0.4);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -5px rgba(99, 102, 241, 0.5);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    border: 1px solid var(--glass-border);
    border-radius: 0.75rem;
    padding: 0.75rem 1.25rem;
    font-size: 0.95rem;
    font-weight: 500;
}

.btn-secondary.active {
    background: var(--accent-indigo);
    color: #fff;
    border-color: var(--accent-indigo);
    box-shadow: 0 0 15px var(--accent-indigo-glow);
}

/* Manual Input Section Redesign */
.manual-input-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
    padding: 2rem;
    border-top: 1px solid var(--glass-border);
    animation: fadeIn 0.5s ease-out;
}

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

.manual-card {
    padding: 2rem;
    background: linear-gradient(145deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.01) 100%);
}

.manual-card h3 {
    font-size: 1.15rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    letter-spacing: -0.02em;
}

.manual-card h3::before {
    content: '';
    width: 4px;
    height: 1.25rem;
    background: linear-gradient(to bottom, var(--accent-purple), var(--accent-indigo));
    border-radius: 4px;
}

.manual-fields {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.field label {
    font-size: 0.7rem;
    color: var(--text-dim);
    text-transform: uppercase;
    font-weight: 800;
    letter-spacing: 0.05em;
    padding-left: 0.25rem;
}

.field input {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--glass-border);
    border-radius: 0.75rem;
    padding: 0.85rem 1rem;
    color: #fff;
    font-family: var(--font-mono);
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    width: 100%;
}

.field input:focus {
    border-color: var(--accent-purple);
    background: rgba(168, 85, 247, 0.05);
    box-shadow: 0 0 20px rgba(168, 85, 247, 0.15), inset 0 0 10px rgba(0,0,0,0.3);
    outline: none;
    transform: scale(1.02);
}

.field input:hover:not(:focus) {
    border-color: var(--glass-border-bright);
    background: rgba(255, 255, 255, 0.05);
}

.manual-actions {
    grid-column: 1 / -1;
    display: flex;
    justify-content: center;
    padding-top: 1rem;
}

.manual-actions .btn-primary {
    padding: 1rem 3rem;
    font-size: 1rem;
    letter-spacing: 0.02em;
    border-radius: 1rem;
}

.hidden {
    display: none !important;
}

/* Session Data Widget Style */
.session-data-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.session-data-card {
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(255,255,255,0.03) 0%, transparent 100%);
}

.session-data-card h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--accent-cyan);
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.session-data-card h3::before {
    content: '';
    width: 3px;
    height: 1rem;
    background: var(--accent-cyan);
    border-radius: 2px;
}

.data-points {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem 1.5rem;
}

.data-item {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.data-item .label {
    font-size: 0.7rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.data-item .value {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text-primary);
    font-family: var(--font-mono);
    letter-spacing: -0.01em;
}

/* Results Grid */
.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1.5rem;
    margin-top: 2.5rem;
}

.result-card {
    padding: 1.5rem;
}

.result-card h3 {
    font-size: 1.15rem;
    font-weight: 800;
    margin-bottom: 1.25rem;
    letter-spacing: -0.02em;
    color: #fff;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 0.75rem;
}

.multi-session-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.session-headers {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 0 0.75rem;
    margin-bottom: 0.25rem;
}

.col-header {
    width: 120px;
    text-align: right;
    font-size: 0.65rem;
    font-weight: 800;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

/* Level Rows */
.level-row {
    display: flex;
    align-items: center;
    padding: 0.4rem 0.75rem;
    border-radius: 0.75rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid transparent;
    transition: all 0.3s ease;
}

.level-name {
    flex: 1;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.level-value-container {
    display: flex;
    gap: 0.75rem;
}

.level-box {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(0, 0, 0, 0.3);
    padding: 0.35rem 0.6rem;
    border-radius: 0.5rem;
    border: 1px solid var(--glass-border);
    min-width: 120px;
    justify-content: flex-end;
}

.level-value {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 0.85rem;
    color: #fff;
}

.copy-btn {
    background: rgba(255, 255, 255, 0.05);
    padding: 0.35rem;
    border-radius: 0.4rem;
    color: var(--text-dim);
    display: flex;
    align-items: center;
    justify-content: center;
}

.copy-btn svg {
    width: 13px;
    height: 13px;
}

/* Price Colors */
.level-r .level-name { color: var(--level-r); }
.level-p .level-name { color: var(--level-p); }
.level-s .level-name { color: var(--level-s); }

.level-r .level-box { border-left: 2px solid var(--level-r); }
.level-p .level-box { border-left: 2px solid var(--level-p); }
.level-s .level-box { border-left: 2px solid var(--level-s); }

/* Fibonacci Section */
.split-levels {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.side h4 {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 1.25rem;
}

@media (max-width: 1024px) {
    .header h1 { font-size: 2rem; }
}

@media (max-width: 640px) {
    .header h1 { font-size: 1.75rem; }
    .level-row { flex-direction: column; align-items: flex-start; gap: 0.75rem; }
    .level-value-container { width: 100%; }
    .level-box { flex: 1; }
    .split-levels { flex-direction: column; gap: 1.5rem; }
}
