/* Main CSS for AI Journal */

/* Basic Reset and Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

a {
    text-decoration: none;
    color: #0066cc;
    transition: color 0.2s ease;
}

a:hover {
    color: #004499;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 0.5em;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

h3 {
    font-size: 1.3rem;
}

p {
    margin-bottom: 1rem;
}

/* Header */
header {
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 1;
    transform: translateY(0);
    max-height: 80px;
    overflow: hidden;
}

.header-scrolled .header-content {
    opacity: 0;
    transform: translateY(-100%);
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    margin: 0;
}

.header-tools {
    display: flex;
    align-items: center;
    gap: 20px;
}

.language-switcher select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    background-color: #fff;
    cursor: pointer;
}

.rss-button {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 12px;
    background-color: #ff6600;
    color: white;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
}

.rss-button:hover {
    background-color: #e65c00;
    color: white;
}

/* Navigation */
nav {
    background-color: #fff;
    border-bottom: 1px solid #eee;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    overflow-x: auto;
    white-space: nowrap;
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.header-scrolled .nav-container {
    padding-left: 170px;
}

.header-scrolled .nav-container::before {
    content: "THE AI JOURNAL";
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-weight: 700;
    color: #0066cc;
    font-size: 20px;
    letter-spacing: 1px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 1;
}

nav a {
    padding: 15px 20px;
    color: #555;
    font-weight: 500;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
}

nav a:hover, nav a.active {
    color: #0066cc;
    border-bottom: 2px solid #0066cc;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #0066cc, #004080);
    color: white;
    padding: 80px 0;
    margin-bottom: 40px;
    text-align: center;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

.hero h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.hero p {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* Section Styles */
section {
    margin-bottom: 50px;
}

section h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
    margin-bottom: 25px;
}

section h2 i {
    color: #0066cc;
}

/* Content Grid */
.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.grid-item {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0,0,0,0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.grid-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.grid-item.featured {
    grid-column: span 2;
}

.item-image {
    height: 200px;
    background-size: cover;
    background-position: center;
}

.item-content {
    padding: 20px;
}

.tag {
    display: inline-block;
    padding: 4px 8px;
    background-color: #e1f5fe;
    color: #0277bd;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 10px;
}

.read-more {
    display: inline-block;
    margin-top: 10px;
    font-weight: 500;
    font-size: 14px;
}

/* News Section */
.news-categories {
    display: flex;
    overflow-x: auto;
    gap: 15px;
    margin-bottom: 25px;
    padding-bottom: 10px;
}

.news-categories a {
    padding: 8px 15px;
    background-color: #f0f0f0;
    color: #555;
    border-radius: 20px;
    font-size: 14px;
    white-space: nowrap;
}

.news-categories a.active, .news-categories a:hover {
    background-color: #0066cc;
    color: white;
}

.news-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.news-item {
    background-color: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.05);
}

.news-date {
    color: #888;
    font-size: 14px;
    margin-bottom: 10px;
}

.news-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
}

.category {
    background-color: #f0f0f0;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 12px;
    color: #555;
}

/* Columns Section */
.columns-grid {
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
}

.column-item {
    background-color: #fff;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.05);
}

.author-info {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.author-image {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.author-details h4 {
    margin-bottom: 0;
    font-size: 16px;
}

.author-details p {
    color: #666;
    font-size: 14px;
    margin-bottom: 0;
}

/* Rankings Section */
.rankings-categories {
    display: flex;
    overflow-x: auto;
    gap: 15px;
    margin-bottom: 25px;
    padding-bottom: 10px;
}

.rankings-categories a {
    padding: 8px 15px;
    background-color: #f0f0f0;
    color: #555;
    border-radius: 20px;
    font-size: 14px;
    white-space: nowrap;
}

.rankings-categories a.active, .rankings-categories a:hover {
    background-color: #0066cc;
    color: white;
}

.rankings-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.ranking-item {
    display: flex;
    background-color: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.05);
    align-items: center;
}

.rank {
    font-size: 24px;
    font-weight: 700;
    color: #0066cc;
    width: 40px;
    height: 40px;
    background-color: #e6f2ff;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-right: 20px;
}

.tool-info {
    flex: 1;
}

.rating {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 5px 0 10px;
}

.stars {
    color: #ff9900;
    letter-spacing: 2px;
}

.score {
    font-weight: 600;
    color: #333;
}

/* View All Link */
.view-all {
    display: block;
    text-align: center;
    padding: 10px;
    background-color: #f5f5f5;
    border-radius: 6px;
    font-weight: 500;
    margin-top: 20px;
}

.view-all:hover {
    background-color: #e5e5e5;
}

/* Subscription Section */
.subscription {
    background-color: #0066cc;
    color: white;
    padding: 60px 0;
}

.subscription-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.subscription-content {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.subscription h2 {
    font-size: 2rem;
    margin-bottom: 15px;
    border-bottom: none;
}

.subscription p {
    font-size: 1.1rem;
    margin-bottom: 25px;
    opacity: 0.9;
}

.subscription form {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
}

.subscription input {
    flex: 1;
    padding: 12px 15px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
}

.subscription button {
    background-color: #ff6600;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 0 25px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.subscription button:hover {
    background-color: #e65c00;
}

.subscription-options {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.subscription-options a {
    color: white;
    display: flex;
    align-items: center;
    gap: 5px;
    opacity: 0.9;
    transition: opacity 0.2s ease;
}

.subscription-options a:hover {
    opacity: 1;
    color: white;
}

/* Footer */
footer {
    background-color: #333;
    color: white;
    padding: 60px 0 0;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
}

.footer-section h3 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-section p {
    opacity: 0.7;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section ul li a {
    color: #ccc;
    transition: color 0.2s ease;
}

.footer-section ul li a:hover {
    color: white;
}

.footer-bottom {
    max-width: 1200px;
    margin: 40px auto 0;
    padding: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    text-align: center;
    font-size: 14px;
    opacity: 0.7;
}

/* AI Assistant */
.ai-assistant {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 300px;
    background-color: #fff;
    border-radius: 18px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.15);
    z-index: 1000;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    max-height: 400px;
    display: flex;
    flex-direction: column;
    cursor: move;
}

.ai-assistant.minimized {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: conic-gradient(
        #ff0000,
        #ff8000,
        #ffff00,
        #80ff00,
        #00ff00,
        #00ff80,
        #00ffff,
        #0080ff,
        #0000ff,
        #8000ff,
        #ff00ff,
        #ff0080,
        #ff0000
    );
    box-shadow: 0 4px 25px rgba(0,0,0,0.2);
    cursor: pointer;
    overflow: hidden;
    bottom: 30px;
    right: 30px;
}

.ai-assistant.minimized::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(255,255,255,0.9) 0%, rgba(255,255,255,0.6) 20%, rgba(255,255,255,0) 70%);
    animation: pulse 2s infinite, rotate 8s linear infinite;
}

.ai-assistant.minimized::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 55%;
    height: 55%;
    border-radius: 50%;
    background-color: white;
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.1);
}

.ai-assistant.minimized .assistant-header,
.ai-assistant.minimized .assistant-body {
    display: none;
}

@keyframes pulse {
    0% {
        opacity: 0.7;
    }
    50% {
        opacity: 0.9;
    }
    100% {
        opacity: 0.7;
    }
}

@keyframes rotate {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.assistant-header {
    background-color: #0066cc;
    color: white;
    padding: 10px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: move;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
}

.assistant-header span {
    font-weight: 500;
}

.minimize-button {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 14px;
}

.assistant-body {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    height: calc(100% - 40px);
}

.assistant-messages {
    padding: 10px 15px;
    overflow-y: auto;
    flex-grow: 1;
    max-height: 300px;
    border-top: 1px solid #f0f0f0;
}

.assistant-message {
    background-color: #f0f5ff;
    padding: 10px;
    border-radius: 10px;
    margin-bottom: 10px;
    font-size: 14px;
}

.user-message {
    background-color: #e6f2ff;
    padding: 10px;
    border-radius: 10px;
    margin-bottom: 10px;
    font-size: 14px;
    text-align: right;
    margin-left: 20%;
}

.assistant-input {
    display: flex;
    padding: 10px;
    border-top: 1px solid #f0f0f0;
}

.assistant-input input {
    flex-grow: 1;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    padding: 8px 12px;
    font-size: 14px;
    outline: none;
}

.assistant-input button {
    background-color: #0066cc;
    color: white;
    border: none;
    border-radius: 50%;
    width: 34px;
    height: 34px;
    margin-left: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

.assistant-input button:hover {
    background-color: #0055aa;
}

/* Ad Units */
.ad-container {
    margin: 30px 0;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #eee;
    position: relative;
}

.ad-container::before {
    content: "Advertisement";
    position: absolute;
    top: -10px;
    left: 15px;
    background-color: #f8f9fa;
    padding: 0 5px;
    font-size: 12px;
    color: #999;
}

.premium-ad {
    display: flex;
    align-items: center;
    padding: 15px;
    background: linear-gradient(to right, #f7f9fc, #eef2f7);
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
    transition: transform 0.2s;
    cursor: pointer;
}

.premium-ad:hover {
    transform: translateY(-2px);
}

.ad-image {
    width: 120px;
    height: 120px;
    border-radius: 8px;
    object-fit: cover;
    margin-right: 15px;
}

.ad-content {
    flex: 1;
}

.ad-title {
    font-weight: 600;
    margin-bottom: 5px;
    color: #333;
}

.ad-description {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
}

.ad-cta {
    display: inline-block;
    padding: 6px 14px;
    background-color: #0066cc;
    color: white;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.2s;
}

.ad-cta:hover {
    background-color: #0055aa;
    color: white;
}

.footer-bottom {
    background-color: #0e2439;
    padding: 15px 0;
    text-align: center;
    color: rgba(255,255,255,0.7);
    font-size: 14px;
}

.footer-bottom p {
    margin: 0;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .grid-item.featured {
        grid-column: span 1;
    }
    
    .footer-container {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .hero {
        padding: 40px 0;
    }
    
    .hero h2 {
        font-size: 2rem;
    }
    
    .subscription form {
        flex-direction: column;
    }
    
    .ai-assistant {
        width: 300px;
        bottom: 10px;
        right: 10px;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 2rem;
    }
    
    .header-content {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .ai-assistant {
        width: 90%;
        max-width: 340px;
    }
} 