@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600&display=swap');

:root {
    --primary-color: #4a90e2;
    --secondary-color: #f5a623;
    --background-color: #f7f9fc;
    --text-color: #333;
    --container-bg: #ffffff;
    --border-color: #e0e0e0;
    --button-bg: #4a90e2;
    --button-hover-bg: #357ABD;
    --button-text-color: #ffffff;
    --textarea-bg: #fdfdfd;
}

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

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    padding: 1rem;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: var(--container-bg);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    overflow: hidden;
}

.header {
    background: var(--primary-color);
    color: var(--button-text-color);
    padding: 1.5rem;
    text-align: center;
}

.header h1 {
    margin-bottom: 1rem;
    font-weight: 600;
}

.controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.control-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.radio-group {
    display: flex;
    gap: 0.8rem;
}

.main-content {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 1rem;
    padding: 1.5rem;
    align-items: stretch;
}

.textarea-container {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

textarea {
    width: 100%;
    flex-grow: 1;
    padding: 0.8rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    resize: none;
    font-family: inherit;
    font-size: 1rem;
    background-color: var(--textarea-bg);
}

.actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

button, .file-label {
    background-color: var(--button-bg);
    color: var(--button-text-color);
    border: none;
    padding: 0.6rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    font-size: 0.9rem;
    font-weight: 500;
}

button:hover, .file-label:hover {
    background-color: var(--button-hover-bg);
}

.file-label {
    display: inline-block;
}

input[type="file"] {
    display: none;
}

.converter-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

#convertBtn {
    font-size: 1.2rem;
    padding: 0.8rem 1.5rem;
    background-color: var(--secondary-color);
}
#convertBtn:hover {
    background-color: #e0930f;
}

.stats {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    background: #f0f4f8;
    padding: 1rem;
    border-radius: 4px;
}

.stats div {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
}

.stats label {
    font-weight: 500;
}

.stats input {
    width: 60px;
    text-align: right;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 0.2rem 0.4rem;
    background-color: #fff;
}

.footer {
    text-align: center;
    padding: 1rem;
    font-size: 0.9rem;
    color: #888;
    background: #f0f4f8;
}

/* Notification styles */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background-color: var(--primary-color);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s, transform 0.3s;
    transform: translateY(-20px);
}

.notification.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Responsive Design */
@media (max-width: 900px) {
    .main-content {
        grid-template-columns: 1fr;
    }
    .converter-controls {
        flex-direction: row-reverse;
        justify-content: space-between;
    }
}

@media (max-width: 600px) {
    .controls {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    .control-group {
        flex-direction: column;
        align-items: flex-start;
    }
    .radio-group {
        flex-direction: column;
    }
    .converter-controls {
        flex-direction: column;
        align-items: stretch;
    }
    .stats {
        flex-direction: row;
        justify-content: space-around;
        flex-wrap: wrap;
    }
}
