/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
header {
    text-align: center;
    margin-bottom: 40px;
    color: white;
}

header h1 {
    font-size: 3rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

header h1 i {
    margin-right: 10px;
}

header p {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 20px;
}

/* Mode toggle */
.mode-toggle {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 35px;
    overflow: hidden;
    min-height: 60px;
}

.mode-toggle-label {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
    cursor: pointer;
    margin-bottom: 8px;
}

.mode-toggle-input {
    opacity: 0;
    width: 0;
    height: 0;
}

.mode-toggle-slider {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    border-radius: 34px;
    transition: 0.4s;
}

.mode-toggle-slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    border-radius: 50%;
    transition: 0.4s;
}

.mode-toggle-input:checked + .mode-toggle-slider {
    background-color: #667eea;
}

.mode-toggle-input:checked + .mode-toggle-slider:before {
    transform: translateX(26px);
}

.mode-toggle-text {
    position: relative;
    display: block;
    text-align: center;
    font-size: 0.9rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    height: 24px;
    overflow: visible;
    margin-top: 8px;
    transition: all 0.3s ease;
}

.convergent-text, .divergent-text {
    position: absolute;
    left: 50%;
    top: 0;
    transform: translateX(-50%);
    opacity: 0;
    transition: all 0.3s ease;
    white-space: nowrap;
    line-height: 24px;
}

.convergent-text {
    opacity: 1;
}

.divergent-text {
    opacity: 0;
}

.mode-description {
    transition: all 0.3s ease;
    opacity: 0.8;
    margin-top: 12px;
}

.mode-description small {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.85rem;
}

/* Main content */
main {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    margin-bottom: 20px;
}

/* Watershed explorer */
.watershed-explorer {
    margin-bottom: 40px;
}

#initialPrompt {
    text-align: center;
    margin-bottom: 30px;
}

#initialPrompt h2 {
    color: #4a5568;
    margin-bottom: 15px;
    font-size: 1.8rem;
}

#initialPrompt p {
    color: #718096;
    font-size: 1.1rem;
    margin-bottom: 20px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.custom-interest-section {
    margin-bottom: 30px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.custom-interest-input {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.custom-interest-input input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s ease;
}

.custom-interest-input input:focus {
    outline: none;
    border-color: #667eea;
}

.custom-interest-btn {
    padding: 12px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    white-space: nowrap;
}

.custom-interest-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

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

.custom-interest-hint {
    color: #a0aec0;
    font-size: 0.9rem;
    font-style: italic;
    text-align: center;
    margin: 0;
}

.or-divider {
    text-align: center;
    margin: 25px 0;
    position: relative;
}

.or-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e2e8f0;
}

.or-divider span {
    background: white;
    padding: 0 15px;
    color: #718096;
    font-size: 0.9rem;
    position: relative;
    font-weight: 500;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.category-card {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    border-color: #667eea;
}

.category-card i {
    font-size: 2.5rem;
    color: #667eea;
    margin-bottom: 15px;
}

.category-card h3 {
    color: #2d3748;
    margin-bottom: 10px;
    font-size: 1.3rem;
}

.category-card p {
    color: #718096;
    font-size: 0.95rem;
    line-height: 1.4;
}

/* Watershed interface */
#watershedInterface {
    max-width: 800px;
    margin: 0 auto;
}

.watershed-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.back-btn {
    background: #f7fafc;
    color: #4a5568;
    border: 1px solid #e2e8f0;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
}

.back-btn:hover {
    background: #e2e8f0;
    transform: translateY(-1px);
}

.collected-topics {
    flex: 1;
    min-width: 250px;
}

.accumulated-topics {
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 2px solid #e9ecef;
}

.accumulated-topic-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
    margin-bottom: 10px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

.accumulated-topic-card:hover {
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    border-color: #667eea;
}

.accumulated-topic-title {
    font-weight: 600;
    color: #2d3748;
    font-size: 1rem;
    flex: 1;
}

.accumulated-search-buttons {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.watershed-content h2 {
    color: #4a5568;
    margin-bottom: 15px;
    font-size: 1.6rem;
}

.watershed-content p {
    color: #718096;
    margin-bottom: 25px;
    font-size: 1rem;
    line-height: 1.5;
}

.watershed-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.watershed-option {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 20px;
    transition: all 0.3s ease;
    text-align: center;
}

.watershed-option:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border-color: #667eea;
}

.watershed-option.selected {
    background: #ebf8ff;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.option-content {
    cursor: pointer;
    margin-bottom: 12px;
}

.watershed-option h4 {
    color: #2d3748;
    margin-bottom: 8px;
    font-size: 1.1rem;
}

.watershed-option p {
    color: #718096;
    font-size: 0.9rem;
    line-height: 1.4;
}


.watershed-option .search-buttons {
    margin-top: 12px;
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
}

.watershed-option .search-btn {
    flex: 1;
    min-width: 70px;
    padding: 6px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    transition: all 0.2s ease;
}

.watershed-option .search-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.watershed-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.continue-btn, .finish-btn {
    padding: 12px 25px;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    border: none;
}

.continue-btn {
    background: #48bb78;
    color: white;
}

.continue-btn:hover {
    background: #38a169;
    transform: translateY(-2px);
}

.finish-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.finish-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}


/* Interest input section */
.interest-input {
    margin-bottom: 40px;
}

.interest-input h2 {
    color: #4a5568;
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.input-container {
    margin-bottom: 20px;
}

.interest-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
    min-height: 40px;
}

.interest-tag {
    background: #e2e8f0;
    color: #4a5568;
    padding: 8px 12px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.interest-tag:hover {
    background: #cbd5e0;
}

.interest-tag .remove {
    cursor: pointer;
    color: #a0aec0;
    font-weight: bold;
}

.interest-tag .remove:hover {
    color: #e53e3e;
}

#interestInput {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s ease;
}

#interestInput:focus {
    outline: none;
    border-color: #667eea;
}

/* Popular interests */
.popular-interests {
    margin: 20px 0;
}

.popular-interests p {
    color: #4a5568;
    margin-bottom: 10px;
    font-weight: 500;
}

.popular-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.popular-tag {
    background: #f7fafc;
    color: #4a5568;
    padding: 6px 12px;
    border-radius: 15px;
    cursor: pointer;
    font-size: 0.85rem;
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
}

.popular-tag:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

/* Generate button */
.generate-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: block;
    margin: 0 auto;
}

.generate-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

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

.generate-btn i {
    margin-right: 8px;
}

/* Generate again section */
.generate-again-section {
    text-align: center;
    margin-bottom: 20px;
}

.generate-again-btn {
    background: #f8f9fa;
    color: #495057;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    padding: 10px 20px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.generate-again-btn:hover:not(:disabled) {
    background: #e9ecef;
    border-color: #adb5bd;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.generate-again-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.generate-again-btn i {
    font-size: 0.9em;
}

/* Tab Navigation */
.tab-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    border-bottom: 2px solid #e9ecef;
}

.tab-buttons {
    display: flex;
    justify-content: center;
}

.tab-btn {
    background: none;
    border: none;
    padding: 15px 30px;
    font-size: 1.1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 3px solid transparent;
    color: #6c757d;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tab-btn:hover {
    color: #495057;
    background: #f8f9fa;
}

.tab-btn.active {
    color: #667eea;
    border-bottom-color: #667eea;
    background: rgba(102, 126, 234, 0.05);
}

.tab-btn i {
    font-size: 1em;
}

/* Start Over Button */
.start-over-btn {
    background: linear-gradient(135deg, #e53e3e 0%, #c53030 100%);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 4px rgba(229, 62, 62, 0.2);
}

.start-over-btn:hover {
    background: linear-gradient(135deg, #c53030 0%, #9b2c2c 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(229, 62, 62, 0.3);
}

.start-over-btn i {
    font-size: 0.9em;
}

/* Tab Content */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Save Button */
.save-btn {
    background: #f8f9fa;
    border: 2px solid #dee2e6;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    color: #6c757d;
    margin-bottom: 10px;
}

.save-btn:hover:not(.saved) {
    background: #e9ecef;
    border-color: #adb5bd;
    color: #495057;
}

.save-btn.saved {
    background: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

.save-btn i {
    font-size: 0.8em;
}

/* Option Actions Layout */
.option-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Saved Topics Section */
.saved-topics-container {
    max-width: 1000px;
    margin: 0 auto;
}

.saved-topics-container h2 {
    text-align: center;
    color: #2d3748;
    margin-bottom: 10px;
    font-size: 1.8rem;
}

.saved-topics-container > p {
    text-align: center;
    color: #718096;
    margin-bottom: 30px;
    font-size: 1rem;
}

.saved-topics-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.saved-topic-card {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.saved-topic-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
    border-color: #667eea;
}

.saved-topic-content h4 {
    color: #2d3748;
    margin-bottom: 8px;
    font-size: 1.2rem;
}

.saved-topic-content p {
    color: #718096;
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 15px;
}

.saved-topic-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.explore-saved-btn, .unsave-btn {
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    border: none;
}

.explore-saved-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.explore-saved-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.unsave-btn {
    background: #dc3545;
    color: white;
}

.unsave-btn:hover {
    background: #c82333;
    transform: translateY(-1px);
}

.saved-topic-search {
    display: flex;
    gap: 8px;
}

.saved-topic-search .search-btn {
    flex: 1;
    min-width: 60px;
    padding: 6px 8px;
    font-size: 0.8rem;
}

/* Empty Saved Message */
.empty-saved-message {
    text-align: center;
    padding: 60px 20px;
    color: #6c757d;
}

.empty-saved-message i {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-saved-message h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: #495057;
}

.empty-saved-message p {
    font-size: 1rem;
    max-width: 400px;
    margin: 0 auto;
}


.search-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.search-btn {
    flex: 1;
    min-width: 80px;
    padding: 8px 12px;
    border: none;
    border-radius: 6px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.search-btn.youtube {
    background: #ff0000;
    color: white;
}

.search-btn.youtube:hover {
    background: #cc0000;
}

.search-btn.tiktok {
    background: #000000;
    color: white;
}

.search-btn.tiktok:hover {
    background: #333333;
}

.search-btn.google {
    background: #4285f4;
    color: white;
}

.search-btn.google:hover {
    background: #3367d6;
}

/* Share section */
.share-section {
    text-align: center;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #e2e8f0;
}

.share-section h3 {
    color: #4a5568;
    margin-bottom: 20px;
}

.share-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.share-btn {
    background: #f7fafc;
    color: #4a5568;
    border: 1px solid #e2e8f0;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}

.share-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0,0,0,0.1);
}

.share-btn.twitter:hover {
    background: #1da1f2;
    color: white;
    border-color: #1da1f2;
}

.share-btn.facebook:hover {
    background: #4267b2;
    color: white;
    border-color: #4267b2;
}

.share-btn.linkedin:hover {
    background: #0077b5;
    color: white;
    border-color: #0077b5;
}

.share-btn.copy-link:hover {
    background: #48bb78;
    color: white;
    border-color: #48bb78;
}

/* Footer */
footer {
    text-align: center;
    color: white;
    margin-top: 20px;
    opacity: 0.8;
}

/* Loading animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }

    header h1 {
        font-size: 2.5rem;
    }

    main {
        padding: 20px;
    }


    .search-buttons {
        flex-direction: column;
    }

    .search-btn {
        min-width: auto;
    }

    .share-buttons {
        flex-direction: column;
        align-items: center;
    }

    .custom-interest-input {
        flex-direction: column;
    }

    .custom-interest-input input {
        margin-bottom: 10px;
    }

    .tab-navigation {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }

    .tab-buttons {
        justify-content: space-around;
    }

    .start-over-btn {
        align-self: center;
        padding: 10px 16px;
        font-size: 0.9rem;
    }

    .accumulated-topic-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .accumulated-topic-title {
        width: 100%;
        margin-bottom: 5px;
    }

    .accumulated-search-buttons {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }

    .accumulated-search-buttons .search-btn {
        min-width: 70px;
        flex: 1;
        max-width: 80px;
    }
}

/* Reading Mode Styles */
.reading-mode-container {
    max-width: 800px;
    margin: 0 auto;
}

.reading-input-section {
    margin: 30px 0;
}

.article-display {
    min-height: 400px;
    margin: 20px 0;
}

.article-content {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.article-header-section {
    padding: 40px 40px 30px;
    border-bottom: 1px solid #e2e8f0;
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
}

.article-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 15px;
    line-height: 1.2;
}

.article-summary {
    font-size: 1.2rem;
    color: #4a5568;
    line-height: 1.6;
    font-style: italic;
}

.article-body {
    padding: 40px;
    font-size: 1.1rem;
    line-height: 1.8;
    color: #2d3748;
}

.article-body p {
    margin-bottom: 20px;
}

.article-body p:last-child {
    margin-bottom: 0;
}

.exploration-link {
    background-color: #ebf8ff;
    color: #3182ce;
    padding: 2px 6px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    cursor: pointer;
    border: 1px solid #bee3f8;
}

.exploration-link:hover {
    background-color: #bee3f8;
    color: #2c5282;
    text-decoration: none;
}

.article-footer {
    padding: 40px;
    background: #f7fafc;
    border-top: 1px solid #e2e8f0;
}

.exploration-links-section h4 {
    color: #1a202c;
    font-size: 1.3rem;
    margin-bottom: 10px;
    font-weight: 600;
}

.exploration-links-section p {
    color: #4a5568;
    margin-bottom: 20px;
    font-size: 1rem;
}

.exploration-links-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.exploration-link-item {
    background: white;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
}

.exploration-link-item:hover {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.exploration-link-item[data-type="divergent"] {
    border-left: 4px solid #805ad5;
}

.exploration-link-item[data-type="detail"] {
    border-left: 4px solid #3182ce;
}

.exploration-link-text {
    display: block;
    font-weight: 500;
    color: #2d3748;
    margin-bottom: 5px;
}

.exploration-link-type {
    display: block;
    font-size: 0.85rem;
    color: #718096;
    font-weight: 400;
}

.article-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 30px;
    padding: 20px 0;
    border-top: 1px solid #e2e8f0;
}

.save-article-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: #3182ce;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.save-article-btn:hover {
    background: #2c5282;
    transform: translateY(-1px);
}

.save-article-btn.saved {
    background: #38a169;
}

.save-article-btn.saved:hover {
    background: #2f855a;
}

.article-share-buttons {
    display: flex;
    gap: 10px;
}

.article-share-buttons .share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    color: white;
    text-decoration: none;
    font-size: 1.1rem;
    transition: all 0.2s ease;
}

.article-share-buttons .share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.article-share-buttons .share-btn.twitter {
    background: #1da1f2;
}

.article-share-buttons .share-btn.facebook {
    background: #4267b2;
}

.article-share-buttons .share-btn.linkedin {
    background: #0077b5;
}

.new-article-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: #e2e8f0;
    color: #4a5568;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 20px;
}

.new-article-btn:hover {
    background: #cbd5e0;
    color: #2d3748;
}

/* Learn More Button Styles */
.learn-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    margin-top: 8px;
}

.learn-more-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
}

.learn-more-btn.confirm-generate {
    background: linear-gradient(135deg, #38a169 0%, #2f855a 100%);
    animation: pulse-generate 2s infinite;
}

.learn-more-btn.confirm-generate:hover {
    background: linear-gradient(135deg, #2f855a 0%, #276749 100%);
}

@keyframes pulse-generate {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
}

/* Article Loading Styles */
.article-loading {
    text-align: center;
    padding: 60px 40px;
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.loading-spinner {
    margin-bottom: 20px;
}

.loading-spinner i {
    font-size: 3rem;
    color: #667eea;
    animation: spin 2s linear infinite;
}

.article-loading h3 {
    color: #2d3748;
    margin-bottom: 15px;
    font-size: 1.5rem;
    font-weight: 600;
}

.article-loading p {
    color: #4a5568;
    margin-bottom: 10px;
    line-height: 1.5;
}

.loading-tip {
    color: #718096 !important;
    font-size: 0.9rem !important;
    font-style: italic;
}

.loading-progress {
    margin-top: 30px;
    width: 100%;
    max-width: 300px;
    margin-left: auto;
    margin-right: auto;
}

.progress-bar {
    height: 4px;
    background: #e2e8f0;
    border-radius: 2px;
    overflow: hidden;
    position: relative;
}

.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 50%, #667eea 100%);
    animation: progress-animation 2s ease-in-out infinite;
}

@keyframes progress-animation {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Responsive adjustments for reading mode */
@media (max-width: 768px) {
    .article-header-section {
        padding: 30px 20px 20px;
    }

    .article-title {
        font-size: 2rem;
    }

    .article-body {
        padding: 30px 20px;
        font-size: 1rem;
    }

    .article-footer {
        padding: 30px 20px;
    }

    .exploration-links-list {
        grid-template-columns: 1fr;
    }

    .article-actions {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }

    .article-share-buttons {
        justify-content: center;
    }

    .save-article-btn {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .article-title {
        font-size: 1.8rem;
    }

    .article-summary {
        font-size: 1.1rem;
    }

    .exploration-links-section h4 {
        font-size: 1.2rem;
    }
}
