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

:root {
    --primary: #f7931a;
    --secondary: #4a90e2;
    --dark: #1a1a2e;
    --darker: #0f0f1e;
    --light: #f5f5f5;
    --success: #27ae60;
    --danger: #e74c3c;
    --text: #333;
    --border: #ddd;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text);
    background: var(--light);
}

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

/* Header */
.site-header {
    background: var(--dark);
    color: white;
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: relative;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.logo h1 {
    color: var(--primary);
    font-size: 24px;
    margin: 0;
}

.logo .tagline {
    font-size: 12px;
    color: #aaa;
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 25px;
}

.main-nav a {
    color: white;
    text-decoration: none;
    transition: color 0.3s;
}

.main-nav a:hover {
    color: var(--primary);
}

.header-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.btn {
    padding: 8px 20px;
    border-radius: 5px;
    text-decoration: none;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    font-size: 14px;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: #e68310;
}

.btn-secondary {
    background: var(--secondary);
    color: white;
}

.user-menu {
    position: relative;
}

.user-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    border: 1px solid var(--primary);
    color: white;
    padding: 6px 12px;
    border-radius: 5px;
    cursor: pointer;
}

.user-toggle img {
    width: 30px;
    height: 30px;
    border-radius: 50%;
}

.dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border-radius: 5px;
    min-width: 200px;
    margin-top: 10px;
}

.user-menu:hover .dropdown {
    display: block;
}

.dropdown a {
    display: block;
    padding: 12px 20px;
    color: var(--text);
    text-decoration: none;
    transition: background 0.3s;
}

.dropdown a:hover {
    background: var(--light);
}

.mobile-menu-toggle {
    display: none;
    background: transparent;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
}

/* Crypto Ticker */
.crypto-ticker-wrapper {
    background: var(--darker);
    color: white;
    padding: 10px 0;
    overflow: hidden;
}

.sticky-ticker {
    position: sticky;
    top: 0;
    z-index: 99;
}

.crypto-ticker {
    display: flex;
    gap: 30px;
    animation: scroll 30s linear infinite;
    white-space: nowrap;
}

.ticker-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.coin-name {
    font-weight: bold;
    color: var(--primary);
}

.coin-change.positive {
    color: var(--success);
}

.coin-change.negative {
    color: var(--danger);
}

@keyframes scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* Banner Slider */
.banner-slider {
    position: relative;
    margin: 20px 0;
    height: 400px;
    border-radius: 10px;
    overflow: hidden;
}

.banner-slide {
    display: none;
    width: 100%;
    height: 100%;
}

.banner-slide.active {
    display: block;
}

.banner-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Ad Spaces */
.ad-space {
    background: #f9f9f9;
    border: 1px dashed var(--border);
    padding: 20px;
    margin: 20px 0;
    text-align: center;
    border-radius: 5px;
}

/* Content Layout */
.content-wrapper {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 30px;
    margin: 30px 0;
}

.main-content {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Posts Grid */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 20px;
}

.post-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.post-image img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 8px 8px 0 0;
    display: block;
}

.post-content {
    padding: 20px;
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    font-size: 14px;
    color: #666;
}

.author-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
}

.post-content h2 {
    font-size: 20px;
    margin: 10px 0;
}

.post-content h2 a {
    color: var(--text);
    text-decoration: none;
}

.post-content h2 a:hover {
    color: var(--primary);
}

.post-stats {
    display: flex;
    gap: 15px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--border);
    font-size: 14px;
    color: #666;
}

/* Sidebar */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.widget {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.widget h3 {
    margin-bottom: 15px;
    color: var(--primary);
    border-bottom: 2px solid var(--primary);
    padding-bottom: 10px;
}

.popular-posts {
    list-style: none;
}

.popular-posts li {
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}

.popular-posts li:last-child {
    border-bottom: none;
}

.popular-posts a {
    color: var(--text);
    text-decoration: none;
    display: flex;
    justify-content: space-between;
}

.popular-posts .views {
    font-size: 12px;
    color: #999;
}

/* Footer */
.site-footer {
    background: var(--dark);
    color: white;
    padding: 40px 0 20px;
    margin-top: 50px;
}

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

.footer-section h3 {
    color: var(--primary);
    margin-bottom: 15px;
}

.footer-section ul {
    list-style: none;
}

.footer-section a {
    color: #ccc;
    text-decoration: none;
    line-height: 2;
}

.footer-section a:hover {
    color: var(--primary);
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 15px;
}

.social-links a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    border-radius: 50%;
    transition: background 0.3s;
}

.social-links a:hover {
    background: var(--secondary);
}

.newsletter-form {
    display: flex;
    margin-top: 15px;
}

.newsletter-form input {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 5px 0 0 5px;
}

.newsletter-form button {
    background: var(--primary);
    border: none;
    padding: 10px 20px;
    border-radius: 0 5px 5px 0;
    color: white;
    cursor: pointer;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #444;
    color: #aaa;
    font-size: 14px;
}

.disclaimer-note {
    font-size: 12px;
    margin-top: 10px;
}

/* Back to Top */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    z-index: 1000;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

/* Responsive */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .main-nav {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .content-wrapper {
        grid-template-columns: 1fr;
    }
    
    .posts-grid {
        grid-template-columns: 1fr;
    }
    
    .crypto-ticker {
        gap: 15px;
    }
    
    .banner-slider {
        height: 250px;
    }
}