:root {
    --bg-base: #0a0a0c;
    --bg-surface: #141419;
    --bg-surface-hover: #1e1e24;
    --bg-elevated: #1a1a23;

    --text-primary: #f0f0f5;
    --text-secondary: #a0a0ad;
    --text-tertiary: #6e6e7a;

    --accent-primary: #775cf0;
    --accent-primary-hover: #886efc;
    --accent-secondary: #00d2ff;

    --border-color: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.15);

    --error: #ff4a4a;
    --error-bg: rgba(255, 74, 74, 0.1);

    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-full: 9999px;

    --shadow-subtle: 0 4px 20px rgba(0, 0, 0, 0.3);
    --shadow-glow: 0 0 20px rgba(119, 92, 240, 0.2);

    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-base);
    color: var(--text-primary);
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    background-image:
        radial-gradient(circle at 15% 50%, rgba(119, 92, 240, 0.05) 0%, transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(0, 210, 255, 0.03) 0%, transparent 25%);
}

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

/* Header */
.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-img {

    max-height: 140px;

    width: auto;

    object-fit: contain;

    filter: drop-shadow(0px 0px 8px rgba(255, 255, 255, 0.6));

}

.subtitle {
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
}

/* Main Layout */
.main-content {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 2rem;
    align-items: start;
}

@media (max-width: 900px) {
    .main-content {
        grid-template-columns: 1fr;
    }
}

/* Panels */
.panel {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-subtle);
    backdrop-filter: blur(10px);
}

.panel-header {
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.panel-header h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* Forms & Inputs */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

input[type="number"] {
    width: 100%;
    background-color: var(--bg-elevated);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    transition: var(--transition);
}

input[type="number"]:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 2px rgba(119, 92, 240, 0.2);
}

.unit {
    position: absolute;
    right: 1rem;
    color: var(--text-tertiary);
    font-size: 0.85rem;
    pointer-events: none;
}

/* Data Table */
.data-table-container {
    background-color: var(--bg-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1rem;
    margin-bottom: 1.5rem;
    overflow-x: auto;
}

.table-header-row {
    display: grid;
    grid-template-columns: 80px auto 40px;
    gap: 1rem;
    padding-bottom: 0.75rem;
    margin-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
    min-width: max-content;
}

.data-row {
    display: grid;
    grid-template-columns: 80px auto 40px;
    gap: 1rem;
    margin-bottom: 0.5rem;
    align-items: center;
    min-width: max-content;
}

.conc-headers-wrapper,
.conc-inputs-wrapper {
    display: grid;
    grid-auto-columns: minmax(70px, 1fr);
    grid-auto-flow: column;
    gap: 0.5rem;
    width: 100%;
}

.conc-header {
    text-align: center;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
}

.data-row input {
    padding: 0.6rem;
    font-size: 0.9rem;
    width: 100%;
    min-width: 60px;
}

.icon-btn {
    background: transparent;
    border: none;
    color: var(--text-tertiary);
    cursor: pointer;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    height: 38px;
    transition: var(--transition);
}

.icon-btn:hover {
    color: var(--error);
    background-color: var(--error-bg);
}

/* Buttons */
.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.875rem 1.5rem;
    border-radius: var(--radius-md);
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-primary-hover));
    color: white;
    box-shadow: 0 4px 15px rgba(119, 92, 240, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(119, 92, 240, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background-color: transparent;
    color: var(--accent-primary);
    border: 1px dashed var(--border-hover);
    padding: 0.6rem 1rem;
    margin-top: 0.5rem;
}

.btn-secondary:hover {
    background-color: rgba(119, 92, 240, 0.05);
    border-color: var(--accent-primary);
}

/* Loader */
.loader {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
    position: absolute;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.hidden {
    display: none !important;
}

/* Error Message */
.error-msg {
    margin-top: 1rem;
    padding: 0.75rem;
    border-radius: var(--radius-md);
    background-color: var(--error-bg);
    color: var(--error);
    font-size: 0.875rem;
    text-align: center;
    border: 1px solid rgba(255, 74, 74, 0.2);
}

/* Results Panel */
.badge {
    background-color: rgba(0, 210, 255, 0.1);
    color: var(--accent-secondary);
    padding: 0.35rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 1px solid rgba(0, 210, 255, 0.2);
}

.pk-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

@media (max-width: 600px) {
    .pk-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.pk-card {
    background-color: var(--bg-elevated);
    border: 1px solid var(--border-color);
    padding: 1rem;
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.pk-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
}

.highlight-card {
    background: linear-gradient(135deg, rgba(119, 92, 240, 0.1), rgba(119, 92, 240, 0.05));
    border-color: rgba(119, 92, 240, 0.3);
}

.highlight-card:hover {
    border-color: rgba(119, 92, 240, 0.5);
}

.pk-label {
    display: block;
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pk-value {
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: baseline;
    gap: 0.25rem;
}

.pk-value .unit {
    position: static;
    font-size: 0.85rem;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
}

/* Charts */
.charts-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.chart-wrapper {
    background-color: var(--bg-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1rem;
    height: 300px;
}

.chart-wrapper h3 {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

canvas {
    width: 100% !important;
    height: 240px !important;
}

/* Reveal Animation */
.fade-in {
    animation: fadeIn 0.5s ease-out forwards;
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}