/* Financial News Dashboard Styles - Green Leaf Theme */
#financial-news-dashboard {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #43A047 0%, #66BB6A 50%, #81C784 100%);
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(67, 160, 71, 0.3);
    color: #333;
    position: relative;
    overflow: hidden;
}

#financial-news-dashboard::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(139, 195, 74, 0.1), rgba(102, 187, 106, 0.1));
    backdrop-filter: blur(10px);
    z-index: -1;
}

/* Header */
.fn-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding: 20px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(232, 245, 233, 0.95));
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.2);
    border: 1px solid rgba(139, 195, 74, 0.3);
}

.fn-title {
    margin: 0;
    font-size: 2rem;
    font-weight: 700;
    color: #1a1a1a;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.fn-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.fn-btn {
    background: linear-gradient(45deg, #43A047, #66BB6A);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(67, 160, 71, 0.3);
}

.fn-btn:hover {
    transform: translateY(-2px);
    background: linear-gradient(45deg, #388E3C, #43A047);
    box-shadow: 0 6px 20px rgba(67, 160, 71, 0.4);
}

.fn-timestamp {
    font-size: 0.9rem;
    color: #1a1a1a;
    background: linear-gradient(135deg, rgba(232, 245, 233, 0.9), rgba(200, 230, 201, 0.8));
    padding: 8px 15px;
    border-radius: 20px;
    border: 1px solid rgba(139, 195, 74, 0.3);
}

/* Loading */
.fn-loading {
    text-align: center;
    padding: 40px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(232, 245, 233, 0.9));
    border-radius: 12px;
    margin: 20px 0;
    border: 1px solid rgba(139, 195, 74, 0.3);
}

.fn-spinner {
    width: 40px;
    height: 40px;
    margin: 0 auto 20px;
    border: 4px solid rgba(139, 195, 74, 0.3);
    border-top: 4px solid #43A047;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Tabs */
.fn-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    padding: 10px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(232, 245, 233, 0.9));
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.15);
    flex-wrap: wrap;
    border: 1px solid rgba(139, 195, 74, 0.3);
}

.fn-tab {
    background: transparent;
    border: 2px solid transparent;
    padding: 12px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    white-space: nowrap;
    color: #1a1a1a;
}

.fn-tab:hover {
    background: rgba(139, 195, 74, 0.15);
    border-color: #8BC34A;
    color: #000000;
}

.fn-tab.active {
    background: linear-gradient(45deg, #43A047, #66BB6A);
    color: white;
    box-shadow: 0 4px 15px rgba(67, 160, 71, 0.3);
}

/* Content */
.fn-content {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(232, 245, 233, 0.9));
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.15);
    border: 1px solid rgba(139, 195, 74, 0.3);
}

/* Grid Layout */
.fn-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 20px;
}

/* List Layout */
.fn-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* News Card */
.fn-news-card {
    background: linear-gradient(135deg, #ffffff, #f8fff8);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(139, 195, 74, 0.15);
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(200, 230, 201, 0.5);
}

.fn-news-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #43A047, #66BB6A, #8BC34A);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.fn-news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(139, 195, 74, 0.25);
    background: linear-gradient(135deg, #ffffff, #f1f8e9);
}

.fn-news-card:hover::before {
    transform: scaleX(1);
}

/* Category Colors - Green Theme */
.fn-news-card.forex { border-left-color: #2E7D32; }
.fn-news-card.stocks { border-left-color: #388E3C; }
.fn-news-card.gold { border-left-color: #43A047; }
.fn-news-card.crypto { border-left-color: #66BB6A; }

.fn-news-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 15px;
    border: 1px solid rgba(200, 230, 201, 0.5);
}

.fn-news-category {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.fn-news-category.forex { background: #E8F5E8; color: #1a1a1a; }
.fn-news-category.stocks { background: #E1F5E1; color: #1a1a1a; }
.fn-news-category.gold { background: #F1F8E9; color: #1a1a1a; }
.fn-news-category.crypto { background: #E8F5E8; color: #1a1a1a; }

.fn-news-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 10px;
    line-height: 1.4;
    color: #1a1a1a;
}

.fn-news-title-en {
    font-size: 0.9rem;
    color: #4a4a4a;
    font-style: italic;
    margin-bottom: 10px;
}

.fn-news-summary {
    color: #2a2a2a;
    line-height: 1.6;
    margin-bottom: 15px;
    font-size: 0.95rem;
}

.fn-news-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(139, 195, 74, 0.3);
    font-size: 0.85rem;
    color: #1a1a1a;
}

.fn-news-source {
    font-weight: 600;
    color: #1a1a1a;
}

.fn-news-date {
    color: #4a4a4a;
}

.fn-news-sentiment {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 600;
}

.fn-news-sentiment.positive { background: #C8E6C9; color: #1a1a1a; }
.fn-news-sentiment.negative { background: #FFCDD2; color: #1a1a1a; }
.fn-news-sentiment.neutral { background: #E8F5E8; color: #1a1a1a; }

.fn-read-more {
    display: inline-block;
    margin-top: 10px;
    color: #43A047;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.fn-read-more:hover {
    color: #2E7D32;
    text-decoration: underline;
}

/* Search Container */
.fn-search-container {
    position: relative;
    margin-left: 15px;
}

.fn-search-input {
    padding: 10px 40px 10px 15px;
    border: 2px solid rgba(139, 195, 74, 0.5);
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.95);
    color: #1a1a1a;
    font-size: 0.9rem;
    width: 200px;
    transition: all 0.3s ease;
}

.fn-search-input:focus {
    outline: none;
    border-color: #43A047;
    box-shadow: 0 0 10px rgba(67, 160, 71, 0.3);
    width: 250px;
}

.fn-search-clear {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #43A047;
    cursor: pointer;
    font-size: 0.8rem;
    padding: 5px;
    border-radius: 50%;
    transition: background 0.3s ease;
}

.fn-search-clear:hover {
    background: rgba(139, 195, 74, 0.2);
}

/* Error */
.fn-error {
    background: linear-gradient(135deg, #FFEBEE, #FFCDD2);
    color: #C62828;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    border-left: 4px solid #F44336;
    border: 1px solid rgba(244, 67, 54, 0.3);
}

.fn-no-news {
    text-align: center;
    padding: 40px;
    color: #1a1a1a;
    font-size: 1.1rem;
    background: linear-gradient(135deg, #E8F5E8, #C8E6C9);
    border-radius: 12px;
    border: 2px dashed #8BC34A;
}

/* Share buttons */
.fn-share-buttons {
    margin-top: 15px;
    display: flex;
    gap: 10px;
}

.fn-share-btn {
    padding: 6px 12px;
    border-radius: 15px;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.fn-share-btn.facebook { background: #E8F5E8; color: #1a1a1a; }
.fn-share-btn.twitter { background: #E1F5E1; color: #1a1a1a; }
.fn-share-btn.line { background: #F1F8E9; color: #1a1a1a; }

.fn-share-btn:hover {
    transform: translateY(-2px);
    background: #C8E6C9;
}

/* Responsive */
@media (max-width: 768px) {
    #financial-news-dashboard {
        padding: 15px;
        margin: 10px;
    }
    
    .fn-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .fn-title {
        font-size: 1.5rem;
    }
    
    .fn-tabs {
        justify-content: center;
    }
    
    .fn-tab {
        padding: 8px 15px;
        font-size: 0.9rem;
    }
    
    .fn-grid {
        grid-template-columns: 1fr;
    }
    
    .fn-news-meta {
        flex-direction: column;
        gap: 5px;
        align-items: flex-start;
    }
    
    .fn-search-input {
        width: 150px;
    }
    
    .fn-search-input:focus {
        width: 180px;
    }
}

@media (max-width: 480px) {
    .fn-controls {
        flex-direction: column;
        gap: 10px;
    }
    
    .fn-tabs {
        flex-direction: column;
    }
    
    .fn-tab {
        width: 100%;
        text-align: center;
    }
    
    .fn-search-container {
        margin-left: 0;
        margin-top: 10px;
    }
}

/* Animation */
.fn-news-card {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease forwards;
}

.fn-news-card:nth-child(1) { animation-delay: 0.1s; }
.fn-news-card:nth-child(2) { animation-delay: 0.2s; }
.fn-news-card:nth-child(3) { animation-delay: 0.3s; }
.fn-news-card:nth-child(4) { animation-delay: 0.4s; }
.fn-news-card:nth-child(5) { animation-delay: 0.5s; }

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Auto refresh indicator */
.fn-auto-refresh {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 8px;
    height: 8px;
    background: #43A047;
    border-radius: 50%;
    animation: pulse 2s infinite;
    box-shadow: 0 0 10px rgba(67, 160, 71, 0.5);
}

@keyframes pulse {
    0% { 
        opacity: 1; 
        transform: scale(1);
    }
    50% { 
        opacity: 0.7; 
        transform: scale(1.2);
    }
    100% { 
        opacity: 1; 
        transform: scale(1);
    }
}

/* Additional green theme elements */
.fn-btn#fn-fullscreen {
    background: linear-gradient(45deg, #66BB6A, #8BC34A);
}

.fn-btn#fn-fullscreen:hover {
    background: linear-gradient(45deg, #43A047, #66BB6A);
}

/* Custom scrollbar for webkit browsers */
.fn-content::-webkit-scrollbar {
    width: 8px;
}

.fn-content::-webkit-scrollbar-track {
    background: rgba(139, 195, 74, 0.1);
    border-radius: 4px;
}

.fn-content::-webkit-scrollbar-thumb {
    background: linear-gradient(45deg, #43A047, #66BB6A);
    border-radius: 4px;
}

.fn-content::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(45deg, #388E3C, #43A047);
}

/* Leaf decoration */
#financial-news-dashboard::after {
    content: '🍃';
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 2rem;
    opacity: 0.3;
    animation: leafFloat 3s ease-in-out infinite;
}

@keyframes leafFloat {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-10px) rotate(5deg); }
}