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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    line-height: 1.6;
    background-color: #f5f5f5;
    color: #333;
    height: 100vh;
}

.container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 20px;
    height: calc(100vh - 40px);
    display: flex;
    flex-direction: column;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.header-content {
    flex: 1;
    min-width: 300px;
}

h1 {
    color: #2c3e50;
    font-size: clamp(1.5rem, 4vw, 2rem);
    margin-bottom: 5px;
}

.subtitle {
    font-size: clamp(0.875rem, 2vw, 1rem);
    color: #7f8c8d;
    line-height: 1.4;
    max-width: 100%;
    word-wrap: break-word;
}

.subtitle a {
    color: #2980b9;
    text-decoration: none;
    transition: color 0.3s;
}

.subtitle a:hover {
    color: #3498db;
    text-decoration: underline;
}

.button-group {
    display: flex;
    gap: 10px;
    align-items: center;
}

#runButton, .secondary-button {
    border: none;
    padding: clamp(8px, 2vw, 10px) clamp(15px, 3vw, 20px);
    border-radius: 5px;
    cursor: pointer;
    font-size: clamp(0.875rem, 2vw, 1rem);
    transition: all 0.3s ease;
    white-space: nowrap;
}

#runButton {
    background-color: #2ecc71;
    color: white;
}

#runButton:hover {
    background-color: #27ae60;
}

.secondary-button {
    background-color: #e74c3c;
    color: white;
}

.secondary-button:hover {
    background-color: #c0392b;
}

.editor-output-container {
    display: flex;
    gap: 20px;
    flex: 1;
    min-height: 0;
}

.editor-container, .output-container {
    flex: 1;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.CodeMirror {
    height: 100% !important;
    font-size: clamp(14px, 2vw, 16px);
}

.output-container {
    background-color: white;
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.output-container h3 {
    margin-bottom: 10px;
    color: #2c3e50;
    font-size: clamp(1rem, 3vw, 1.17rem);
}

#output {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 5px;
    font-family: 'Courier New', Courier, monospace;
    white-space: pre-wrap;
    flex: 1;
    overflow-y: auto;
    font-size: clamp(12px, 2vw, 14px);
}

footer {
    margin-top: 20px;
    text-align: center;
    color: #7f8c8d;
    font-size: clamp(0.75rem, 2vw, 0.9rem);
}

footer a {
    color: #2980b9;
    text-decoration: none;
    transition: color 0.3s;
}

footer a:hover {
    color: #3498db;
    text-decoration: underline;
}

/* Mobile Responsive Styles */
@media screen and (max-width: 768px) {
    .container {
        padding: 10px;
        height: 100vh;
    }

    header {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
        gap: 10px;
    }

    .header-content {
        min-width: auto;
    }

    .button-group {
        justify-content: center;
    }

    .editor-output-container {
        flex-direction: column;
        gap: 15px;
    }

    .editor-container, .output-container {
        min-height: 300px;
    }

    .output-container {
        padding: 15px;
    }

    #output {
        padding: 10px;
    }

    footer {
        margin-top: 15px;
    }

    .subtitle {
        padding: 0 10px;
        margin-top: 5px;
    }
}

/* Small Mobile Devices */
@media screen and (max-width: 480px) {
    .container {
        padding: 8px;
    }

    h1 {
        font-size: 1.5rem;
    }

    .subtitle {
        font-size: 0.875rem;
        line-height: 1.5;
        padding: 0 15px;
        margin-top: 8px;
    }

    #runButton, .secondary-button {
        padding: 8px 15px;
        font-size: 0.875rem;
    }

    .editor-container, .output-container {
        min-height: 250px;
    }

    .CodeMirror {
        font-size: 14px;
    }

    #output {
        font-size: 12px;
    }
} 