/* Base Styles */
:root {
    --primary-color: #3498db;
    --secondary-color: #2c3e50;
    --accent-color: #e74c3c;
    --light-bg: #f5f7fa;
    --dark-bg: #2d3436;
    --text-color: #333;
    --light-text: #f5f5f5;
    --border-color: #ddd;
    --success-color: #2ecc71;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--light-bg);
}

.container {
    width: 100%;
    /*max-width: 1200px;*/
    margin: 0 auto;
    padding: 0 20px;
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: var(--transition);
}

a:hover {
    color: #2980b9;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    margin-bottom: 1rem;
    font-weight: 600;
    line-height: 1.3;
}

h1 {
    font-size: 2.5rem;
    color: var(--secondary-color);
}

h2 {
    font-size: 2rem;
    color: var(--secondary-color);
}

h3 {
    font-size: 1.5rem;
}

p {
    margin-bottom: 1rem;
}

/* Header */
header {
    background-color: var(--dark-bg);
    color: var(--light-text);
    padding: 1rem 0;
    box-shadow: var(--shadow);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--light-text);
}

.logo i {
    font-size: 1.8rem;
    margin-right: 0.5rem;
    color: var(--primary-color);
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-left: 1.5rem;
}

nav ul li a {
    color: var(--light-text);
    font-weight: 500;
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
}

nav ul li a:hover,
nav ul li a.active {
    background-color: var(--primary-color);
}

/* Main Content */
main {
    padding: 2rem 0;
}

.page-title {
    text-align: center;
    margin-bottom: 2rem;
}

.page-title p {
    font-size: 1.1rem;
    color: #666;
}

/* Compiler Wrapper */
.compiler-wrapper {
    width: 100%;
    margin-bottom: 3rem;
}

/* Compiler Container */
.compiler-container {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    width: 100%;
}

/* Editor and Output Container */
.editor-output-container {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
}

/* Редактор */
.editor-container {
    min-width: 40%;
    flex: 1 1 40%;
    height: 500px;
    border-right: 1px solid var(--border-color);
}

/* Вывод */
.output-container {
    min-width: 30%;
    flex: 1 1 30%;
    display: flex;
    flex-direction: column;
    height: 500px;
    min-height: 200px;
    resize: vertical;
    overflow: auto;
    border-right: 1px solid var(--border-color);
}

.before-compiler {
    max-width: 250px;
    flex: 1 1 30%;
    height: 500px;
}

/* Мобильная адаптация */
@media (max-width: 768px) {
    .editor-output-container {
        flex-direction: column;
    }

    .editor-container,
    .output-container,
    .before-compiler {
        min-width: 100%;
        border-right: none;
    }

    .before-compiler {
        padding-top: 1rem;
    }
	#editor {
    min-height: 300px;
}
}


#editor {
    width: 100%;
    height: 100%;
    font-size: 16px;
}

/* Toolbar */
.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #f0f0f0;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-color);
}

.tool-section {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

select {
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background-color: #fff;
    cursor: pointer;
    font-size: 0.9rem;
}

.btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    background-color: #e0e0e0;
    cursor: pointer;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
}

.btn:hover {
    background-color: #d0d0d0;
}

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

.btn.primary:hover {
    background-color: #2980b9;
}

.btn i {
    font-size: 1rem;
}

/* Output */
.output-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background-color: #f0f0f0;
    border-bottom: 1px solid var(--border-color);
}

.output-header span {
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.output-header i {
    color: var(--secondary-color);
}

.input-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.output-content {
    padding: 1rem;
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
}

#inputarea, #output {
    width: 100%;
    min-height: 120px;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.9rem;
    resize: none;
    background-color: #fff;
    flex: 1;
}

#inputarea {
    margin-bottom: 1rem;
}

#output {
    background-color: #f8f9fa;
}

#inputonly {
    font-weight: 600;
    display: block;
    margin-bottom: 0.5rem;
}

/* Features Section */
.features-section {
    margin-bottom: 3rem;
}

.features-section h2 {
    text-align: center;
    margin-bottom: 2rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.feature-card {
    background-color: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
    text-align: center;
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

.feature-card i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.feature-card h3 {
    margin-bottom: 0.75rem;
}

/* Guide Section */
.guide-section {
    margin-bottom: 3rem;
}

.guide-section h2 {
    text-align: center;
    margin-bottom: 1.5rem;
}

.guide-section > p {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 2rem;
}

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

.step {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.step-number {
    width: 36px;
    height: 36px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
}

.step-content h3 {
    margin-bottom: 0.5rem;
}

/* FAQ Section */
.faq-section {
    margin-bottom: 3rem;
}

.faq-section h2 {
    text-align: center;
    margin-bottom: 2rem;
}

.accordion {
    max-width: 800px;
    margin: 0 auto;
}

.accordion-item {
    margin-bottom: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
}

.accordion-header {
    padding: 1rem;
    background-color: #f8f9fa;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.accordion-header h3 {
    margin: 0;
    font-size: 1.1rem;
}

.accordion-icon {
    font-size: 1.5rem;
    font-weight: 700;
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.accordion-content p {
    padding: 1rem;
    margin: 0;
}

/* Footer */
footer {
    background-color: var(--secondary-color);
    color: var(--light-text);
    padding: 3rem 0 1.5rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    color: var(--light-text);
    margin-bottom: 1.25rem;
    position: relative;
    padding-bottom: 0.75rem;
}

.footer-section h3:after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 50px;
    height: 2px;
    background-color: var(--primary-color);
}

.footer-section p {
    margin-bottom: 1.5rem;
    color: #bdc3c7;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.75rem;
}

.footer-section ul li a {
    color: #bdc3c7;
}

.footer-section ul li a:hover {
    color: var(--primary-color);
}

.copyright {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid #34495e;
    color: #bdc3c7;
}

/* Share notification */
.share-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background-color: var(--success-color);
    color: white;
    padding: 12px 20px;
    border-radius: 4px;
    box-shadow: var(--shadow);
    z-index: 1000;
    transition: opacity 0.5s ease;
}

/* Responsive */
@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.6rem;
    }
    
    .toolbar {
        flex-direction: column;
        gap: 1rem;
    }
    
    .step {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .step-number {
        margin-bottom: 0.5rem;
    }
    
    .editor-output-container {
        flex-direction: column;
    }
    
    .editor-container,
    .output-container {
        min-width: 100%;
        height: 400px;
    }
    
    .editor-container {
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }
    
    .output-container {
        resize: none;
    }
}

@media (max-width: 576px) {
    header .container {
        flex-direction: column;
        gap: 1rem;
    }
    
    nav ul {
        justify-content: center;
    }
    
    nav ul li {
        margin: 0 0.5rem;
    }
    
    .tool-section {
        width: 100%;
        justify-content: space-between;
    }
}