/* Random Word Generator - Modern Styles */

/* Reset and Base Styles */
*, *::before, *::after {
    box-sizing: border-box;
}

.tool-page {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 80px 0 60px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-section::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="10" cy="90" r="0.5" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #ffffff 0%, #f0f4ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.3rem;
    margin-bottom: 40px;
    opacity: 0.95;
    line-height: 1.6;
    font-weight: 400;
}

.hero-features {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 30px;
}

.hero-feature {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 12px 20px;
    border-radius: 25px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.hero-feature:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.hero-feature i {
    font-size: 1.1rem;
}

/* Tool Container */
.tool-container {
    max-width: 1200px;
    margin: -40px auto 0;
    padding: 0 20px 60px;
    position: relative;
    z-index: 10;
}

/* Tab Navigation */
.tab-navigation {
    background: white;
    border-radius: 15px;
    padding: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 5px;
}

.mode-tab {
    background: transparent;
    border: none;
    padding: 15px 20px;
    border-radius: 10px;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-align: center;
    min-height: 80px;
    justify-content: center;
}

.mode-tab i {
    font-size: 1.4rem;
    margin-bottom: 4px;
}

.mode-tab span {
    font-size: 0.9rem;
    line-height: 1.2;
}

.mode-tab:hover {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    transform: translateY(-2px);
}

.mode-tab.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
    transform: translateY(-2px);
}

/* Tab Content */
.tab-content {
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.tab-pane {
    display: none;
    padding: 40px;
}

.tab-pane.active {
    display: block;
}

/* Input Section */
.input-section {
    margin-bottom: 40px;
}

.input-header {
    margin-bottom: 30px;
}

.input-header h3 {
    color: #1e293b;
    font-weight: 700;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.input-header h3 i {
    color: #667eea;
    font-size: 1.3rem;
}

/* Settings Grid */
.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.setting-card {
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
}

.setting-card:hover {
    border-color: #667eea;
    background: #f1f5ff;
    transform: translateY(-2px);
}

.setting-label {
    display: block;
    font-weight: 600;
    color: #374151;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.setting-label i {
    color: #667eea;
    font-size: 1.1rem;
}

.form-select, .form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: white;
    color: #374151;
}

.form-select:focus, .form-control:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    background: white;
}

/* Options Section */
.options-section {
    background: #f8fafc;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
    border: 2px solid #e2e8f0;
}

.options-title {
    color: #1e293b;
    font-weight: 700;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.options-title i {
    color: #667eea;
}

.options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.option-item {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 16px;
    transition: all 0.3s ease;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.option-item:hover {
    border-color: #667eea;
    background: #f9fafb;
}

.option-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 2px 0 0 0;
    accent-color: #667eea;
}

.form-check-label {
    flex: 1;
    cursor: pointer;
}

.form-check-label strong {
    display: block;
    color: #374151;
    margin-bottom: 4px;
    font-weight: 600;
}

.form-check-label small {
    color: #6b7280;
    font-size: 0.875rem;
    line-height: 1.4;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 30px;
}

.btn {
    padding: 12px 24px;
    border-radius: 10px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    font-size: 14px;
    line-height: 1.4;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover {
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #6b7280;
    color: white;
}

.btn-outline-primary {
    background: transparent;
    color: #667eea;
    border: 2px solid #667eea;
}

.btn-outline-primary:hover {
    background: #667eea;
    color: white;
}

.btn-outline-success {
    background: transparent;
    color: #10b981;
    border: 2px solid #10b981;
}

.btn-outline-success:hover {
    background: #10b981;
    color: white;
}

.btn-outline-warning {
    background: transparent;
    color: #f59e0b;
    border: 2px solid #f59e0b;
}

.btn-outline-warning:hover {
    background: #f59e0b;
    color: white;
}

.btn-success {
    background: #10b981;
    color: white;
}

/* Result Section */
.result-section {
    border-top: 3px solid #e2e8f0;
    padding-top: 40px;
    margin-top: 40px;
}

.result-header {
    margin-bottom: 30px;
}

.result-header h3 {
    color: #1e293b;
    font-weight: 700;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 12px;
}

.result-header h3 i {
    color: #667eea;
}

/* Statistics Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 25px;
    border-radius: 15px;
    text-align: center;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.2);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(102, 126, 234, 0.3);
}

.stat-icon {
    font-size: 2rem;
    opacity: 0.8;
}

.stat-content {
    flex: 1;
    text-align: left;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.9;
    font-weight: 500;
}

/* Format Section */
.format-section {
    margin-bottom: 30px;
}

.format-title {
    color: #1e293b;
    font-weight: 700;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.format-title i {
    color: #667eea;
}

.format-options {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-check {
    display: none;
}

.btn-check + .btn {
    background: #f8fafc;
    color: #64748b;
    border: 2px solid #e2e8f0;
}

.btn-check:checked + .btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: transparent;
}

/* Output Section */
.output-section {
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 20px;
}

.words-output {
    max-height: 400px;
    overflow-y: auto;
    line-height: 1.6;
}

.word-item {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 8px 16px;
    margin: 4px 8px 4px 0;
    border-radius: 20px;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
    transition: all 0.3s ease;
}

.word-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.word-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #374151;
}

.word-line {
    padding: 8px 0;
    border-bottom: 1px solid #e5e7eb;
    color: #374151;
    font-weight: 500;
}

.word-line:last-child {
    border-bottom: none;
}

.word-numbered {
    padding: 8px 0;
    color: #374151;
    font-weight: 500;
}

.copy-textarea {
    display: none !important;
}

/* Batch Section */
.batch-section, .examples-section, .history-section, .guide-section {
    padding: 40px;
}

.batch-header, .examples-header, .history-header, .guide-header {
    text-align: center;
    margin-bottom: 40px;
}

.batch-header h3, .examples-header h3, .history-header h3, .guide-header h3 {
    color: #1e293b;
    font-weight: 700;
    font-size: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 15px;
}

.batch-header h3 i, .examples-header h3 i, .history-header h3 i, .guide-header h3 i {
    color: #667eea;
    font-size: 1.8rem;
}

.batch-description, .examples-description, .history-description, .guide-description {
    font-size: 1.1rem;
    color: #64748b;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Batch Controls */
.batch-controls {
    background: #f8fafc;
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    border: 2px solid #e2e8f0;
}

.batch-item h4 {
    color: #1e293b;
    font-weight: 700;
    margin-bottom: 20px;
}

.batch-settings {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.setting-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.setting-row label {
    font-weight: 600;
    color: #374151;
}

/* Batch Results */
.batch-results {
    background: #f8fafc;
    border-radius: 15px;
    padding: 30px;
    border: 2px solid #e2e8f0;
}

.batch-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
}

.batch-results-header h4 {
    color: #1e293b;
    font-weight: 700;
    margin: 0;
}

.batch-actions {
    display: flex;
    gap: 10px;
}

.batch-lists-container {
    display: grid;
    gap: 20px;
}

.batch-list-item {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
}

.batch-list-item:hover {
    border-color: #667eea;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.1);
}

.batch-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 10px;
}

.batch-list-header h5 {
    color: #1e293b;
    font-weight: 600;
    margin: 0;
    text-transform: capitalize;
}

.batch-list-actions {
    display: flex;
    gap: 8px;
}

.batch-list-words {
    background: #f8fafc;
    padding: 15px;
    border-radius: 8px;
    color: #374151;
    line-height: 1.6;
    border: 1px solid #e2e8f0;
}

/* Examples Grid */
.examples-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.example-card {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 15px;
    padding: 25px;
    transition: all 0.3s ease;
    height: 100%;
}

.example-card:hover {
    border-color: #667eea;
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.1);
}

.example-header h4 {
    color: #1e293b;
    font-weight: 700;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
}

.example-header h4 i {
    color: #667eea;
    font-size: 1.2rem;
}

.example-content p {
    color: #64748b;
    line-height: 1.6;
    margin-bottom: 20px;
}

.example-demo {
    background: #f8fafc;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #e2e8f0;
}

.demo-words {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.demo-word {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 0.9rem;
    font-weight: 500;
}

.demo-result {
    color: #374151;
    font-style: italic;
    line-height: 1.5;
}

/* Quick Templates */
.quick-templates {
    background: #f8fafc;
    border-radius: 15px;
    padding: 30px;
    border: 2px solid #e2e8f0;
}

.quick-templates h4 {
    color: #1e293b;
    font-weight: 700;
    margin-bottom: 20px;
    text-align: center;
}

.template-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

/* History */
.history-container {
    max-height: 600px;
    overflow-y: auto;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #64748b;
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state h4 {
    color: #374151;
    margin-bottom: 10px;
}

.history-item {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

.history-item:hover {
    border-color: #667eea;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.1);
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    flex-wrap: wrap;
    gap: 10px;
}

.history-header h5 {
    color: #1e293b;
    font-weight: 600;
    margin: 0;
    text-transform: capitalize;
}

.history-actions {
    display: flex;
    gap: 8px;
}

.history-words {
    color: #64748b;
    line-height: 1.5;
    margin-bottom: 10px;
}

.history-meta {
    border-top: 1px solid #e5e7eb;
    padding-top: 10px;
}

/* Guide Content */
.guide-content {
    max-width: 800px;
    margin: 0 auto;
}

.guide-item {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    transition: all 0.3s ease;
}

.guide-item:hover {
    border-color: #667eea;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.1);
}

.guide-item h4 {
    color: #1e293b;
    font-weight: 700;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.guide-item h4 i {
    color: #667eea;
    font-size: 1.2rem;
}

.guide-item p, .guide-item li {
    color: #64748b;
    line-height: 1.6;
}

.guide-item ul {
    padding-left: 20px;
}

.guide-item li {
    margin-bottom: 8px;
}

/* Category Grid */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.category-item {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 15px;
    transition: all 0.3s ease;
}

.category-item:hover {
    border-color: #667eea;
    background: #f1f5ff;
}

.category-item strong {
    color: #667eea;
}

/* Use Cases */
.use-cases {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.use-case {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 20px;
    transition: all 0.3s ease;
}

.use-case:hover {
    border-color: #667eea;
    background: #f1f5ff;
    transform: translateY(-2px);
}

.use-case h5 {
    color: #1e293b;
    font-weight: 600;
    margin-bottom: 10px;
}

.use-case p {
    color: #64748b;
    line-height: 1.5;
    margin: 0;
}

/* Shortcuts */
.shortcuts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.shortcut {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.3s ease;
}

.shortcut:hover {
    border-color: #667eea;
    background: #f1f5ff;
}

.key {
    background: #667eea;
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-family: monospace;
    font-size: 0.875rem;
    font-weight: 600;
    white-space: nowrap;
}

.description {
    color: #64748b;
    font-weight: 500;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .hero-features {
        flex-direction: column;
        align-items: center;
    }
    
    .tab-navigation {
        grid-template-columns: 1fr;
        gap: 5px;
    }
    
    .mode-tab {
        flex-direction: row;
        justify-content: flex-start;
        text-align: left;
        min-height: auto;
        padding: 12px 15px;
    }
    
    .mode-tab i {
        font-size: 1.2rem;
        margin-bottom: 0;
    }
    
    .tab-pane {
        padding: 25px 20px;
    }
    
    .settings-grid {
        grid-template-columns: 1fr;
    }
    
    .options-grid {
        grid-template-columns: 1fr;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .format-options {
        flex-direction: column;
    }
    
    .batch-settings {
        grid-template-columns: 1fr;
    }
    
    .batch-results-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .batch-actions {
        width: 100%;
    }
    
    .batch-actions .btn {
        flex: 1;
    }
    
    .examples-grid {
        grid-template-columns: 1fr;
    }
    
    .category-grid,
    .use-cases,
    .shortcuts {
        grid-template-columns: 1fr;
    }
    
    .template-buttons {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .hero-content {
        padding: 0 15px;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .tool-container {
        padding: 0 15px 40px;
    }
    
    .tab-pane {
        padding: 20px 15px;
    }
    
    .setting-card,
    .options-section,
    .batch-controls,
    .batch-results,
    .quick-templates {
        padding: 20px 15px;
    }
}

/* Scrollbar Styling */
.words-output::-webkit-scrollbar,
.history-container::-webkit-scrollbar {
    width: 8px;
}

.words-output::-webkit-scrollbar-track,
.history-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.words-output::-webkit-scrollbar-thumb,
.history-container::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 4px;
}

.words-output::-webkit-scrollbar-thumb:hover,
.history-container::-webkit-scrollbar-thumb:hover {
    background: #5a67d8;
}

/* Animation Classes */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tab-pane.active {
    animation: fadeInUp 0.3s ease;
}

/* Focus States for Accessibility */
.mode-tab:focus,
.btn:focus,
.form-select:focus,
.form-control:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

.option-item input[type="checkbox"]:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}
