/* Add these to the top of your main CSS file if not already defined */
:root {
    --primary-color: #4a6fa5;
    --primary-color-dark: #385a8a;
    --danger-color: #e74c3c;
    --text-color-muted: #6c757d;
    --border-color: #dee2e6;
    --background-color-light: #f8f9fa;
    --dark-color: #343a40;
}

/* Accessibility - Screen reader only content */
.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.sr-only-focusable:focus {
    position: static !important;
    width: auto !important;
    height: auto !important;
    padding: inherit !important;
    margin: inherit !important;
    overflow: visible !important;
    clip: auto !important;
    white-space: inherit !important;
}

/* Skip to content link for accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: #000;
    color: #fff;
    padding: 8px;
    z-index: 1000;
    text-decoration: none;
    border-radius: 4px;
}

.skip-link:focus {
    top: 6px;
}

/* Focus styles for better accessibility */
button:focus,
a:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 2px solid #00ff00;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #000;
        --text-color: #fff;
        --background-color: #fff;
    }
}

/* Reduced motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Reset some basic elements */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: #000000;
    color: #b9b9c8;
    margin: 0;
    font-family: 'VT323', monospace;
    font-size: 22px;
    line-height: 1.6;
}

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

h1, h2, h3, h4, h5, h6 {
    font-family: 'Press Start 2P', cursive;
    margin-bottom: 1rem;
    color: #00ff00;
}

a {
    color: #4f0df5;
    text-decoration: none;
    transition: color 0.3s;
}

a:hover {
    color: #00ff00;
}

/* Image */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Layout Grid */
.parent {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: auto;
    grid-column-gap: 20px;
    grid-row-gap: 20px;
    max-width: 1200px;
    margin: 60px auto;
    padding: 20px;
}

.div1 { grid-area: 1 / 1 / 2 / 4; }
.div4 { grid-area: 1 / 4 / 2 / 5; height: 100%; }
.div5 { grid-area: 2 / 1 / 3 / 3; height: 300px; }
.div6 { grid-area: 2 / 3 / 3 / 5; }
.div7 { grid-area: 3 / 1 / 4 / 5; }
.div8 { grid-area: 4 / 1 / 5 / 3; }
.div9 { grid-area: 4 / 3 / 5 / 5; height: 350px; }

/* SEO-friendly blog subtitle */
.blog-subtitle {
    font-family: 'VT323', monospace;
    font-size: 18px;
    color: #b9b9c8;
    margin-bottom: 20px;
    text-align: center;
}

/* Slider Container */
.slider {
    position: relative;
    height: 100%;
    overflow: hidden;
}

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

.slide.active {
    display: block;
}

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

/* Blog Styles */
.blog-item {
    margin-bottom: 20px;
    padding-bottom: 20px;
}

.blog-item h3 {
    margin-bottom: 5px;
}

.date {
    font-size: 0.9em;
    margin-bottom: 10px;
    color: #7a7a8c;
}

/* Gaming & Gallery Container */
.gaming-gallery-container {
    display: flex;
    gap: 20px;
    height: 100%;
}

.gallery-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 20px;
}

.gallery-section h2 {
    font-size: 18px;
    margin-bottom: 10px;
    color: #00ff00;
}

.gallery-section p {
    font-size: 14px;
    margin-bottom: 20px;
    color: #b9b9c8;
}

.gallery-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 20px;
    background: #4f0df5;
    color: white;
    text-decoration: none;
    border: 2px solid #4f0df5;
    box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.2);
    transition: all 0.3s;
    font-family: 'Press Start 2P', cursive;
    font-size: 12px;
}

.gallery-btn:hover {
    transform: translate(-4px, -4px);
    box-shadow: 8px 8px 0 rgba(79, 13, 245, 0.2);
    background: #00ff00;
    color: #000000;
}

.gallery-btn i {
    font-size: 24px;
}

.gaming-section {
    flex: 3;
    padding: 0 20px;
}

/* Gaming Hub Styles */
.gaming-hub {
    display: block;
    width: 100%;
}

.gaming-stats {
    padding: 10px;
}

.game-progress {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.game-title {
    font-family: 'Press Start 2P', cursive;
    font-size: 14px;
    margin-bottom: 8px;
    color: #b9b9c8;
    width: 100%;
}

.progress-bar {
    height: 24px;
    background-color: #000000;
    border: 2px solid #4f0df5;
    width: 70%;
    margin-right: 10px;
    position: relative;
}

.progress {
    height: 100%;
    background: repeating-linear-gradient(
        45deg,
        #4f0df5,
        #4f0df5 10px,
        #00ff00 10px,
        #00ff00 20px
    );
}

.progress-value {
    font-family: 'Press Start 2P', cursive;
    font-size: 14px;
    color: #00ff00;
}

.tech-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.tech-badge {
    font-family: 'Press Start 2P', cursive;
    font-size: 10px;
    padding: 8px 12px;
    background-color: #4f0df5;
    color: white;
    border: 2px solid #4f0df5;
    box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.2);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .parent {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }
    
    .div1, .div4, .div5, .div6, .div7, .div8, .div9 {
        grid-area: auto / 1 / auto / 2;
    }
    
    .div4 img {
        max-height: 300px;
        width: 100%;
        object-fit: cover;
    }
    
    /* Mobile responsive for gaming-gallery container */
    .gaming-gallery-container {
        flex-direction: column;
    }
    
    .gallery-section {
        border-right: none;
        border-bottom: 2px solid #4f0df5;
        padding: 15px;
    }
    
    .gallery-btn {
        flex-direction: row;
        padding: 15px 20px;
    }
    
    .gallery-btn i {
        font-size: 18px;
    }
    
    .gaming-section {
        padding: 15px 0;
    }
}

/* Chart and Map Containers */
.github-chart, .location-map, .empty-slide {
    padding: 20px;
    height: 100%;
    min-height: 300px;
    width: 100%;
    box-sizing: border-box;
}

#map {
    height: 250px;
    width: 100%;
}

canvas#githubChart {
    max-height: 250px;
    width: 100% !important;
}

.pixel-animation {
    height: 250px;
    position: relative;
    overflow: hidden;
}

/* Base styles */
.parent > div {
    border-radius: 15px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    padding: 20px;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
}

.parent > div:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
}

.div1 h1 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 2.5rem;
    font-weight: 700;
    color: white; 
}

.div1 p {
    font-size: 1.1rem;
    line-height: 1.6;
    text-align: justify;
}

.div4 img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    display: block;
}

.div4:hover img {
    transform: scale(1.05);
}

/* Social media section */
.div6 {
    grid-column: 1 / span 3;
    grid-row: 7 / span 2;
    background-color: #2D2D2D;
    justify-content: center;
    align-items: center;
}

.social-icons {
    display: flex;
    justify-content: space-around;
    width: 100%;
}

.social-icons a {
    color: white;
    font-size: 2rem;
    transition: transform 0.3s ease;
}

.social-icons a:hover {
    transform: scale(1.2);
}

/* Projects section */
.div7 {
    grid-column: 4 / span 3;
    grid-row: 6 / span 3;
    background-color: #2D2D2D;
    display: flex;
    flex-direction: column;
}

.div7 h2 {
    margin-top: 0;
    font-size: 1.8rem;
    text-align: center;
}

.project-list {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 15px;
    max-height: calc(100% - 80px); 
}
.project-list::-webkit-scrollbar {
    width: 8px;
}
.project-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}
.project-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 10px;
}
.project-list::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

.project-item {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.project-item h3 {
    margin-top: 5px;
    margin-bottom: 5px;
}

.project-item p {
    margin: 5px 0;
    font-size: 0.9rem;
    opacity: 0.8;
}

.project-thumb {
    width: 100%;
    max-height: 80px;
    object-fit: cover;
    border-radius: 5px;
    margin-bottom: 5px;
}

.view-all-btn {
    display: block;
    width: fit-content;
    padding: 10px 20px;
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 500;
    transition: background-color 0.3s ease;
    margin: 15px auto 0; 
    text-align: center;
}

.view-all-btn:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

/* Blog section */
.div8 {
    grid-column: 6 / span 3;
    grid-row: 1 / span 5;
    background-color: #2D2D2D;
    display: flex;
    flex-direction: column;
}

.div8 h2 {
    margin-top: 0;
    font-size: 1.8rem;
    text-align: center;
}

.blog-post {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 15px;
    max-height: calc(100% - 80px); 
}
.blog-post::-webkit-scrollbar {
    width: 8px;
}
.blog-post::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}
.blog-post::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 10px;
}
.blog-post::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

.post {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.post h3 {
    margin-top: 5px;
    margin-bottom: 5px;
}

.post p {
    margin: 5px 0;
    font-size: 0.9rem;
    opacity: 0.8;
}

.read-more {
    display: inline-block;
    font-size: 0.9rem;
    color: #fff;
    opacity: 0.8;
    text-decoration: none;
    transition: opacity 0.3s;
}

.read-more:hover {
    opacity: 1;
}

.blog-date {
    font-size: 0.85rem;
    opacity: 0.7;
    margin-top: 5px;
}

/* Styling for div9 slider */
.div9 {
    grid-column: 7 / span 2;
    grid-row: 6 / span 3;
    background-color: #2D2D2D;
    padding: 0 !important;
    position: relative;
    justify-content: center;
    align-items: center;
}

.div9 .slider {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.div9 .slide {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease;
    padding: 15px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

.div9 .slide.active {
    opacity: 1;
}

.div9 .github-chart {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.div9 .github-chart img {
    max-width: 100%;
    max-height: 80%;
    object-fit: contain;
}

.div9 h3 {
    margin-top: 0;
    margin-bottom: 15px;
    text-align: center;
}

/* GitHub Chart styling */
#githubChart {
    width: 100% !important;
    height: 100% !important;
    max-height: 220px;
}

/* Map styling for Leaflet */
.location-map {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

#map {
    width: 100%; 
    flex-grow: 1;
    min-height: 200px;
    border-radius: 10px;
    z-index: 1;
    background-color: #1a1a1a; 
}

/* Map styling */
#map {
    width: 100%;
    height: 80%;
    border-radius: 10px;
}

.div9 .empty-slide {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
}

/* Thông báo khi không có dữ liệu */
.empty-message, .error-message {
    text-align: center;
    opacity: 0.7;
    padding: 10px;
}

.error-message {
    color: #ff6b6b;
}

/* Styling cho danh sách tiêu đề */
.posts-list, .projects-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.posts-list li, .projects-list li {
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.post-link, .project-link {
    color: white;
    text-decoration: none;
    display: block;
    padding: 6px 10px;
    transition: background-color 0.3s ease, transform 0.3s ease;
    border-radius: 5px;
    font-weight: 500;
}

.post-link:hover, .project-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    /* transform: translateX(5px); */
}

.project-link {
    color: #ffffff;
}

.post-link {
    color: #ffffff;
}
.language-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

.language-toggle button {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.language-toggle button:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.language-toggle button i {
    font-size: 1rem;
}

.language-toggle button .lang-text {
    font-size: 0.9rem;
}
.wedding-invite-button {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1000;
}

.wedding-invite-button a {
    display: flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #ffffff, #e6f7e9);
    color: #2e7d32;
    padding: 10px 15px;
    border-radius: 25px;
    text-decoration: none;
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    font-size: 14px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid rgba(46, 125, 50, 0.3);
}

.wedding-invite-button a:hover {
    transform: translateY(-2px);
    background: linear-gradient(135deg, #e6f7e9, #ffffff);
    box-shadow: 0 6px 12px rgba(46, 125, 50, 0.2);
}

.wedding-invite-button i {
    color: #2e7d32;
    font-size: 16px;
}