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

body {
    overflow: hidden;
    display: grid;
    grid-template-rows: auto 1fr auto;
    grid-template-columns: 20px 1fr 20px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #333;
    height: 100vh;
}

#heading {
    grid-column: 1 / -1;
    grid-row: 1;
    text-align: center;
    background: rgba(255, 255, 255, 0.95);
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

#heading h1 {
    font-size: 2.5em;
    font-weight: 300;
    color: #4a5568;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

#editor-contents {
    grid-row: 2;
    grid-column: 2;
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.95);
    margin: 20px 0;
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
    overflow: hidden;
}

#editor {
    flex: 1;
    max-width: 60%;
    height: 100%;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

#editor-controls {
    display: flex;
    flex-direction: column;
    gap: 20px;
    flex: 0 0 280px;
    max-width: 40%;
}

#submit {
    padding: 15px 25px;
    font-size: 16px;
    font-weight: 600;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

#submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

#submit:active {
    transform: translateY(0);
}

#output {
    background: #f8fafc;
    padding: 20px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
}

#output p:first-child {
    font-weight: 600;
    font-size: 18px;
    color: #4a5568;
    margin-bottom: 15px;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 8px;
}

#output p {
    margin-bottom: 8px;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 14px;
    line-height: 1.5;
}

#output-stdout {
    color: #22c55e;
}

#output-stderr {
    color: #ef4444;
}

#output-exit-code {
    color: #6366f1;
}

#output-compilation-error {
    color: #f59e0b;
}

#footer {
    grid-row: 3;
    grid-column: 1 / -1;
    text-align: center;
    background: rgba(255, 255, 255, 0.9);
    padding: 15px;
    backdrop-filter: blur(10px);
}

#footer p {
    font-size: 14px;
    color: #64748b;
    font-weight: 500;
}

@media (max-width: 1200px) {
    #editor-contents {
        gap: 15px;
        padding: 15px;
    }
    
    #editor-controls {
        flex: 0 0 250px;
    }
}

@media (max-width: 900px) {
    #editor-contents {
        flex-direction: column;
        gap: 20px;
    }
    
    #editor {
        max-width: 100%;
        height: 350px;
    }
    
    #editor-controls {
        max-width: 100%;
        flex: none;
    }
}