:root {
    --bg-dark: #050814;
    --card-bg: #121829;
    --text-primary: #E5E7EB;
    --text-secondary: #9CA3AF;
    --accent-blue: #3B82F6;
    --accent-yellow: #FBBF24;
    --accent-purple: #6366F1;
    --border-color: #1F2933;
}

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

html, body {
    width: 100%;
    overflow-x: hidden;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: 'Space Grotesk', sans-serif;
    line-height: 1.6;
    max-width: 100vw;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    color: var(--text-primary);
}

/* Navigation */
.menu-header {
    background: linear-gradient(135deg, var(--card-bg) 0%, var(--bg-dark) 100%);
    border-bottom: 1px solid var(--border-color);
    width: 100%;
}

.brand-logo {
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    display: flex;
    align-items: center;
}

.brand-logo i {
    margin-right: 8px;
    color: var(--accent-yellow);
}

nav ul a {
    color: var(--text-primary);
    font-weight: 500;
    transition: color 0.3s ease;
}

nav ul a:hover {
    color: var(--accent-blue);
}

.sidenav {
    background-color: var(--card-bg);
}

.sidenav li>a {
    color: var(--text-primary);
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--bg-dark) 0%, #0f172a 100%);
    padding: 100px 0;
    position: relative;
    overflow: hidden;
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.hero-section::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 1000 1000"><circle cx="200" cy="150" r="2" fill="%23FBBF24" opacity="0.7"/><circle cx="800" cy="250" r="1" fill="%23FBBF24" opacity="0.5"/><circle cx="300" cy="400" r="1.5" fill="%23FBBF24" opacity="0.6"/><circle cx="700" cy="500" r="1" fill="%23FBBF24" opacity="0.4"/><circle cx="150" cy="600" r="2" fill="%23FBBF24" opacity="0.8"/></svg>');
    background-size: cover;
}

.hero-title {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent-blue) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    word-wrap: break-word;
}

.hero-subtitle {
    font-size: 1.3rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    max-width: 600px;
    word-wrap: break-word;
}

/* Buttons */
.stars-btn {
    background: linear-gradient(135deg, var(--accent-blue) 0%, var(--accent-purple) 100%);
    border-radius: 25px;
    text-transform: none;
    font-weight: 500;
    width: auto;
    max-width: 100%;
}

.stars-btn:hover {
    background: linear-gradient(135deg, var(--accent-purple) 0%, var(--accent-blue) 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.3);
}

/* Hero Planet Animation */
.hero-planet {
    position: relative;
    width: 200px;
    height: 200px;
    margin: 0 auto;
}

.planet-orbit {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 180px;
    height: 180px;
    border: 1px solid var(--accent-purple);
    border-radius: 50%;
    animation: rotate 20s linear infinite;
}

.planet {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--accent-blue) 0%, var(--accent-purple) 100%);
    border-radius: 50%;
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.5);
}

@keyframes rotate {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Sections */
.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    word-wrap: break-word;
}

.section-subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    font-size: 1.1rem;
    word-wrap: break-word;
}

/* Feature Cards */
.features-section {
    padding: 80px 0;
    background-color: var(--bg-dark);
    width: 100%;
}

.feature-card {
    background: var(--card-bg);
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    height: 100%;
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    width: 100%;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
}

.feature-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, var(--accent-purple) 0%, var(--accent-blue) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feature-icon i {
    font-size: 2.5rem;
    color: white;
}

.feature-card h3 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
    word-wrap: break-word;
}

.feature-card p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    word-wrap: break-word;
}

.feature-link {
    color: var(--accent-blue);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.feature-link:hover {
    color: var(--accent-purple);
}

/* Planets Section */
.planets-section {
    padding: 80px 0;
    background: linear-gradient(135deg, var(--card-bg) 0%, var(--bg-dark) 100%);
    width: 100%;
}

.planet-card {
    background: var(--card-bg);
    border-radius: 15px;
    padding: 1.5rem;
    text-align: center;
    margin-bottom: 1rem;
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease;
    width: 100%;
}

.planet-card:hover {
    transform: scale(1.05);
}

.planet-visual {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin: 0 auto 1rem;
}

.mercury .planet-visual {
    background: linear-gradient(135deg, #8C8C8C 0%, #BFBFBF 100%);
}

.venus .planet-visual {
    background: linear-gradient(135deg, #E6B87E 0%, #FFD700 100%);
}

.earth .planet-visual {
    background: linear-gradient(135deg, #1E90FF 0%, #32CD32 100%);
}

.mars .planet-visual {
    background: linear-gradient(135deg, #FF4500 0%, #DC143C 100%);
}

.planet-card h4 {
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
    word-wrap: break-word;
}

.planet-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    word-wrap: break-word;
}

/* Blog Preview */
.blog-preview {
    padding: 80px 0;
    background-color: var(--bg-dark);
    width: 100%;
}

/* Newsletter */
.newsletter-section {
    padding: 80px 0;
    background: linear-gradient(135deg, var(--card-bg) 0%, var(--bg-dark) 100%);
    width: 100%;
}

.newsletter-card {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 3rem;
    text-align: center;
    border: 1px solid var(--border-color);
    width: 100%;
}

.newsletter-card h3 {
    margin-bottom: 1rem;
    font-size: 2rem;
    word-wrap: break-word;
}

.newsletter-card p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    word-wrap: break-word;
}

.newsletter-form {
    max-width: 400px;
    margin: 0 auto;
    width: 100%;
}

/* Input Fields */
.input-field input {
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-color);
    width: 100%;
}

.input-field input:focus {
    border-bottom: 1px solid var(--accent-blue);
    box-shadow: 0 1px 0 0 var(--accent-blue);
}

.input-field label {
    color: var(--text-secondary);
}

.input-field input:focus + label {
    color: var(--accent-blue);
}

/* Cards */
.card {
    background: var(--card-bg);
    border-radius: 15px;
    border: 1px solid var(--border-color);
    width: 100%;
}

.card .card-title {
    color: var(--text-primary);
    font-weight: 600;
    word-wrap: break-word;
}

.card .card-text {
    color: var(--text-secondary);
    word-wrap: break-word;
}

.card-img-top {
    border-radius: 15px 15px 0 0;
    width: 100%;
    height: auto;
}

/* Footer */
.page-footer {
    background: var(--card-bg);
    border-top: 1px solid var(--border-color);
    width: 100%;
}

.footer-copyright {
    background: var(--bg-dark);
    width: 100%;
}

/* Pagination */
.pagination li a {
    color: var(--text-primary);
}

.pagination li.active {
    background-color: var(--accent-blue);
}

/* Markdown Content */
.markdown-body {
    color: var(--text-primary);
    width: 100%;
    overflow-wrap: break-word;
}

.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4,
.markdown-body h5,
.markdown-body h6 {
    color: var(--text-primary);
    margin-top: 2rem;
    margin-bottom: 1rem;
    word-wrap: break-word;
}

.markdown-body p {
    margin-bottom: 1rem;
    line-height: 1.7;
    word-wrap: break-word;
}

.markdown-body a {
    color: var(--accent-blue);
    text-decoration: none;
}

.markdown-body a:hover {
    color: var(--accent-purple);
    text-decoration: underline;
}

/* Blog List Section - FIXED GRID */
.blog-list-section {
    background: linear-gradient(135deg, var(--bg-dark) 0%, var(--card-bg) 100%);
    padding: 60px 0;
    min-height: 80vh;
    width: 100%;
}

.blog-main-title {
    font-size: 3rem;
    text-align: center;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent-yellow) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    word-wrap: break-word;
}

.blog-description {
    text-align: center;
    color: var(--text-secondary);
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto 3rem;
    line-height: 1.6;
    word-wrap: break-word;
}

/* Blog Cards - FIXED GRID */
.blog-list-section .row {
    display: flex;
    flex-wrap: wrap;
    margin-left: -0.75rem;
    margin-right: -0.75rem;
}

.blog-list-section .col {
    padding: 0 0.75rem;
    float: none;
    margin-bottom: 2rem;
}

.blog-list-section .col.s12 {
    width: 100%;
}

.blog-list-section .col.m6 {
    width: 50%;
}

.blog-list-section .col.l4 {
    width: 33.3333333333%;
}

.blog-card {
    background: var(--card-bg);
    border-radius: 15px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    width: 100%;
    margin: 0;
}

.blog-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
    border-color: var(--accent-purple);
}

.blog-card .card-image {
    border-radius: 15px 15px 0 0;
    overflow: hidden;
    position: relative;
    height: 200px;
}

.blog-card .card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.blog-card:hover .card-image img {
    transform: scale(1.05);
}

.blog-card .card-title {
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    width: 100%;
    padding: 20px 10px 10px;
    font-weight: 600;
    word-wrap: break-word;
    position: absolute;
    bottom: 0;
    left: 0;
    color: white;
}

.blog-card .card-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
}

.card-category {
    color: var(--accent-yellow);
    font-size: 0.8rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 5px;
    word-wrap: break-word;
}

.card-category i {
    font-size: 14px;
}

.blog-card-title {
    margin: 0.5rem 0;
    font-size: 1.3rem;
    line-height: 1.4;
    word-wrap: break-word;
}

.blog-card-title a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.blog-card-title a:hover {
    color: var(--accent-blue);
}

.blog-card-summary {
    color: var(--text-secondary);
    flex-grow: 1;
    margin-bottom: 1rem;
    line-height: 1.5;
    word-wrap: break-word;
}

.blog-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    flex-wrap: wrap;
    gap: 0.5rem;
}

.blog-date, .blog-author {
    color: var(--text-secondary);
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 4px;
    word-wrap: break-word;
}

.blog-date i, .blog-author i {
    font-size: 14px;
    color: var(--accent-purple);
}

.blog-card .card-action {
    border-top: 1px solid var(--border-color);
    padding: 1rem 1.5rem;
}

/* Blog Pagination */
.blog-pagination {
    margin-top: 3rem;
    clear: both;
}

.blog-pagination .pagination {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

.blog-pagination .pagination li {
    margin: 0 2px;
    display: inline-block;
}

.blog-pagination .pagination li a {
    color: var(--text-primary);
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: all 0.3s ease;
    display: block;
    padding: 0 10px;
    line-height: 30px;
}

.blog-pagination .pagination li.active a {
    background: var(--accent-blue);
    border-color: var(--accent-blue);
}

.blog-pagination .pagination li a:hover {
    background: var(--accent-purple);
    border-color: var(--accent-purple);
}

/* Empty State */
.card-panel {
    background: var(--card-bg);
    border-radius: 15px;
    border: 1px solid var(--border-color);
    padding: 3rem 2rem;
    width: 100%;
    clear: both;
}

.card-panel i {
    color: var(--accent-yellow);
    margin-bottom: 1rem;
}

.card-panel h4 {
    margin-bottom: 1rem;
    color: var(--text-primary);
    word-wrap: break-word;
}

.card-panel p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    word-wrap: break-word;
}

/* Container fixes for full width */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Responsive */
@media (max-width: 600px) {
    .hero-title {
        font-size: 2.5rem;
        text-align: center;
        padding: 0 10px;
    }

    .hero-subtitle {
        font-size: 1.1rem;
        text-align: center;
        padding: 0 10px;
    }

    .section-title {
        font-size: 2rem;
        padding: 0 10px;
    }

    .feature-card {
        margin-bottom: 2rem;
    }

    .blog-main-title {
        font-size: 2.2rem;
        padding: 0 10px;
    }

    .blog-description {
        font-size: 1rem;
        padding: 0 1rem;
    }

    .blog-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .blog-card .card-action {
        text-align: center;
    }

    .hero-planet {
        width: 150px;
        height: 150px;
    }

    .planet-orbit {
        width: 130px;
        height: 130px;
    }

    .planet {
        width: 45px;
        height: 45px;
        top: 15px;
    }

    .newsletter-card {
        padding: 2rem 1rem;
        margin: 0 10px;
    }

    .feature-card {
        margin: 0 10px 2rem 10px;
    }

    .planet-card {
        margin: 0 5px 1rem 5px;
    }
}

/* Blog grid responsive fixes */
@media (max-width: 992px) {
    .blog-list-section .col.l4 {
        width: 50%;
    }

    .blog-list-section .col.m6 {
        width: 100%;
    }
}

@media (max-width: 600px) {
    .blog-list-section .row {
        margin-left: -0.5rem;
        margin-right: -0.5rem;
    }

    .blog-list-section .col {
        padding: 0 0.5rem;
        width: 100% !important;
    }

    .blog-card .card-content {
        padding: 1rem;
    }

    .blog-card .card-action {
        padding: 1rem;
    }
}

/* Extra small devices */
@media (max-width: 400px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .container {
        padding: 0 10px;
    }

    .feature-card, .planet-card, .blog-card {
        margin: 0 5px 1rem 5px;
    }
}

/* Prevent horizontal scroll */
.row {
    margin-left: 0;
    margin-right: 0;
}

.col {
    padding: 0 0.75rem;
}

/* Clear floats for blog section */
.blog-list-section::after {
    content: "";
    display: table;
    clear: both;
}