:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --text-color: #ffffff;
    --button-bg: rgba(255, 255, 255, 0.05);
    --button-hover: rgba(255, 255, 255, 0.15);
    --operator-color: #ff9a9e;
    --equals-bg: linear-gradient(to right, #fa709a 0%, #fee140 100%);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Outfit', sans-serif;
}

body {
    background: #0f0c29;
    background: linear-gradient(to right, #24243e, #302b63, #0f0c29);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: var(--text-color);
    padding: 20px;
}

.background-blobs {
    position: fixed;
    width: 100%;
    height: 100%;
    z-index: -1;
    top: 0;
    left: 0;
    overflow: hidden;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.6;
}

.blob-1 {
    top: -10%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: #764ba2;
    animation: float 10s infinite alternate;
}

.blob-2 {
    bottom: -10%;
    right: -10%;
    width: 400px;
    height: 400px;
    background: #667eea;
    animation: float 8s infinite alternate-reverse;
}

.blob-3 {
    top: 40%;
    left: 40%;
    width: 300px;
    height: 300px;
    background: #fa709a;
    animation: float 12s infinite alternate;
}

@keyframes float {
    0% {
        transform: translate(0, 0);
    }

    100% {
        transform: translate(30px, 50px);
    }
}

/* Layout Container */
.app-container {
    display: flex;
    gap: 30px;
    align-items: flex-start;
    justify-content: center;
    flex-wrap: wrap;
    max-width: 1200px;
    width: 100%;
    margin-bottom: 30px;
}

/* Calculator Styles */
.calculator-container {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 20px;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    width: 350px;
    flex-shrink: 0;
}

/* Analytics Panel Styles */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 25px;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    flex: 1;
    min-width: 300px;
    max-width: 500px;
    display: flex;
    flex-direction: column;
}

.glass-panel h2 {
    margin-bottom: 20px;
    font-size: 1.4rem;
    color: var(--operator-color);
    text-align: center;
}

.analytics-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
    flex: 1;
}

.chart-container {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 16px;
    padding: 15px;
    height: 200px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.live-feed-container h3 {
    font-size: 1rem;
    margin-bottom: 10px;
    color: rgba(255, 255, 255, 0.8);
}

#live-feed {
    list-style: none;
    padding: 0;
    max-height: 200px;
    overflow-y: auto;
    font-family: monospace;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 16px;
    padding: 15px;
}

#live-feed li {
    margin-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 4px;
    font-size: 0.9rem;
}

#connection-status {
    margin-top: 15px;
    font-size: 0.85rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
}

/* Infrastructure Footer */
.infrastructure-footer {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 15px 30px;
    color: var(--text-color);
    font-size: 0.85rem;
    max-width: 800px;
    width: 100%;
    text-align: center;
}

.infrastructure-footer h2 {
    font-size: 1rem;
    color: var(--operator-color);
    margin-bottom: 10px;
}

.infrastructure-footer ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
}

/* Calculator Internals */
.display {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
    text-align: right;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    height: 100px;
    word-wrap: break-word;
    word-break: break-all;
}

.previous-operand {
    color: rgba(255, 255, 255, 0.6);
    font-size: 1rem;
    min-height: 1.2rem;
}

.current-operand {
    color: white;
    font-size: 2.5rem;
    font-weight: 600;
}

.buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.btn {
    background: var(--button-bg);
    border: 1px solid var(--glass-border);
    color: white;
    font-size: 1.25rem;
    border-radius: 16px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
    user-select: none;
}

.btn:hover {
    background: var(--button-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.btn:active {
    transform: translateY(0);
}

.span-2 {
    grid-column: span 2;
}

.operator {
    color: var(--operator-color);
    font-weight: 600;
}

.equals {
    background: var(--equals-bg);
    border: none;
    font-weight: 600;
    color: #fff;
    box-shadow: 0 4px 15px rgba(250, 112, 154, 0.4);
}

.equals:hover {
    box-shadow: 0 6px 20px rgba(250, 112, 154, 0.6);
    background: var(--equals-bg);
    opacity: 0.9;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}