body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    margin: 0;
    padding: 20px;
    background: linear-gradient(to bottom right, #111827, #1f2937, #000000);
    color: #f3f4f6;
    min-height: 100vh;
}

.navbar {
    background-color: #1f2937;
    padding: 1rem 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid #374151;
    margin-bottom: 2rem;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.nav-link {
    color: #d1d5db;
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    transition: all 0.2s ease;
}

.nav-link:hover {
    color: #f3f4f6;
    background-color: #374151;
}

.nav-link.active {
    color: #3b82f6;
    background-color: #1e40af;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    background-color: #1f2937;
    padding: 2rem;
    border-radius: 0.75rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    border: 1px solid #374151;
}

h1 {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    background: linear-gradient(to right, #60a5fa, #a855f7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

p {
    text-align: center;
    margin-bottom: 2rem;
    color: #9ca3af;
}

.canvas-container {
    display: flex;
    justify-content: center;
    margin-bottom: 1rem;
}

#canvas-holder {
    border: 1px solid #374151;
    border-radius: 0.75rem;
    width: 100%;
    max-width: 1200px;
    min-height: 480px;
    background-color: #020617;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* Metrics Row styling */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 1rem;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.metric-card {
    background-color: #1a2233;
    border: 1px solid #334155;
    border-radius: 0.75rem;
    padding: 0.75rem 1.25rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-top: 4px solid #334155;
    transition: transform 0.2s ease;
}

.metric-card:hover {
    transform: translateY(-2px);
}

.metric-card.thickness,
.metric-card.thickness-loc {
    border-top-color: #3b82f6;
}

.metric-card.camber,
.metric-card.camber-loc {
    border-top-color: #a855f7;
}

.metric-card label {
    font-size: 0.75rem;
    color: #94a3b8;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.metric-card .value {
    font-size: 1.5rem;
    font-weight: 800;
    color: #f8fafc;
}

.metric-card.thickness .value,
.metric-card.thickness-loc .value {
    color: #60a5fa;
}

.metric-card.camber .value,
.metric-card.camber-loc .value {
    color: #c084fc;
}

.controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.footer-controls {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.card {
    background-color: #1a2233;
    border: 1px solid #334155;
    border-radius: 1rem;
    padding: 1.25rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

details.card {
    display: block;
}

details.card>summary {
    cursor: pointer;
    list-style: none;
    outline: none;
}

details.card>summary::-webkit-details-marker {
    display: none;
}

details.card>summary h2 {
    margin: 0;
    padding: 0;
    border: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

details.card>summary h2::after {
    content: '▼';
    font-size: 0.8rem;
    color: #64748b;
    transition: transform 0.2s;
}

details.card[open]>summary h2::after {
    transform: rotate(180deg);
}

details.card[open]>summary h2 {
    border-bottom: 1px solid #334155;
    padding-bottom: 0.5rem;
    margin-bottom: 0.5rem;
}

.card h2 {
    font-size: 1.125rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid #334155;
    padding-bottom: 0.5rem;
}

.control-group {
    display: flex;
    flex-direction: column;
}

.value-display {
    font-size: 0.875rem;
    color: #3b82f6;
    font-weight: 600;
    margin-top: -0.25rem;
    margin-bottom: 0.5rem;
}

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

.control-group label {
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #e2e8f0;
}

.control-group input[type="range"] {
    margin-bottom: 0.75rem;
    cursor: pointer;
    accent-color: #3b82f6;
}

.control-group input[type="text"],
.control-group input[type="number"],
.control-group textarea {
    padding: 0.6rem 0.8rem;
    border: 1px solid #334155;
    border-radius: 0.5rem;
    background-color: #0f172a;
    color: #f8fafc;
    outline: none;
    transition: all 0.2s;
    font-family: inherit;
}

.control-group input:focus,
.control-group textarea:focus {
    border-color: #3b82f6;
    background-color: #1e293b;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.weights-row {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.weights-row label {
    width: 80px;
    margin-right: 1rem;
    font-weight: 500;
    padding-top: 0.5rem;
    color: #94a3b8;
}

.weights-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.weights-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

.weight-input {
    width: 75px;
    margin-bottom: 0 !important;
    font-size: 0.875rem;
    text-align: center;
}

.weight-control-buttons {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.25rem;
    justify-content: center;
}

.btn-small {
    padding: 0.4rem 0.8rem !important;
    font-size: 1rem !important;
    line-height: 1;
}

.export-section {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.export-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.export-input {
    display: flex;
    flex-direction: column;
}

.export-input label {
    margin-bottom: 0.25rem;
    font-weight: 500;
    color: #94a3b8;
    font-size: 0.8125rem;
}

.export-buttons {
    display: flex;
    gap: 0.75rem;
}

.tooltip {
    font-size: 0.75rem;
    color: #64748b;
    margin-top: 0.25rem;
    line-height: 1.4;
}

.theory-section {
    margin-bottom: 2rem;
    border: 1px solid #374151;
    border-radius: 0.75rem;
    background-color: #0f172a;
    overflow: hidden;
}

.theory-section summary {
    padding: 1rem 1.5rem;
    background: linear-gradient(to right, #1e293b, #0f172a);
    cursor: pointer;
    font-weight: 600;
    color: #f1f5f9;
    list-style: none;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.theory-content {
    padding: 1.5rem;
    border-top: 1px solid #334155;
    background-color: #020617;
}

.formula {
    background-color: #0f172a;
    border: 1px solid #1e293b;
    border-radius: 0.5rem;
    padding: 1rem;
    margin: 1rem 0;
    text-align: center;
    font-family: 'Fira Code', 'Courier New', monospace;
    font-size: 0.95rem;
    color: #10b981;
}

button {
    padding: 0.7rem 1.4rem;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.5rem;
    cursor: pointer;
    font-weight: 700;
    letter-spacing: 0.025em;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2), 0 2px 4px -1px rgba(0, 0, 0, 0.1);
    text-transform: uppercase;
    font-size: 0.8125rem;
}

button:hover {
    transform: translateY(-2px);
    filter: brightness(1.15);
}

.full-width-btn {
    width: 100%;
}

@media (max-width: 1024px) {
    .metrics-grid {
        grid-template-columns: 1fr 1fr;
    }

    .footer-controls {
        grid-template-columns: 1fr;
    }
}

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

    .metrics-grid {
        grid-template-columns: 1fr;
    }
}