/* Finance Pro Theme - Main Stylesheet */

/* CSS Variables */
:root {
    --primary-900: #0f172a;
    --primary-800: #1e293b;
    --primary-700: #334155;
    --primary-600: #1a365d;
    --primary-500: #2c5282;
    --accent-600: #b8860b;
    --accent-500: #d4af37;
    --accent-400: #f0d98d;
    --success: #52c41a;
    --danger: #ff4d4f;
    --warning: #fa6400;
    --finance-blue: #0057b7;
    --finance-orange: #fa6400;
    --finance-purple: #722ed1;
}

/* Accent utility classes (Tailwind build does not include custom colors) */
.text-accent-gold { color: var(--accent-500); }
.bg-accent-gold { background-color: var(--accent-500); }
.border-accent-gold { border-color: var(--accent-500); }

/* Line Clamp Utilities */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Smooth Transitions */
* {
    transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

/* Custom Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeIn 0.5s ease-out;
}

/* Gradient Text */
.gradient-text {
    background: linear-gradient(135deg, var(--primary-600), var(--accent-500));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Card Hover Effects */
.card-hover {
    transition: all 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.hover-lift {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-lift:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.hover-scale {
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.hover-scale:hover img {
    transform: scale(1.08);
}

/* Category Color Badges */
.category-badge {
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 0.25rem;
    display: inline-block;
}

.category-markets { background: linear-gradient(135deg, #1890ff, #0057b7); color: white; }
.category-banking { background: linear-gradient(135deg, #722ed1, #531dab); color: white; }
.category-crypto { background: linear-gradient(135deg, #fa6400, #d4380d); color: white; }
.category-stocks { background: linear-gradient(135deg, #52c41a, #389e0d); color: white; }
.category-economy { background: linear-gradient(135deg, #d4af37, #b8860b); color: white; }
.category-investing { background: linear-gradient(135deg, #ff4d4f, #cf1322); color: white; }
.category-insurance { background: linear-gradient(135deg, #13c2c2, #08979c); color: white; }
.category-technology { background: linear-gradient(135deg, #2f54eb, #1d39c4); color: white; }
.category-realestate { background: linear-gradient(135deg, #fa8c16, #d46b08); color: white; }
.category-commodities { background: linear-gradient(135deg, #faad14, #d48806); color: white; }
.category-forex { background: linear-gradient(135deg, #52c41a, #389e0d); color: white; }
.category-bonds { background: linear-gradient(135deg, #eb2f96, #c41d7f); color: white; }
.category-funds { background: linear-gradient(135deg, #722ed1, #531dab); color: white; }
.category-derivatives { background: linear-gradient(135deg, #fa541c, #d4380d); color: white; }
.category-analysis { background: linear-gradient(135deg, #1890ff, #0050b3); color: white; }
.category-news { background: linear-gradient(135deg, #595959, #434343); color: white; }

/* Glass Effect */
.glass {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* Gradient Overlays */
.gradient-overlay-dark {
    background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.5) 50%, rgba(0,0,0,0.9) 100%);
}

.gradient-overlay-colorful {
    background: linear-gradient(135deg, rgba(26, 54, 93, 0.95) 0%, rgba(212, 175, 55, 0.85) 100%);
}

/* Button Styles */
.btnPrimary {
    background: linear-gradient(135deg, var(--primary-600), var(--primary-500));
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btnPrimary:hover {
    background: linear-gradient(135deg, var(--primary-700), var(--primary-600));
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.favoriteButton {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.25rem;
    border-radius: 9999px;
    border: 1px solid #e5e7eb;
    background: #ffffff;
    color: #374151;
    font-weight: 600;
    transition: all 0.2s ease;
}

.favoriteButton:hover {
    border-color: #f59e0b;
    color: #b45309;
    box-shadow: 0 6px 12px -6px rgba(245, 158, 11, 0.5);
}

.favoriteButtonSaved {
    background: #f59e0b;
    border-color: #f59e0b;
    color: #ffffff;
    box-shadow: 0 8px 16px -10px rgba(245, 158, 11, 0.6);
}

.favoriteButtonSaved:hover {
    background: #d97706;
    border-color: #d97706;
    color: #ffffff;
}

.favoriteIcon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.favoriteButtonGuest {
    border-color: rgba(217, 119, 6, 0.45);
    background: rgba(245, 158, 11, 0.12);
    color: #9a3412;
}

.favoriteButtonGuest:hover {
    border-color: #d97706;
    background: rgba(245, 158, 11, 0.2);
    color: #7c2d12;
}

/* Market Data Colors */
.market-up {
    color: var(--success);
}

.market-down {
    color: var(--danger);
}

/* Responsive Typography */
@media (max-width: 640px) {
    h1 {
        font-size: 1.5rem;
        line-height: 2rem;
    }

    h2 {
        font-size: 1.25rem;
        line-height: 1.75rem;
    }

    h3 {
        font-size: 1.125rem;
        line-height: 1.5rem;
    }
}

/* Loading Skeleton */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s ease-in-out infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Print Styles */
@media print {
    header, footer, aside, .no-print {
        display: none !important;
    }

    body {
        background: white;
    }

    a {
        text-decoration: underline;
    }
}

/* Scrollbar Hide */
.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.scrollbar-hide::-webkit-scrollbar {
    display: none;
}

/* Page Animations */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-up {
    animation: fadeUp 0.6s ease-out forwards;
}

.delay-200 {
    animation-delay: 0.2s;
}

.delay-300 {
    animation-delay: 0.3s;
}

/* Font Mono for Numbers */
.font-mono-num {
    font-variant-numeric: tabular-nums;
    font-family: 'Roboto Mono', 'Courier New', monospace;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 40px;
    right: 40px;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary-900), var(--primary-800));
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: bold;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: linear-gradient(135deg, var(--primary-800), var(--primary-700));
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.back-to-top:active {
    transform: translateY(-2px);
}

/* Forms */
.formLabel {
    display: block;
    font-size: 0.875rem;
    color: #475569;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.formInput,
.formTextarea {
    width: 100%;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    color: #0f172a;
    background: #fff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.formInput:focus,
.formTextarea:focus {
    outline: none;
    border-color: var(--finance-blue);
    box-shadow: 0 0 0 3px rgba(0, 87, 183, 0.12);
}

.formInput:disabled,
.formTextarea:disabled {
    background: #f1f5f9;
    color: #94a3b8;
    cursor: not-allowed;
}

/* Alerts */
.alertBase {
    border-radius: 0.75rem;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
}

.alertSuccess {
    background: #ecfdf3;
    border: 1px solid #bbf7d0;
    color: #166534;
}

.alertDanger {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.alertWarning {
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #92400e;
}

/* Comments */
.commentCard {
    border: 1px solid #f1f5f9;
    border-left: 3px solid #e2e8f0;
    border-radius: 0.75rem;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    background: #ffffff;
}
