.iar-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 32px;
}

.iar-header {
    text-align: center;
    margin-bottom: 40px;
}

.iar-header h1 {
    font-size: 2.8rem;
    background: linear-gradient(135deg, #1e293b, #2c7da0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 15px;
}

.iar-header p {
    font-size: 1.1rem;
    color: #475569;
    max-width: 700px;
    margin: 0 auto;
}

.iar-tool-wrapper {
    background: white;
    border-radius: 32px;
    box-shadow: 0 25px 45px -12px rgba(0, 0, 0, 0.15);
    padding: 35px;
    margin-bottom: 50px;
}

.iar-mode-selector {
    display: flex;
    gap: 12px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.iar-mode-btn {
    padding: 10px 24px;
    border: 2px solid #e2e8f0;
    background: white;
    border-radius: 50px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
    color: #475569;
}

.iar-mode-btn:hover {
    border-color: #2c7da0;
    color: #2c7da0;
}

.iar-mode-btn.active {
    background: linear-gradient(135deg, #2c7da0, #1f5e7a);
    border-color: #2c7da0;
    color: white;
}

#iar-input-text {
    width: 100%;
    padding: 20px;
    border: 2px solid #e2e8f0;
    border-radius: 20px;
    font-size: 16px;
    line-height: 1.6;
    resize: vertical;
    transition: all 0.3s;
    font-family: inherit;
}

#iar-input-text:focus {
    outline: none;
    border-color: #2c7da0;
    box-shadow: 0 0 0 3px rgba(44, 125, 160, 0.1);
}

.iar-stats {
    margin-top: 12px;
    font-size: 13px;
    color: #64748b;
    display: flex;
    gap: 20px;
}

.iar-rewrite-btn {
    background: linear-gradient(135deg, #2c7da0, #1f5e7a);
    color: white;
    border: none;
    padding: 16px 32px;
    border-radius: 50px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 25px;
    width: 100%;
    transition: all 0.3s;
}

.iar-rewrite-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(44, 125, 160, 0.3);
}

.iar-loader {
    text-align: center;
    padding: 50px;
}

.iar-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #e2e8f0;
    border-top-color: #2c7da0;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.iar-output-section {
    margin-top: 35px;
    padding-top: 35px;
    border-top: 2px solid #eef2f6;
}

.iar-output-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.iar-output-header h3 {
    font-size: 1.4rem;
    color: #0f172a;
    margin: 0;
}

.iar-output-actions {
    display: flex;
    gap: 12px;
}

.iar-icon-btn {
    padding: 8px 20px;
    background: #f1f5f9;
    border: none;
    border-radius: 40px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    color: #334155;
}

.iar-icon-btn:hover {
    background: #e2e8f0;
    transform: scale(0.98);
}

.iar-output-text {
    background: #f8fafc;
    padding: 25px;
    border-radius: 20px;
    line-height: 1.7;
    font-size: 16px;
    color: #1e293b;
    min-height: 200px;
    border: 1px solid #e2e8f0;
}

.iar-output-stats {
    margin-top: 15px;
    font-size: 13px;
    color: #64748b;
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

#unique-score {
    color: #2c7da0;
    font-weight: 600;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 25px;
    margin-top: 25px;
}

.feature {
    text-align: center;
    padding: 25px 20px;
    background: white;
    border-radius: 24px;
    transition: all 0.3s;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.feature:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.feature span {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 12px;
}

.feature h4 {
    font-size: 1.1rem;
    margin: 10px 0 5px;
    color: #0f172a;
}

.feature p {
    font-size: 0.85rem;
    color: #64748b;
    margin: 0;
}

.iar-small {
    font-size: 12px;
    color: #94a3b8;
    margin-top: 8px;
}

@media (max-width: 768px) {
    .iar-container {
        padding: 20px 15px;
    }
    
    .iar-header h1 {
        font-size: 1.8rem;
    }
    
    .iar-tool-wrapper {
        padding: 20px;
    }
    
    .iar-mode-selector {
        gap: 8px;
    }
    
    .iar-mode-btn {
        padding: 6px 16px;
        font-size: 12px;
    }
    
    .iar-output-header {
        flex-direction: column;
        align-items: flex-start;
    }
}