:root {
    --primary-color: #4a6fa5;
    --secondary-color: #166088;
    --accent-color: #4fc3f7;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --border-radius: 8px;
    --box-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: #333;
    background-color: #f5f7fa;
}

.app-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.app-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e1e5eb;
}

.app-header h1 {
    color: var(--primary-color);
    margin-bottom: 5px;
    font-size: 2.2rem;
}

.app-header .subtitle {
    color: #666;
    font-size: 1rem;
}

.converter-container {
    flex: 1;
    background: white;
    padding: 25px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.input-group, .output-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--secondary-color);
}

textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-size: 1rem;
    resize: vertical;
    min-height: 150px;
    transition: var(--transition);
    font-family: 'Segoe UI', Arial, sans-serif;
}

textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(79, 195, 247, 0.2);
}

.button-group {
    display: flex;
    gap: 10px;
    margin: 20px 0;
}

.btn-convert, .btn-clear {
    padding: 12px 20px;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.btn-convert {
    background-color: var(--primary-color);
    color: white;
}

.btn-convert:hover {
    background-color: var(--secondary-color);
}

.btn-clear {
    background-color: var(--light-color);
    color: var(--dark-color);
    border: 1px solid #ddd;
}

.btn-clear:hover {
    background-color: #e9ecef;
}

.output-box {
    position: relative;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    padding: 15px;
    background-color: #f8f9fa;
    min-height: 100px;
    max-height: 300px;
    overflow-y: auto;
}

.output-box pre {
    white-space: pre-wrap;
    word-wrap: break-word;
    margin: 0;
    font-family: monospace;
    font-size: 1.1rem;
}

.btn-copy {
    position: absolute;
    top: 10px;
    right: 10px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 5px 10px;
    cursor: pointer;
    transition: var(--transition);
}

.btn-copy:hover {
    background: #f1f1f1;
    color: var(--primary-color);
}

.instruction-text {
    display: block;
    margin-top: 8px;
    color: #666;
    font-size: 0.9rem;
}

.app-footer {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e1e5eb;
    color: #666;
    font-size: 0.9rem;
}

.app-footer a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

.app-footer a:hover {
    text-decoration: underline;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 100;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    transition: var(--transition);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 25px;
    border-radius: var(--border-radius);
    width: 80%;
    max-width: 700px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    position: relative;
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 1.5rem;
    color: #aaa;
    cursor: pointer;
    transition: var(--transition);
}

.close-modal:hover {
    color: var(--dark-color);
}

.modal-body {
    padding: 15px 0;
}

.modal-body h3 {
    margin: 15px 0 10px;
    color: var(--primary-color);
}

.modal-body ol, .modal-body ul {
    padding-left: 20px;
    margin-bottom: 15px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .app-container {
        padding: 15px;
    }
    
    .app-header h1 {
        font-size: 1.8rem;
    }
    
    .converter-container {
        padding: 15px;
    }
    
    .button-group {
        flex-direction: column;
    }
    
    .modal-content {
        width: 95%;
        margin: 10% auto;
    }
}