/* Text Summarizer Tool Styles */

:root {
    --primary-color: #16a085;
    --primary-hover: #138d75;
    --secondary-color: #2c3e50;
    --accent-color: #e74c3c;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --info-color: #3498db;
    --light-bg: #f8f9fa;
    --card-bg: #ffffff;
    --border-color: #e9ecef;
    --text-primary: #2c3e50;
    --text-secondary: #6c757d;
    --text-muted: #adb5bd;
    --gradient-start: #16a085;
    --gradient-end: #2c3e50;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    padding: 4rem 0;
    margin-bottom: 3rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
}

.hero-section .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="60" height="60" viewBox="0 0 60 60" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd"><g fill="%23ffffff" fill-opacity="0.1"><circle cx="30" cy="30" r="2"/></g></svg>');
    animation: float 20s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-title {
    color: white;
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.hero-subtitle {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.25rem;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

.hero-features {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.hero-feature {
    color: white;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.hero-feature i {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* Tool Container */
.tool-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Tab Navigation */
.tab-navigation {
    display: flex;
    background: var(--card-bg);
    border-radius: 12px;
    padding: 0.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    overflow-x: auto;
    gap: 0.25rem;
}

.mode-tab {
    flex: 1;
    min-width: 160px;
    padding: 1rem;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-weight: 500;
    white-space: nowrap;
}

.mode-tab:hover {
    background: var(--light-bg);
    color: var(--primary-color);
}

.mode-tab.active {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(22, 160, 133, 0.3);
}

.mode-tab i {
    font-size: 1.1rem;
}

/* Tab Content */
.tab-content {
    min-height: 600px;
}

.tab-pane {
    display: none;
    animation: fadeIn 0.3s ease-in-out;
}

.tab-pane.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Input Section */
.input-section {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.input-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.input-header h3 {
    color: var(--text-primary);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.input-controls {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.form-select {
    padding: 0.5rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background: var(--card-bg);
    color: var(--text-primary);
    font-size: 0.9rem;
    transition: all 0.3s ease;
    min-width: 120px;
}

.form-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(22, 160, 133, 0.1);
}

/* Textarea Container */
.textarea-container {
    position: relative;
    margin-bottom: 1rem;
}

#text-input {
    width: 100%;
    min-height: 300px;
    padding: 1.5rem;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    resize: vertical;
    transition: all 0.3s ease;
    background: var(--card-bg);
    color: var(--text-primary);
}

#text-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(22, 160, 133, 0.1);
}

#text-input::placeholder {
    color: var(--text-muted);
    font-style: italic;
}

/* Textarea Footer */
.textarea-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 1rem 0;
    border-top: 1px solid var(--border-color);
}

.text-stats {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.text-stats span {
    white-space: nowrap;
}

.input-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    font-size: 0.9rem;
    white-space: nowrap;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(22, 160, 133, 0.3);
}

.btn-primary:disabled {
    background: var(--text-muted);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-outline {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.btn-secondary {
    background: var(--text-secondary);
    color: white;
}

.btn-secondary:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
}

/* Custom Length Section */
.custom-length-section {
    background: var(--light-bg);
    padding: 1.5rem;
    border-radius: 8px;
    margin-top: 1rem;
}

.custom-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.custom-controls label {
    font-weight: 500;
    color: var(--text-primary);
}

.form-range {
    flex: 1;
    min-width: 200px;
}

#sentences-value {
    font-weight: 600;
    color: var(--primary-color);
    min-width: 30px;
    text-align: center;
}

/* Advanced Options */
.advanced-options {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.advanced-options h4 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.option-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-check-input {
    width: 18px;
    height: 18px;
    accent-color: var(--primary-color);
}

.option-item label {
    color: var(--text-primary);
    cursor: pointer;
    font-size: 0.9rem;
}

/* Results Section */
.results-section {
    animation: slideIn 0.5s ease-out;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Summary Card */
.summary-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    border-left: 4px solid var(--primary-color);
}

.summary-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.summary-header h3 {
    color: var(--text-primary);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.summary-meta {
    display: flex;
    gap: 1rem;
}

.summary-type, .reduction-rate {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.summary-type {
    background: var(--primary-color);
    color: white;
}

.reduction-rate {
    background: var(--light-bg);
    color: var(--text-primary);
}

.summary-content {
    background: var(--light-bg);
    padding: 1.5rem;
    border-radius: 8px;
    line-height: 1.7;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    min-height: 100px;
}

.summary-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* Statistics Section */
.stats-section {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.stats-section h3 {
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.stat-card {
    background: var(--light-bg);
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
}

/* Keywords Section */
.keywords-section {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.keywords-section h3 {
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.keywords-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.keyword-tag {
    background: var(--primary-color);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: transform 0.3s ease;
}

.keyword-tag:hover {
    transform: scale(1.05);
}

.keyword-tag.high-importance {
    background: var(--accent-color);
}

.keyword-tag.medium-importance {
    background: var(--warning-color);
}

.keyword-tag.low-importance {
    background: var(--info-color);
}

/* Export Section */
.export-section {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.export-section h3 {
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.export-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* Batch Section */
.batch-section {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.batch-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.batch-header h3 {
    color: var(--text-primary);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.batch-controls {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.batch-list {
    min-height: 400px;
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    padding: 2rem;
}

.batch-item {
    background: var(--light-bg);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.batch-item-content {
    flex: 1;
}

.batch-item-title {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.batch-item-meta {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.batch-item-actions {
    display: flex;
    gap: 0.25rem;
}

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
}

/* Compare Section */
.compare-section {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.compare-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.compare-header h3 {
    color: var(--text-primary);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.compare-controls {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.comparison-list {
    min-height: 400px;
}

.comparison-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
}

.comparison-item {
    background: var(--light-bg);
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

.comparison-method {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.comparison-content {
    color: var(--text-primary);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.comparison-stats {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* History Section */
.history-section {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.history-header h3 {
    color: var(--text-primary);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.history-controls {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.history-list {
    min-height: 400px;
}

.history-item {
    background: var(--light-bg);
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    border-left: 4px solid var(--primary-color);
}

.history-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.history-date {
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.history-method {
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 500;
}

.history-content {
    color: var(--text-primary);
    line-height: 1.6;
    margin-bottom: 1rem;
    max-height: 100px;
    overflow: hidden;
    position: relative;
}

.history-content.expanded {
    max-height: none;
}

.history-actions {
    display: flex;
    gap: 0.25rem;
    flex-wrap: wrap;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state h4 {
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.empty-state p {
    margin: 0;
}

/* Guide Section */
.guide-section {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.guide-section h3 {
    color: var(--text-primary);
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.guide-content {
    max-width: 800px;
}

.guide-card {
    background: var(--light-bg);
    padding: 2rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.guide-card h4 {
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.method-explanations, .use-cases {
    display: grid;
    gap: 1.5rem;
}

.method-item, .use-case-item {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

.method-item h5, .use-case-item h5 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.method-item p, .use-case-item p {
    color: var(--text-primary);
    line-height: 1.6;
    margin-bottom: 0.5rem;
}

.tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.tip-category {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 8px;
}

.tip-category h5 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.tip-category ul {
    margin: 0;
    padding-left: 1rem;
}

.tip-category li {
    color: var(--text-primary);
    line-height: 1.6;
    margin-bottom: 0.5rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .hero-features {
        gap: 1rem;
    }
    
    .hero-feature {
        font-size: 0.9rem;
    }
    
    .tab-navigation {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .mode-tab {
        min-width: auto;
    }
    
    .input-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .input-controls {
        width: 100%;
    }
    
    .form-select {
        flex: 1;
        min-width: auto;
    }
    
    .textarea-footer {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .text-stats {
        order: 2;
    }
    
    .input-actions {
        order: 1;
        width: 100%;
    }
    
    .btn {
        flex: 1;
        justify-content: center;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .batch-header, .compare-header, .history-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .batch-controls, .compare-controls, .history-controls {
        width: 100%;
    }
    
    .tips-grid {
        grid-template-columns: 1fr;
    }
    
    .comparison-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .hero-section {
        padding: 2rem 0;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .input-section {
        padding: 1rem;
    }
    
    .summary-card {
        padding: 1rem;
    }
    
    .stats-section {
        padding: 1rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .export-buttons {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
}

/* Loading States */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Success/Error States */
.success-message {
    background: var(--success-color);
    color: white;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.error-message {
    background: var(--accent-color);
    color: white;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Tooltips */
.tooltip {
    position: relative;
    cursor: help;
}

.tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--secondary-color);
    color: white;
    padding: 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 10;
}

.tooltip:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-5px);
}

/* Progress Bar */
.progress-bar {
    width: 100%;
    height: 4px;
    background: var(--border-color);
    border-radius: 2px;
    overflow: hidden;
    margin: 1rem 0;
}

.progress-bar-fill {
    height: 100%;
    background: var(--primary-color);
    transition: width 0.3s ease;
    width: 0%;
}

/* Fade transitions */
.fade-enter-active, .fade-leave-active {
    transition: opacity 0.3s;
}

.fade-enter, .fade-leave-to {
    opacity: 0;
}
