/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #00AFF0 0%, #0084C7 100%);
    min-height: 100vh;
    margin: 0;
}

.container {
    display: grid;
    grid-template-columns: 200px 1fr 200px;
    max-width: 1600px;
    margin: 0 auto;
    gap: 20px;
    padding: 0 20px;
}

/* Banner Ads */
.top-banner-ad {
    width: 100%;
    height: 250px;
    margin: 20px 0 -30px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    padding: 0 20px;
    text-align: center;
}

.top-banner-ad iframe {
    width: 100%;
    max-width: 1400px;
    height: 250px;
    border: none;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.top-banner-ad:hover iframe {
    transform: scale(1.02);
}

.banner-placeholder.top-banner {
    min-height: 200px;
    width: 100%;
    padding: 30px;
    margin: 0 auto;
    font-size: 1.3em;
}

.banner-link {
    display: block;
    text-decoration: none;
    color: #666;
    width: 100%;
    height: 100%;
}

.banner-placeholder {
    background: linear-gradient(45deg, #e3f8ff, #dbeafe);
    border: 2px dashed #00AFF0;
    padding: 25px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 120px;
    transition: all 0.3s ease;
    color: #00AFF0;
    font-size: 1.1em;
}

.banner-placeholder:hover {
    background: linear-gradient(45deg, #bfdbfe, #93c5fd);
    border-color: #0084C7;
}

.banner-placeholder.vertical {
    flex-direction: column;
    min-height: 600px;
    writing-mode: vertical-lr;
    text-orientation: mixed;
    width: 200px;
}

.left-sidebar-ad, .right-sidebar-ad {
    position: relative;
}

.sticky-ad {
    position: sticky;
    top: 20px;
}

.mobile-banner-ad, .tablet-banner-ad {
    margin: 15px 0;
    text-align: center;
}

.mobile-banner-ad iframe {
    width: 100% !important;
    height: 150px !important;
    min-height: 150px;
    max-width: 100%;
    border-radius: 12px;
    display: block;
}

.mobile-banner-ad {
    margin: 30px 0;
    text-align: center;
}

.mobile-banner-ad .banner-placeholder {
    min-height: 150px;
    padding: 30px;
    font-size: 1.3em;
}

.tablet-banner-ad .banner-placeholder {
    min-height: 100px;
    padding: 20px;
}

/* AI GPT Expert Banner */
.ai-gpt-banner {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    padding: 25px;
    position: relative;
    overflow: hidden;
    color: white;
    text-align: center;
    transition: all 0.4s ease;
    box-shadow: 0 8px 32px rgba(102, 126, 234, 0.3);
    border: 2px solid transparent;
}

.ai-gpt-banner:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 45px rgba(102, 126, 234, 0.4);
    border-color: rgba(255, 255, 255, 0.3);
}

.ai-gpt-banner.vertical {
    writing-mode: horizontal-tb;
    text-orientation: mixed;
    min-height: 600px;
    width: 200px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.ai-gpt-banner.horizontal {
    min-height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.ai-gpt-banner .banner-icon {
    font-size: 3em;
    margin-bottom: 15px;
    animation: pulse 2s infinite;
}

.ai-gpt-banner.horizontal .banner-icon {
    font-size: 2.5em;
    margin-bottom: 0;
}

.ai-gpt-banner .banner-content h3 {
    font-size: 1.2em;
    font-weight: 700;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.ai-gpt-banner.horizontal .banner-content h3 {
    font-size: 1.1em;
}

.ai-gpt-banner .banner-content p {
    font-size: 0.9em;
    opacity: 0.9;
    margin-bottom: 15px;
}

.ai-gpt-banner .banner-cta {
    background: rgba(255, 255, 255, 0.2);
    padding: 10px 15px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.9em;
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.ai-gpt-banner:hover .banner-cta {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

.ai-gpt-banner .banner-glow {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: rotate 8s linear infinite;
    pointer-events: none;
}

/* Free Course Banner */
.free-course-banner {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    border-radius: 16px;
    padding: 25px;
    position: relative;
    overflow: hidden;
    color: white;
    text-align: center;
    transition: all 0.4s ease;
    box-shadow: 0 8px 32px rgba(76, 175, 80, 0.3);
    border: 2px solid transparent;
}

.free-course-banner:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 45px rgba(76, 175, 80, 0.4);
    border-color: rgba(255, 255, 255, 0.3);
}

.free-course-banner.vertical {
    writing-mode: horizontal-tb;
    text-orientation: mixed;
    min-height: 600px;
    width: 200px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.free-course-banner.horizontal {
    min-height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.free-course-banner .banner-icon {
    font-size: 3em;
    margin-bottom: 15px;
    animation: bounce 2s infinite;
}

.free-course-banner.horizontal .banner-icon {
    font-size: 2.5em;
    margin-bottom: 0;
}

.free-course-banner .banner-content h3 {
    font-size: 1.2em;
    font-weight: 700;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.free-course-banner.horizontal .banner-content h3 {
    font-size: 1.1em;
}

.free-course-banner .banner-content p {
    font-size: 0.9em;
    opacity: 0.9;
    margin-bottom: 15px;
}

.free-course-banner .banner-cta {
    background: rgba(255, 255, 255, 0.2);
    padding: 10px 15px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.9em;
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.free-course-banner:hover .banner-cta {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

.free-course-banner .banner-glow {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: rotate 8s linear infinite;
    pointer-events: none;
}

/* Banner Animations */
@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Banner Display */
.desktop-only {
    display: block;
}

.tablet-only, .mobile-only {
    display: none;
}

/* Main Content */
.main-content {
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    overflow: hidden;
    min-height: calc(100vh - 40px);
}

/* Header */
.header {
    background: linear-gradient(135deg, #00AFF0, #0084C7);
    color: white;
    padding: 20px 40px 40px 40px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 20"><defs><radialGradient id="a" cx="50%" cy="0%" r="100%"><stop offset="0%" stop-color="rgba(255,255,255,.1)"/><stop offset="100%" stop-color="rgba(255,255,255,0)"/></radialGradient></defs><rect width="100" height="20" fill="url(%23a)"/></svg>');
    opacity: 0.3;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
}

.logo-img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.logo i {
    font-size: 2.5em;
    color: #ffffff;
}

.header h1 {
    font-size: 2.5em;
    font-weight: 700;
    margin: 0;
}

.subtitle {
    font-size: 1.2em;
    opacity: 0.9;
    margin: 0;
    position: relative;
    z-index: 1;
}

/* Section Titles */
.section-title {
    font-size: 2em;
    font-weight: 600;
    color: #333;
    margin: 40px 0 30px 0;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.section-title i {
    color: #00AFF0;
}

/* Top Communities */
.top-communities {
    padding: 0 40px;
}

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

/* Communities Grid */
.communities-section {
    padding: 0 40px 40px 40px;
}

.communities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

/* Community Cards */
.community-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0,175,240,0.1);
    transition: all 0.3s ease;
    position: relative;
    border: 1px solid #e3f8ff;
}

.community-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0,175,240,0.15);
}

.community-card.featured {
    border: 2px solid #00AFF0;
    transform: scale(1.02);
}

.community-card.featured:hover {
    transform: scale(1.02) translateY(-8px);
}

.rank-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: linear-gradient(135deg, #00AFF0, #0084C7);
    color: white;
    padding: 8px 12px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.9em;
    z-index: 2;
    box-shadow: 0 4px 12px rgba(0,175,240,0.3);
}

.community-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.top-grid .community-image {
    height: 350px;
}

.community-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.community-card:hover .community-image img {
    transform: scale(1.1);
}

.verified-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #00AFF0;
    color: white;
    padding: 8px;
    border-radius: 50%;
    font-size: 0.9em;
    box-shadow: 0 4px 12px rgba(0,175,240,0.3);
}

.community-info {
    padding: 25px;
}

.community-info h3 {
    font-size: 1.3em;
    font-weight: 600;
    margin-bottom: 12px;
    color: #333;
}

.description {
    color: #666;
    margin-bottom: 15px;
    line-height: 1.5;
    font-size: 0.95em;
}

.stats {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    font-size: 0.9em;
    color: #777;
}

.stats span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.stats i {
    color: #00AFF0;
}

/* Pricing */
.price {
    font-size: 1.4em;
    font-weight: 700;
    margin-bottom: 20px;
    padding: 12px;
    border-radius: 8px;
    text-align: center;
}

.price.free {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
}

.price.premium {
    background: linear-gradient(135deg, #00AFF0, #0084C7);
    color: white;
}

/* Join Buttons */
.join-btn {
    display: block;
    text-align: center;
    padding: 15px 25px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1em;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.join-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.join-btn:hover::before {
    left: 100%;
}

.join-btn.free {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    box-shadow: 0 4px 15px rgba(76,175,80,0.3);
}

.join-btn.free:hover {
    background: linear-gradient(135deg, #45a049, #3d8b40);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76,175,80,0.4);
}

.join-btn.premium {
    background: linear-gradient(135deg, #00AFF0, #0084C7);
    color: white;
    box-shadow: 0 4px 15px rgba(0,175,240,0.3);
}

.join-btn.premium:hover {
    background: linear-gradient(135deg, #0084C7, #006BB3);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,175,240,0.4);
}

/* Footer */
.footer {
    background: #1a202c;
    color: white;
    text-align: center;
    padding: 30px 20px;
    margin-top: 40px;
}

.footer-content p {
    margin-bottom: 10px;
}

.disclaimer {
    font-size: 0.9em;
    opacity: 0.8;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .container {
        grid-template-columns: 1fr;
        padding: 0 15px;
    }

    .left-sidebar-ad, .right-sidebar-ad {
        display: none;
    }

    .desktop-only {
        display: none;
    }

    .tablet-only {
        display: block;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 10px;
    }

    .header {
        padding: 30px 20px;
    }

    .header h1 {
        font-size: 2em;
    }

    .logo-img {
        width: 50px;
        height: 50px;
    }

    .logo i {
        font-size: 2em;
    }

    .subtitle {
        font-size: 1em;
    }

    .section-title {
        font-size: 1.6em;
        margin: 30px 0 20px 0;
    }

    .top-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .communities-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .communities-section, .top-communities {
        padding: 0 20px 30px 20px;
    }

    .community-info {
        padding: 20px;
    }

    .stats {
        flex-direction: column;
        gap: 10px;
    }

    .tablet-only {
        display: none;
    }

    .mobile-only {
        display: block;
    }

    .banner-placeholder {
        min-height: 140px;
        padding: 25px;
        font-size: 1.1em;
    }

    .mobile-banner-ad .banner-placeholder {
        min-height: 100px;
        padding: 20px;
        font-size: 1.2em;
    }

    /* Mobile Banner Adjustments */
    .ai-gpt-banner.horizontal,
    .free-course-banner.horizontal {
        flex-direction: row;
        gap: 20px;
        padding: 25px;
        min-height: 150px;
        border-radius: 12px;
        margin: 25px 0;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 1.6em;
    }

    .logo {
        flex-direction: column;
        gap: 10px;
    }

    .logo-img {
        width: 40px;
        height: 40px;
    }

    .section-title {
        font-size: 1.4em;
        flex-direction: column;
        gap: 10px;
    }

    .communities-section, .top-communities {
        padding: 0 15px 25px 15px;
    }

    .community-info h3 {
        font-size: 1.1em;
    }

    .price {
        font-size: 1.2em;
    }

    .join-btn {
        padding: 12px 20px;
    }
}

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

.community-card {
    animation: fadeInUp 0.6s ease forwards;
}

.community-card:nth-child(1) { animation-delay: 0.1s; }
.community-card:nth-child(2) { animation-delay: 0.2s; }
.community-card:nth-child(3) { animation-delay: 0.3s; }
.community-card:nth-child(4) { animation-delay: 0.4s; }
.community-card:nth-child(5) { animation-delay: 0.5s; }

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Loading states */
.community-image img {
    background: #f0f0f0;
}

/* Accessibility */
.join-btn:focus, .banner-link:focus {
    outline: 3px solid #00AFF0;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .community-card {
        border: 2px solid #333;
    }

    .join-btn {
        border: 2px solid currentColor;
    }
}

/* Cleopatra Banner Styles */
.banner-320x90 {
    width: 98%;
    max-width: 500px;
    height: 70px;
    position: relative;
    background: linear-gradient(135deg, #0f0f23 0%, #1a1a2e 50%, #16213e 100%);
    border: 3px solid #D4AF37;
    border-radius: 12px;
    display: grid;
    grid-template-columns: 130px 1fr 70px;
    align-items: center;
    padding: 8px 12px;
    gap: 6px;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    box-shadow: 0 12px 40px rgba(212, 175, 55, 0.4), 0 0 0 1px rgba(212, 175, 55, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    margin: 0 auto;
}

.banner-320x90::after {
    content: '𓁹';
    position: absolute;
    top: 6px;
    right: 6px;
    font-size: 10px;
    color: #D4AF37;
    opacity: 0.3;
    animation: float 4s ease-in-out infinite;
    pointer-events: none;
}

.banner-320x90 .left-section {
    display: flex;
    align-items: center;
    gap: 8px;
}

.banner-320x90 .logo {
    font-size: 24px;
    color: #D4AF37;
    font-weight: bold;
}

.banner-320x90 .brand-name {
    font-size: 12px;
    font-weight: 800;
    color: #D4AF37;
    letter-spacing: 1px;
}

.banner-320x90 .brand-sub {
    font-size: 8px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.banner-320x90 .center-section {
    text-align: center;
    line-height: 1.2;
}

.banner-320x90 .main-text {
    font-size: 14px;
    font-weight: 800;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 2px;
}

.banner-320x90 .works-text {
    font-size: 12px;
    font-weight: 600;
    color: #D4AF37;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.banner-320x90 .sub-text {
    font-size: 10px;
    color: #aaa;
    font-weight: 500;
}

.banner-320x90 .cta-btn {
    background: linear-gradient(135deg, #D4AF37, #FFD700);
    color: #000;
    border: none;
    border-radius: 5px;
    padding: 6px 10px;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.3);
    min-width: 50px;
    white-space: nowrap;
}

.banner-320x90:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 50px rgba(212, 175, 55, 0.5), 0 0 0 1px rgba(212, 175, 55, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.banner-320x90:hover .cta-btn {
    background: linear-gradient(135deg, #FFD700, #FFF8DC);
    transform: scale(1.05);
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-2px);
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .community-card {
        animation: none;
    }

    .community-card:hover {
        transform: none;
    }

    .join-btn::before {
        display: none;
    }

    .banner-320x90::after {
        animation: none;
    }
}