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

:root {
    --primary: #3b82f6;
    --secondary: #8b5cf6;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --dark: #1f2937;
    --light: #f3f4f6;
    --white: #ffffff;
    --adenine: #ff6b6b;
    --thymine: #4ecdc4;
    --guanine: #ffe66d;
    --cytosine: #a8e6cf;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: var(--dark);
}

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

header {
    text-align: center;
    color: var(--white);
    margin-bottom: 3rem;
}

h1 {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
}

.lang-selector {
    margin-top: 1rem;
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.lang-selector button {
    padding: 0.5rem 1rem;
    border: 2px solid var(--white);
    background: transparent;
    color: var(--white);
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.lang-selector button:hover,
.lang-selector button.active {
    background: var(--white);
    color: var(--primary);
}

main {
    background: var(--white);
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.input-section {
    margin-bottom: 2rem;
}

label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--dark);
}

textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--light);
    border-radius: 0.5rem;
    font-family: 'Courier New', Courier, monospace;
    font-size: 1rem;
    resize: vertical;
    transition: border-color 0.3s ease;
}

textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.example-buttons {
    margin-top: 1rem;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.example-btn {
    padding: 0.5rem 1rem;
    border: 2px solid var(--primary);
    background: transparent;
    color: var(--primary);
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.example-btn:hover {
    background: var(--primary);
    color: var(--white);
}

.controls {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
    align-items: end;
}

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

select {
    padding: 0.75rem;
    border: 2px solid var(--light);
    border-radius: 0.5rem;
    font-size: 1rem;
    background: var(--white);
    cursor: pointer;
    transition: border-color 0.3s ease;
}

select:focus {
    outline: none;
    border-color: var(--primary);
}

.primary-btn {
    padding: 0.75rem 2rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--white);
    border: none;
    border-radius: 0.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.primary-btn:hover {
    transform: translateY(-2px);
}

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

.visualization-container {
    margin-bottom: 2rem;
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 2rem;
    align-items: start;
}

#dna-canvas {
    width: 100%;
    height: 500px;
    background: var(--light);
    border-radius: 0.5rem;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.06);
}

.stats-panel {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    padding: 1.5rem;
    border-radius: 0.5rem;
}

.stats-panel h3 {
    margin-bottom: 1rem;
    color: var(--dark);
}

.stats-grid {
    display: grid;
    gap: 0.75rem;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem;
    background: var(--white);
    border-radius: 0.25rem;
}

.stat-label {
    font-weight: 600;
    color: var(--dark);
}

.stat-value {
    color: var(--primary);
    font-weight: 700;
}

.action-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.action-buttons button {
    padding: 0.75rem 1.5rem;
    border: 2px solid var(--primary);
    background: transparent;
    color: var(--primary);
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.action-buttons button:hover {
    background: var(--primary);
    color: var(--white);
}

footer {
    text-align: center;
    color: var(--white);
    margin-top: 3rem;
}

@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .visualization-container {
        grid-template-columns: 1fr;
    }
    
    #dna-canvas {
        height: 300px;
    }
    
    .controls {
        grid-template-columns: 1fr;
    }
}