:root {
    --bg-main: #f1f5f9; /* Slate 100 */
    --bg-panel: rgba(255, 255, 255, 0.9);
    --primary: #16a34a; /* Green 600 */
    --text-main: #0f172a; /* Slate 900 */
    --text-muted: #475569; /* Slate 600 */
    --border-color: rgba(22, 163, 74, 0.2);
    --glow: 0 0 15px rgba(22, 163, 74, 0.15);
}

body {
    background-color: var(--bg-main);
    background-image: 
        radial-gradient(circle at 15% 50%, rgba(22, 163, 74, 0.08), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(37, 99, 235, 0.08), transparent 25%);
    font-family: 'Inter', 'Segoe UI', sans-serif;
    color: var(--text-main);
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.app-container {
    width: 100%;
    max-width: 1200px;
    padding: 2rem;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

header {
    text-align: center;
    margin-bottom: 1rem;
    animation: slideDown 0.6s ease-out forwards;
}

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

header h1 {
    margin: 0;
    font-size: 2.5rem;
    background: linear-gradient(135deg, #16a34a, #2563eb);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-transform: uppercase;
    letter-spacing: 2px;
}

header p {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-top: 0.5rem;
}

.main-panel {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    align-items: center;
    animation: fadeInPanel 0.8s ease-out forwards;
}

@keyframes fadeInPanel {
    from { opacity: 0; }
    to { opacity: 1; }
}

.circuit-area {
    width: 100%;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 16px;
    padding: 2rem;
    display: flex;
    overflow-x: auto;
    align-items: center;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.03), 0 4px 20px rgba(0,0,0,0.05);
    min-height: 250px;
    scroll-behavior: smooth;
    position: relative;
}

/* User's Original Classes adapted for modern layout */
.Base {
    width: 100%;
}

.Base-imgL {
    width: 230px;
    height: 200px;
    flex-shrink: 0;
    filter: drop-shadow(0 0 10px rgba(22, 163, 74, 0.15));
}

.Base-img {
    width: 150px;
    height: 200px;
    flex-shrink: 0;
    animation: fadeInSvg 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.Base-imgR {
    width: 150px;
    height: 200px;
    flex-shrink: 0;
}

@keyframes fadeInSvg {
    from { opacity: 0; transform: scale(0.8) translateX(-20px); }
    to { opacity: 1; transform: scale(1) translateX(0); }
}

.Base-vp {
    background: var(--bg-panel);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    width: 420px;
    padding: 2rem;
    box-shadow: 0 10px 40px rgba(0,0,0,0.08), inset 0 1px 0 rgba(255,255,255,1);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.panel-header {
    font-size: 1.2rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    text-align: center;
    border-bottom: 1px solid rgba(0,0,0,0.08);
    padding-bottom: 1rem;
}

.Base-distance, .Base-voltageInp, .Base-voltage {
    font-family: 'JetBrains Mono', monospace, sans-serif;
    font-size: 1.1rem;
    color: var(--primary);
    background: rgba(0,0,0,0.03);
    padding: 1rem 1.2rem;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-left: 4px solid var(--primary);
    transition: all 0.3s ease;
    box-shadow: inset 0 1px 0 rgba(255,255,255,1);
}

.Base-distance:hover, .Base-voltageInp:hover, .Base-voltage:hover {
    background: rgba(0,0,0,0.06);
    transform: translateX(4px);
}

.Base-voltage {
    border-left-color: #2563eb;
    color: #1d4ed8;
}

.value-highlight {
    font-weight: 700;
    font-size: 1.3rem;
    text-shadow: 0 0 10px rgba(22,163,74,0.2);
    transition: text-shadow 0.3s ease;
}

.Base-voltage .value-highlight {
    text-shadow: 0 0 10px rgba(37,99,235,0.2);
}

.button-group {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 0.5rem;
}

.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    outline: none;
    width: 140px;
}

.Base-addButton {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: white;
    box-shadow: 0 4px 15px rgba(34, 197, 94, 0.3);
}

.Base-addButton:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(34, 197, 94, 0.4);
}

.Base-addButton:active {
    transform: translateY(1px);
    box-shadow: 0 2px 10px rgba(34, 197, 94, 0.2);
}

.Base-removeButton {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

.Base-removeButton:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4);
}

.Base-removeButton:active {
    transform: translateY(1px);
    box-shadow: 0 2px 10px rgba(239, 68, 68, 0.2);
}

/* Custom Scrollbar for circuit area */
.circuit-area::-webkit-scrollbar {
    height: 12px;
}
.circuit-area::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.05);
    border-radius: 6px;
    margin: 0 10px;
}
.circuit-area::-webkit-scrollbar-thumb {
    background: rgba(22, 163, 74, 0.3);
    border-radius: 6px;
    border: 2px solid rgba(255, 255, 255, 1);
}
.circuit-area::-webkit-scrollbar-thumb:hover {
    background: rgba(22, 163, 74, 0.6);
}
