/* ======================
   MODERN AI SUMMARIZER STYLES
   ====================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --success-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --warning-gradient: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    --danger-gradient: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    --info-gradient: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-tertiary: #e2e8f0;
    
    --text-primary: #2d3748;
    --text-secondary: #4a5568;
    --text-muted: #718096;
    
    --border-color: #e2e8f0;
    --border-hover: #cbd5e0;
    
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.1);
    
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-primary);
    overflow-x: hidden;
}

/* ======================
   TOOL CONTAINER
   ====================== */

.tool-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* ======================
   TOOL HEADER
   ====================== */

.tool-header {
    background: var(--primary-gradient);
    border-radius: var(--radius-xl);
    padding: 3rem 2rem;
    margin-bottom: 2rem;
    color: white;
    position: relative;
    overflow: hidden;
}

.tool-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="white" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="white" opacity="0.1"/><circle cx="50" cy="10" r="0.5" fill="white" opacity="0.1"/><circle cx="20" cy="80" r="0.5" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    pointer-events: none;
}

.tool-title-section {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    position: relative;
    z-index: 1;
}

.tool-icon {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.tool-header h1 {
    font-size: 3rem;
    font-weight: 700;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.tool-description {
    font-size: 1.2rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0.5rem 0 0 0;
    line-height: 1.5;
}

.tool-stats {
    display: flex;
    gap: 2rem;
    position: relative;
    z-index: 1;
}

.stat-item {
    text-align: center;
    background: rgba(255, 255, 255, 0.1);
    padding: 1rem 1.5rem;
    border-radius: var(--radius-lg);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    min-width: 100px;
}

.stat-value {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ======================
   TOOL INSTRUCTIONS
   ====================== */

.tool-instructions {
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
}

.tool-instructions h2 {
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tool-instructions h2 i {
    color: #667eea;
}

.instructions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.instruction-card {
    background: var(--bg-primary);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.instruction-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary-gradient);
    transform: scaleX(0);
    transition: var(--transition);
}

.instruction-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--border-hover);
}

.instruction-card:hover::before {
    transform: scaleX(1);
}

.instruction-icon {
    width: 50px;
    height: 50px;
    background: var(--primary-gradient);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.instruction-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.instruction-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.5;
}

/* ======================
   SUMMARIZER CONTAINER
   ====================== */

.summarizer-container {
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
    margin-bottom: 3rem;
    border: 1px solid var(--border-color);
}

/* ======================
   TEMPLATE SECTION
   ====================== */

.template-section {
    padding: 2rem;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-bottom: 1px solid var(--border-color);
}

.template-section h3 {
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.template-section h3 i {
    color: #667eea;
}

.template-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.template-card {
    background: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    border: 2px solid var(--border-color);
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.template-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--primary-gradient);
    opacity: 0;
    transition: var(--transition);
}

.template-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: #667eea;
}

.template-card:hover::before {
    opacity: 0.05;
}

.template-card.active {
    border-color: #667eea;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
}

.template-icon {
    width: 40px;
    height: 40px;
    background: var(--primary-gradient);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
}

.template-card h4 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    position: relative;
    z-index: 1;
}

.template-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.4;
    position: relative;
    z-index: 1;
}

/* ======================
   TAB CONTAINER
   ====================== */

.tab-container {
    background: var(--bg-secondary);
}

.tab-buttons {
    display: flex;
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-color);
}

.tab-btn {
    flex: 1;
    padding: 1rem 1.5rem;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.tab-btn::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary-gradient);
    transform: scaleX(0);
    transition: var(--transition);
}

.tab-btn:hover {
    background: rgba(102, 126, 234, 0.1);
    color: var(--text-primary);
}

.tab-btn.active {
    background: var(--bg-secondary);
    color: #667eea;
    font-weight: 600;
}

.tab-btn.active::after {
    transform: scaleX(1);
}

.tab-content {
    display: none;
    padding: 2rem;
}

.tab-content.active {
    display: block;
}

/* ======================
   INPUT SECTION
   ====================== */

.input-section {
    margin-bottom: 2rem;
}

.text-input-container {
    margin-bottom: 2rem;
}

.text-input-container label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    font-size: 1rem;
}

.text-input-container label i {
    color: #667eea;
}

.textarea-wrapper {
    position: relative;
}

.textarea-wrapper textarea {
    width: 100%;
    min-height: 200px;
    padding: 1.5rem;
    padding-right: 120px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    font-size: 1rem;
    font-family: inherit;
    line-height: 1.6;
    resize: vertical;
    transition: var(--transition);
    background: var(--bg-secondary);
}

.textarea-wrapper textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.textarea-wrapper textarea::placeholder {
    color: var(--text-muted);
}

.textarea-tools {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: flex;
    gap: 0.5rem;
}

.tool-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

.tool-btn:hover {
    background: var(--primary-gradient);
    color: white;
    transform: scale(1.05);
}

.text-stats {
    display: flex;
    gap: 2rem;
    margin-top: 0.75rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    flex-wrap: wrap;
}

.text-stats span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.text-stats i {
    font-size: 0.8rem;
}

/* ======================
   OPTIONS SECTION
   ====================== */

.options-section {
    background: var(--bg-primary);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
}

.options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.option-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.option-group label i {
    color: #667eea;
    font-size: 0.9rem;
}

.option-group select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    font-family: inherit;
    background: var(--bg-secondary);
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition);
}

.option-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.action-buttons {
    display: flex;
    gap: 1rem;
}

.primary-btn, .secondary-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    border: none;
    border-radius: var(--radius-lg);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.primary-btn {
    background: var(--primary-gradient);
    color: white;
    flex: 1;
    min-height: 50px;
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.primary-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.secondary-btn {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 2px solid var(--border-color);
    min-width: 180px;
}

.secondary-btn:hover:not(:disabled) {
    border-color: #667eea;
    color: #667eea;
    transform: translateY(-1px);
}

.secondary-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ======================
   OUTPUT SECTION
   ====================== */

.output-section {
    border-top: 1px solid var(--border-color);
    padding-top: 2rem;
}

.output-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.output-header h3 {
    color: var(--text-primary);
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
}

.output-header h3 i {
    color: #667eea;
}

.summary-metrics {
    display: flex;
    gap: 1rem;
}

.metric-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.metric-badge i {
    color: #667eea;
}

.output-container {
    position: relative;
    margin-bottom: 1.5rem;
}

.output-text {
    min-height: 200px;
    padding: 1.5rem;
    padding-right: 120px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    font-size: 1rem;
    line-height: 1.6;
    background: var(--bg-secondary);
    white-space: pre-wrap;
    word-wrap: break-word;
    transition: var(--transition);
}

.output-text:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.output-text:empty::before {
    content: attr(placeholder);
    color: var(--text-muted);
    font-style: italic;
}

.output-tools {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: flex;
    gap: 0.5rem;
}

.summary-stats {
    display: flex;
    gap: 2rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    flex-wrap: wrap;
}

.stat-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 100px;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.25rem;
}

.stat-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.output-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
}

.action-btn:hover:not(:disabled) {
    border-color: #667eea;
    color: #667eea;
    transform: translateY(-1px);
}

.action-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ======================
   MULTIPLE FORMATS
   ====================== */

.multiple-formats-container {
    max-width: 100%;
}

.formats-input {
    margin-bottom: 2rem;
}

.formats-input label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.formats-input textarea {
    width: 100%;
    min-height: 150px;
    padding: 1.5rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    font-size: 1rem;
    font-family: inherit;
    line-height: 1.6;
    resize: vertical;
    transition: var(--transition);
    background: var(--bg-secondary);
    margin-bottom: 1rem;
}

.formats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1.5rem;
}

.format-card {
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    transition: var(--transition);
}

.format-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.format-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.format-title {
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.format-badge {
    padding: 0.25rem 0.75rem;
    background: var(--primary-gradient);
    color: white;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.format-content {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1rem;
    min-height: 120px;
}

.format-actions {
    display: flex;
    gap: 0.5rem;
}

.format-btn {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-secondary);
    color: var(--text-secondary);
    font-size: 0.8rem;
    cursor: pointer;
    transition: var(--transition);
}

.format-btn:hover {
    border-color: #667eea;
    color: #667eea;
}

/* ======================
   CONTENT ANALYSIS
   ====================== */

.analysis-container {
    max-width: 100%;
}

.analysis-header {
    text-align: center;
    margin-bottom: 2rem;
}

.analysis-header h3 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.analysis-panels {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.analysis-panel {
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.analysis-panel h4 {
    background: var(--primary-gradient);
    color: white;
    padding: 1rem 1.5rem;
    margin: 0;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.themes-list, .structure-analysis {
    padding: 1.5rem;
    min-height: 200px;
}

.analysis-placeholder {
    text-align: center;
    color: var(--text-muted);
    padding: 2rem;
}

.analysis-placeholder i {
    font-size: 2rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.theme-tag {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    margin: 0.25rem;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.structure-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}

.structure-item:last-child {
    border-bottom: none;
}

.structure-label {
    font-weight: 500;
    color: var(--text-primary);
}

.structure-value {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.analysis-actions {
    text-align: center;
}

/* ======================
   HISTORY PANEL
   ====================== */

.history-panel {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    margin-top: 2rem;
    overflow: hidden;
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
}

.history-header h3 {
    margin: 0;
    color: var(--text-primary);
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.toggle-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.toggle-btn:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.history-content {
    max-height: 300px;
    overflow-y: auto;
    transition: var(--transition);
}

.history-content.collapsed {
    max-height: 0;
    overflow: hidden;
}

.history-empty {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--text-muted);
}

.history-empty i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.history-item {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
}

.history-item:hover {
    background: var(--bg-primary);
}

.history-item:last-child {
    border-bottom: none;
}

.history-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.history-date {
    color: var(--text-muted);
}

.history-settings {
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.history-preview {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.history-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.history-btn {
    padding: 0.25rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-secondary);
    color: var(--text-secondary);
    font-size: 0.8rem;
    cursor: pointer;
    transition: var(--transition);
}

.history-btn:hover {
    border-color: #667eea;
    color: #667eea;
}

/* ======================
   BLOG CONTENT
   ====================== */

.blog-content {
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
    padding: 3rem 2rem;
    margin-bottom: 3rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
}

.blog-content h2 {
    text-align: center;
    color: var(--text-primary);
    margin-bottom: 3rem;
    font-size: 2rem;
    position: relative;
}

.blog-content h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--primary-gradient);
    border-radius: 2px;
}

.blog-content article {
    margin-bottom: 3rem;
}

.blog-content h3 {
    color: #667eea;
    margin-bottom: 1rem;
    font-size: 1.4rem;
}

.blog-content h4 {
    color: var(--text-primary);
    margin: 1.5rem 0 0.8rem;
    font-size: 1.1rem;
}

.blog-content p {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 1rem;
}

.blog-content ul,
.blog-content ol {
    padding-left: 2rem;
    margin: 1.5rem 0;
}

.blog-content li {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 0.75rem;
}

.blog-content strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* ======================
   FAQ SECTION
   ====================== */

.faq-section {
    margin-bottom: 3rem;
}

.faq-section h2 {
    text-align: center;
    color: var(--text-primary);
    margin-bottom: 3rem;
    font-size: 2rem;
    position: relative;
}

.faq-section h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--primary-gradient);
    border-radius: 2px;
}

.faq-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 1.5rem;
}

.faq-item {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.faq-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary-gradient);
    transform: scaleX(0);
    transition: var(--transition);
}

.faq-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.faq-item:hover::before {
    transform: scaleX(1);
}

.faq-item h3 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-size: 1.2rem;
    line-height: 1.4;
}

.faq-item p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

/* ======================
   NOTIFICATION SYSTEM
   ====================== */

#notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    pointer-events: none;
}

.notification {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1rem 1.5rem;
    margin-bottom: 0.5rem;
    box-shadow: var(--shadow-lg);
    transform: translateX(400px);
    transition: var(--transition);
    pointer-events: auto;
    max-width: 350px;
    position: relative;
    overflow: hidden;
}

.notification::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 4px;
    background: var(--primary-gradient);
}

.notification.success::before {
    background: var(--success-gradient);
}

.notification.error::before {
    background: var(--danger-gradient);
}

.notification.warning::before {
    background: var(--warning-gradient);
}

.notification.show {
    transform: translateX(0);
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.notification-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    color: white;
    background: var(--primary-gradient);
}

.notification.success .notification-icon {
    background: var(--success-gradient);
}

.notification.error .notification-icon {
    background: var(--danger-gradient);
}

.notification.warning .notification-icon {
    background: var(--warning-gradient);
}

.notification-text {
    flex: 1;
    color: var(--text-primary);
    font-size: 0.9rem;
    line-height: 1.4;
}

.notification-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.notification-close:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

/* ======================
   RESPONSIVE DESIGN
   ====================== */

@media (max-width: 1200px) {
    .tool-container {
        padding: 1.5rem 1rem;
    }
    
    .tool-header {
        padding: 2rem 1.5rem;
    }
    
    .tool-stats {
        gap: 1rem;
    }
}

@media (max-width: 768px) {
    .tool-header h1 {
        font-size: 2rem;
    }
    
    .tool-description {
        font-size: 1rem;
    }
    
    .tool-title-section {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .tool-stats {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .instructions-grid {
        grid-template-columns: 1fr;
    }
    
    .template-cards {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
    
    .options-grid {
        grid-template-columns: 1fr;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .output-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .summary-metrics {
        gap: 0.5rem;
        flex-wrap: wrap;
    }
    
    .summary-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .output-actions {
        flex-direction: column;
    }
    
    .action-btn {
        justify-content: center;
    }
    
    .analysis-panels {
        grid-template-columns: 1fr;
    }
    
    .formats-grid {
        grid-template-columns: 1fr;
    }
    
    .faq-grid {
        grid-template-columns: 1fr;
    }
    
    .tab-buttons {
        flex-direction: column;
    }
    
    .tab-btn {
        border-radius: 0;
        border-bottom: 1px solid var(--border-color);
    }
    
    .tab-btn:last-child {
        border-bottom: none;
    }
}

@media (max-width: 480px) {
    .tool-container {
        padding: 1rem 0.5rem;
    }
    
    .tool-header {
        padding: 1.5rem 1rem;
    }
    
    .tool-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .tool-header h1 {
        font-size: 1.75rem;
    }
    
    .tool-instructions,
    .summarizer-container,
    .blog-content {
        padding: 1.5rem 1rem;
    }
    
    .template-section {
        padding: 1.5rem 1rem;
    }
    
    .tab-content {
        padding: 1.5rem 1rem;
    }
    
    .textarea-wrapper textarea,
    .output-text {
        padding: 1rem;
        padding-right: 50px;
    }
    
    .textarea-tools,
    .output-tools {
        top: 0.75rem;
        right: 0.75rem;
    }
    
    .tool-btn {
        width: 32px;
        height: 32px;
        font-size: 0.8rem;
    }
    
    .text-stats {
        gap: 1rem;
    }
    
    .summary-stats {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .faq-item {
        padding: 1.5rem 1rem;
    }
    
    #notification-container {
        left: 10px;
        right: 10px;
        top: 10px;
    }
    
    .notification {
        max-width: none;
        transform: translateY(-100px);
    }
    
    .notification.show {
        transform: translateY(0);
    }
}

/* ======================
   DARK MODE SUPPORT
   ====================== */

@media (prefers-color-scheme: dark) {
    :root {
        --bg-primary: #1a202c;
        --bg-secondary: #2d3748;
        --bg-tertiary: #4a5568;
        
        --text-primary: #f7fafc;
        --text-secondary: #e2e8f0;
        --text-muted: #a0aec0;
        
        --border-color: #4a5568;
        --border-hover: #718096;
    }
    
    .textarea-wrapper textarea,
    .output-text,
    .option-group select,
    .formats-input textarea {
        background: var(--bg-secondary);
        color: var(--text-primary);
    }
    
    .tool-btn:hover {
        background: var(--primary-gradient);
        color: white;
    }
}

/* ======================
   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.2), transparent);
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ======================
   ACCESSIBILITY
   ====================== */

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus styles for better accessibility */
button:focus-visible,
select:focus-visible,
textarea:focus-visible,
[contenteditable]:focus-visible {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* ======================
   UTILITY CLASSES
   ====================== */

.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.hidden {
    display: none;
}

.visible {
    display: block;
}

.fade-in {
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-up {
    animation: slideUp 0.3s ease-in-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}