.translator-section {
    padding: 40px 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.translator-section .container {
    max-width: 900px;
}

.calculator-header {
    text-align: center;
    margin-bottom: 30px;
}

.calculator-title {
    font-size: 2.5rem;
    color: #fff;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.calculator-title i {
    margin-right: 15px;
    font-size: 2.2rem;
}

.calculator-subtitle {
    font-size: 1.1rem;
    color: rgba(255,255,255,0.9);
    margin-bottom: 20px;
}

.calculator-badge {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

.badge-item {
    background: rgba(255,255,255,0.2);
    color: #fff;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    backdrop-filter: blur(10px);
}

.translator-main {
    background: #fff;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
}

.translate-box {
    margin-bottom: 30px;
}

.box-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
}

.lang-selector {
    flex: 1;
    max-width: 200px;
}

.lang-select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e8e8e8;
    border-radius: 8px;
    font-size: 1rem;
    background: #fafafa;
    cursor: pointer;
    transition: all 0.3s ease;
}

.lang-select:focus {
    outline: none;
    border-color: #667eea;
    background: #fff;
}

.swap-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.swap-btn:hover {
    transform: rotate(180deg);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.box-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.input-text, .output-text {
    width: 100%;
    min-height: 180px;
    padding: 16px;
    border: 2px solid #e8e8e8;
    border-radius: 12px;
    font-size: 1rem;
    line-height: 1.6;
    resize: vertical;
    transition: all 0.3s ease;
}

.input-text:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.output-text {
    background: #f8f9fa;
    color: #333;
    cursor: pointer;
}

.output-text:hover {
    background: #f0f1f2;
}

.box-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.char-count {
    color: #999;
    font-size: 0.9rem;
}

.translate-btn {
    padding: 12px 32px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.translate-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.translate-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.clear-btn {
    padding: 12px 24px;
    border: 2px solid #e8e8e8;
    border-radius: 8px;
    background: #fff;
    color: #666;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.clear-btn:hover {
    border-color: #667eea;
    color: #667eea;
}

.quick-section {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid #e8e8e8;
}

.quick-title {
    font-size: 1.3rem;
    color: #333;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
}

.quick-title i {
    margin-right: 10px;
    color: #667eea;
}

.quick-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}

.quick-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    background: #f8f9fa;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.quick-item:hover {
    background: #fff;
    border-color: #667eea;
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.15);
    transform: translateY(-2px);
}

.quick-text {
    font-weight: 500;
    color: #333;
}

.quick-arrow {
    color: #667eea;
    font-weight: bold;
}

.quick-lang {
    font-size: 0.85rem;
    color: #999;
}

.history-section {
    margin-top: 30px;
    padding: 25px;
    background: #f8f9fa;
    border-radius: 12px;
}

.history-title {
    font-size: 1.2rem;
    color: #333;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}

.history-title i {
    margin-right: 10px;
    color: #667eea;
}

.history-list {
    max-height: 200px;
    overflow-y: auto;
}

.history-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 0;
    border-bottom: 1px solid #e8e8e8;
}

.history-item:last-child {
    border-bottom: none;
}

.history-input, .history-output {
    flex: 1;
    min-width: 0;
}

.history-lang {
    display: inline-block;
    font-size: 0.75rem;
    color: #667eea;
    margin-right: 8px;
    font-weight: 600;
}

.history-text {
    font-size: 0.9rem;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.history-time {
    font-size: 0.75rem;
    color: #999;
    white-space: nowrap;
}

.empty-history {
    text-align: center;
    color: #999;
    padding: 20px;
}

.calculator-guide {
    margin-top: 30px;
    padding: 30px;
    background: rgba(255,255,255,0.1);
    border-radius: 16px;
    backdrop-filter: blur(10px);
}

.guide-title {
    font-size: 1.3rem;
    color: #fff;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
}

.guide-title i {
    margin-right: 10px;
}

.guide-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.guide-item {
    text-align: center;
    padding: 20px;
    background: rgba(255,255,255,0.1);
    border-radius: 12px;
}

.guide-icon {
    width: 50px;
    height: 50px;
    margin: 0 auto 10px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.3rem;
}

.guide-item h3 {
    color: #fff;
    font-size: 1rem;
    margin-bottom: 5px;
}

.guide-item p {
    color: rgba(255,255,255,0.8);
    font-size: 0.9rem;
    margin: 0;
}

.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: rgba(0,0,0,0.8);
    color: #fff;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 0.9rem;
    z-index: 10000;
    opacity: 0;
    transition: all 0.3s ease;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

@media (max-width: 768px) {
    .box-body {
        grid-template-columns: 1fr;
    }
    
    .box-header {
        flex-wrap: wrap;
    }
    
    .lang-selector {
        max-width: 100%;
        flex: none;
        width: calc(50% - 8px);
    }
    
    .swap-btn {
        order: -1;
    }
    
    .box-footer {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .quick-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    
    .calculator-title {
        font-size: 1.8rem;
    }
}