:root {
    --primary-color: #1a9837;
    --secondary-color: #f8f9fa;
    --accent-color: #1a9837;
    --dark-color: #343a40;
    --light-color: #ffffff;
    --border-radius: 8px;
    --box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--secondary-color);
    color: var(--dark-color);
    line-height: 1.6;
    padding-top: 2rem;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem 3rem;
}

.hero {
    text-align: center;
    margin-bottom: 3rem;
}

.hero h1 {
    font-size: 2.8rem;
    margin-bottom: 1rem;
    color: var(--dark-color);
    position: relative;
    display: inline-block;
}

.hero h1:after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background-color: var(--primary-color);
    border-radius: 2px;
}

.hero p {
    font-size: 1.2rem;
    color: #666;
    max-width: 700px;
    margin: 1.5rem auto 0;
}

.tool-section {
    background-color: var(--light-color);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 2rem;
    margin-bottom: 3rem;
    transition: transform 0.3s ease;
}

.tool-section:hover {
    transform: translateY(-5px);
}

.tool-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #eee;
    padding-bottom: 1rem;
}

.tool-header h2 {
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
}

.text-input-container {
    margin-bottom: 1.5rem;
}

.text-input-container label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--dark-color);
}

.text-input-container textarea {
    width: 100%;
    padding: 1rem;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-size: 1rem;
    resize: vertical;
    min-height: 150px;
    transition: border-color 0.3s, box-shadow 0.3s;
    background-color: #fafafa;
}

.text-input-container textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(26, 152, 55, 0.2);
}

.text-input-container .full-input {
    width: 100%;
    padding: 1rem;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: border-color 0.3s, box-shadow 0.3s;
    background-color: #fafafa;
    margin-bottom: 1rem;
}

.text-input-container .full-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(26, 152, 55, 0.2);
}

.text-controls {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.options-section {
    margin-bottom: 2rem;
    background-color: var(--secondary-color);
    padding: 1.5rem;
    border-radius: var(--border-radius);
}

.options-section h3 {
    margin-bottom: 1.5rem;
    color: var(--dark-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.2rem;
}

.options-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.option-group {
    margin-bottom: 1rem;
}

.option-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #555;
}

.option-group select {
    width: 100%;
    padding: 0.7rem;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-size: 1rem;
    background-color: #fff;
    cursor: pointer;
    transition: border-color 0.3s;
}

.option-group select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.checkbox-options {
    padding-top: 0.5rem;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.8rem;
}

.checkbox-group input {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.checkbox-group label {
    cursor: pointer;
    font-size: 0.95rem;
    color: #555;
}

.action-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.btn {
    display: inline-flex;
    background-color: var(--primary-color);
    color: var(--light-color);
    padding: 0.8rem 1.5rem;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-width: 120px;
}

.btn:hover {
    background-color: #158b2e;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.btn:active {
    transform: translateY(0);
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: var(--light-color);
}

.btn-clear, .btn-paste, .btn-sample {
    flex: 1;
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
}

.result-container {
    margin-top: 2rem;
    border-top: 1px solid #eee;
    padding-top: 2rem;
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.result-header h3 {
    color: var(--dark-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.2rem;
}

.result-stats {
    display: flex;
    gap: 1.5rem;
    font-size: 0.9rem;
    color: #777;
}

.mode-switch {
    display: flex;
    background-color: var(--secondary-color);
    border-radius: 30px;
    overflow: hidden;
    padding: 3px;
}

.mode-btn {
    padding: 0.5rem 1.2rem;
    background: none;
    border: none;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s;
    border-radius: 30px;
}

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

.batch-container, .analyzer-container {
    margin-top: 1rem;
}

.batch-container p {
    margin-bottom: 1rem;
    color: #666;
}

.component-results {
    background-color: var(--secondary-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-top: 1.5rem;
}

.component-row {
    display: flex;
    margin-bottom: 1rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid #e0e0e0;
}

.component-row:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.component-label {
    flex: 0 0 150px;
    font-weight: 600;
    color: var(--dark-color);
}

.component-value {
    flex: 1;
    word-break: break-all;
}

.about-section {
    background-color: var(--light-color);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 2rem;
    margin-bottom: 2rem;
}

.about-section h2 {
    margin-bottom: 1.5rem;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.about-section p {
    margin-bottom: 1.5rem;
    color: #555;
    line-height: 1.7;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.feature-card {
    display: flex;
    background-color: var(--secondary-color);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    transition: transform 0.3s, box-shadow 0.3s;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--box-shadow);
}

.feature-icon {
    flex: 0 0 40px;
    height: 40px;
    background-color: rgba(26, 152, 55, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 1.2rem;
    margin-right: 1rem;
}

.feature-content h3 {
    margin-bottom: 0.5rem;
    color: var(--dark-color);
    font-size: 1.1rem;
}

.feature-content p {
    margin-bottom: 0;
    font-size: 0.95rem;
}

.contact-info {
    background-color: #f0f8f1;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    border-left: 4px solid var(--primary-color);
    margin-top: 2rem;
}

.contact-info a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.contact-info a:hover {
    text-decoration: underline;
}

.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: var(--dark-color);
    color: var(--light-color);
    padding: 1rem 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 1000;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

@media (max-width: 768px) {
    .options-grid {
        grid-template-columns: 1fr;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
    
    .feature-grid {
        grid-template-columns: 1fr;
    }
    
    .text-controls {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .tool-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .mode-switch {
        width: 100%;
    }
    
    .mode-btn {
        flex: 1;
        text-align: center;
    }
    
    .component-row {
        flex-direction: column;
    }
    
    .component-label {
        margin-bottom: 0.3rem;
    }
}