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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: #e2e8f0;
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

header {
    text-align: center;
    padding: 3rem 0;
    border-bottom: 2px solid rgba(59, 130, 246, 0.3);
    margin-bottom: 3rem;
}

h1 {
    font-size: 3rem;
    background: linear-gradient(135deg, #60a5fa 0%, #a78bfa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.subtitle {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.7);
}

section {
    background: rgba(30, 41, 59, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 16px;
    padding: 2.5rem;
    margin-bottom: 2rem;
}

h2 {
    color: #60a5fa;
    font-size: 2rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

h2::before {
    content: '';
    width: 4px;
    height: 2rem;
    background: linear-gradient(135deg, #60a5fa 0%, #a78bfa 100%);
    border-radius: 2px;
}

h3 {
    color: #93c5fd;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

h4 {
    color: #a78bfa;
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

p {
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 1rem;
}

/* Anatomy Section */
.anatomy-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: center;
}

.anatomy-explanation {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.explanation-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.color-indicator {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.explanation-item strong {
    color: #fff;
    font-size: 1.1rem;
}

.explanation-item p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
    margin: 0.25rem 0 0 0;
}

/* Math Section */
.math-explanation {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.formula {
    background: rgba(15, 23, 42, 0.8);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.formula code {
    display: block;
    color: #93c5fd;
    font-family: 'Courier New', monospace;
    font-size: 1.1rem;
    margin-top: 0.5rem;
    padding: 0.75rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 6px;
}

/* Interactive Calculator */
.interactive-calc {
    background: rgba(59, 130, 246, 0.1);
    padding: 2rem;
    border-radius: 12px;
    border: 2px solid rgba(59, 130, 246, 0.3);
}

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

.input-item label {
    display: block;
    color: #93c5fd;
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.input-item input[type="range"] {
    width: 100%;
    height: 8px;
    background: rgba(59, 130, 246, 0.2);
    border-radius: 4px;
    outline: none;
    cursor: pointer;
}

.input-item input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    width: 20px;
    height: 20px;
    background: linear-gradient(135deg, #60a5fa 0%, #a78bfa 100%);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(96, 165, 250, 0.5);
}

.input-item input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: linear-gradient(135deg, #60a5fa 0%, #a78bfa 100%);
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 8px rgba(96, 165, 250, 0.5);
}

.result-box {
    background: rgba(15, 23, 42, 0.8);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.result-box p {
    font-size: 1.2rem;
    margin-bottom: 0.75rem;
    color: rgba(255, 255, 255, 0.9);
}

.result-box strong {
    color: #10b981;
    font-size: 1.3rem;
}

/* Network Section */
.network-description {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    padding: 1rem;
    background: rgba(59, 130, 246, 0.1);
    border-left: 4px solid #60a5fa;
    border-radius: 8px;
}

.network-controls {
    background: rgba(139, 92, 246, 0.1);
    padding: 2rem;
    border-radius: 12px;
    border: 2px solid rgba(139, 92, 246, 0.3);
    margin-bottom: 2rem;
}

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

.control-item label {
    display: block;
    color: #c4b5fd;
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.action-btn {
    background: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%);
    color: white;
    border: none;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.5);
}

.prediction-result {
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: rgba(15, 23, 42, 0.8);
    border-radius: 12px;
    border: 1px solid rgba(139, 92, 246, 0.3);
}

.prediction-result p {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.prediction-result strong {
    color: #a78bfa;
    font-size: 1.5rem;
}

.network-container {
    display: flex;
    justify-content: center;
    margin: 2rem 0;
    overflow-x: auto;
}

.network-legend {
    background: rgba(15, 23, 42, 0.6);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.network-legend h4 {
    margin-bottom: 1rem;
}

.network-legend p {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.legend-line {
    width: 60px;
    height: 3px;
    display: inline-block;
    background: #60a5fa;
}

.legend-line.thick {
    height: 4px;
}

.legend-line.thin {
    height: 2px;
}

.legend-color {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: inline-block;
}

.legend-color.positive {
    background: #10b981;
}

.legend-color.negative {
    background: #ef4444;
}

/* Learning Section */
.learning-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.step {
    text-align: center;
    padding: 1.5rem;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 12px;
    border: 1px solid rgba(59, 130, 246, 0.3);
    transition: all 0.3s ease;
}

.step:hover {
    transform: translateY(-5px);
    border-color: rgba(59, 130, 246, 0.5);
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.2);
}

.step-number {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #60a5fa 0%, #a78bfa 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 auto 1rem auto;
    color: white;
}

.step-content h4 {
    margin-bottom: 0.75rem;
}

.step-content p {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.7);
}

/* SVG Styles */
svg {
    background: rgba(15, 23, 42, 0.4);
    border-radius: 12px;
}

.neuron {
    cursor: pointer;
    transition: all 0.3s ease;
}

.neuron:hover circle {
    r: 32;
    filter: drop-shadow(0 0 10px currentColor);
}

.weight-line {
    transition: all 0.3s ease;
}

.weight-line:hover {
    stroke-width: 4;
    filter: drop-shadow(0 0 8px currentColor);
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem;
    color: rgba(255, 255, 255, 0.5);
    border-top: 1px solid rgba(59, 130, 246, 0.2);
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }

    h1 {
        font-size: 2rem;
    }

    .anatomy-container,
    .math-explanation,
    .input-group,
    .control-group {
        grid-template-columns: 1fr;
    }

    .learning-steps {
        grid-template-columns: 1fr;
    }

    svg {
        width: 100%;
        height: auto;
    }
}

/* Animation */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.animate-pulse {
    animation: pulse 2s ease-in-out infinite;
}

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

section {
    animation: slideIn 0.6s ease-out;
}
