/* iCalling Dashboard Styles */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

/* Navigation */
nav {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 15px 30px;
    margin: -20px -20px 20px -20px;
    box-shadow: 0 2px 20px rgba(0,0,0,0.1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #2d3748;
    font-weight: 700;
    font-size: 1.3rem;
}

.nav-logo img {
    width: 40px;
    height: 40px;
    border-radius: 10px;
}

.nav-links {
    display: flex;
    gap: 30px;
    list-style: none;
}

.nav-links a {
    text-decoration: none;
    color: #4a5568;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: #667eea;
}

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

/* Header */
.header {
    background: white;
    border-radius: 16px;
    padding: 20px 30px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-section img {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    object-fit: cover;
}

.logo-section h1 {
    font-size: 1.5rem;
    color: #2d3748;
    font-weight: 700;
}

.logo-section h1 span {
    color: #667eea;
}

.update-info {
    text-align: right;
}

.update-time {
    font-size: 0.85rem;
    color: #718096;
}

/* Grid Layout */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

/* Card Styles */
.card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.card-icon {
    font-size: 1.5rem;
}

.card-title {
    font-size: 0.9rem;
    color: #718096;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.card-value {
    font-size: 2.2rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 8px;
}

.card-change {
    font-size: 1rem;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 20px;
    display: inline-block;
}

.positive {
    background: #c6f6d5;
    color: #22543d;
}

.negative {
    background: #fed7d7;
    color: #742a2a;
}

/* Fear & Greed Card */
.fear-greed-card {
    grid-column: span 2;
}

.gauge-container {
    display: flex;
    align-items: center;
    gap: 30px;
    margin-top: 20px;
}

.gauge {
    width: 200px;
    height: 100px;
    position: relative;
}

.gauge-bg {
    width: 200px;
    height: 100px;
    background: conic-gradient(from 180deg, #f56565 0deg, #ed8936 45deg, #ecc94b 90deg, #48bb78 135deg, #38a169 180deg);
    border-radius: 100px 100px 0 0;
    mask: radial-gradient(at 50% 100%, transparent 60%, black 61%);
    -webkit-mask: radial-gradient(at 50% 100%, transparent 60%, black 61%);
}

.gauge-needle {
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 4px;
    height: 90px;
    background: #2d3748;
    transform-origin: bottom center;
    transform: translateX(-50%) rotate(-45deg);
    transition: transform 0.5s ease;
    border-radius: 2px;
}

.gauge-center {
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 20px;
    background: #2d3748;
    border-radius: 50%;
}

.gauge-labels {
    display: flex;
    justify-content: space-between;
    width: 200px;
    margin-top: 10px;
    font-size: 0.75rem;
    color: #718096;
}

.fear-greed-value {
    text-align: center;
}

.fear-greed-score {
    font-size: 3rem;
    font-weight: 700;
    color: #2d3748;
}

.fear-greed-text {
    font-size: 1.2rem;
    font-weight: 600;
    color: #667eea;
    margin-top: 8px;
}

/* Headlines Section */
.headlines-card {
    grid-column: span 2;
}

.headlines-list {
    list-style: none;
    margin-top: 16px;
}

.headlines-list li {
    padding: 16px 0;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
}

.headlines-list li:last-child {
    border-bottom: none;
}

.headline-text {
    flex: 1;
    font-size: 1rem;
    color: #2d3748;
    line-height: 1.5;
}

.headline-link {
    font-size: 0.85rem;
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    white-space: nowrap;
    padding: 4px 12px;
    background: #f7fafc;
    border-radius: 6px;
    transition: background 0.2s;
}

.headline-link:hover {
    background: #edf2f7;
}

/* Update Notice */
.update-notice {
    background: #fffbeb;
    border-left: 4px solid #f59e0b;
    padding: 15px 20px;
    margin-bottom: 20px;
    border-radius: 8px;
}

.update-notice p {
    color: #92400e;
    font-size: 0.9rem;
}

/* Footer */
.footer {
    text-align: center;
    padding: 20px;
    color: white;
    opacity: 0.8;
    font-size: 0.85rem;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .fear-greed-card,
    .headlines-card {
        grid-column: span 1;
    }
    
    .gauge-container {
        flex-direction: column;
        gap: 20px;
    }
    
    .card-value {
        font-size: 1.8rem;
    }
    
    .header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
}
