:root {
    --bg-color: #FFF9E3; /* Soft aesthetic yellow */
    --primary-color: #ff914d;
    --secondary-color: #5ce1e6;
    --text-color: #333333;
    --card-bg: rgba(255, 255, 255, 0.85);
    --hover-card-bg: rgba(255, 255, 255, 1);
    --shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 10px 25px rgba(0, 0, 0, 0.1);
    
    /* Difficulties */
    --diff-easy: #5cdb95;
    --diff-medium: #ffc107;
    --diff-hard: #ff5e5e;
}

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

body {
    background: linear-gradient(135deg, #fff3c4 0%, var(--bg-color) 100%);
    color: var(--text-color);
    font-family: 'Nunito', sans-serif;
    line-height: 1.6;
}
body:before {
    content:'';
    width:100%;
    height:100%;
    position:fixed;
    left:0;
    top:0;
    background:url(image/bg.png) no-repeat center top;
    background-size:contain;
    z-index:-1;
}

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

/* Header */
.main-header {
    text-align: center;
    padding: 40px 0;
    background: linear-gradient(135deg, var(--primary-color), #ff6b6b);
    color: white;
    border-radius: 0 0 40px 40px;
    margin-bottom: 40px;
    box-shadow: var(--shadow);
}

.main-header h1 {
    font-size: 3rem;
    font-weight: 800;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
    letter-spacing: 1px;
}

.main-header p {
    font-size: 1.2rem;
    font-weight: 600;
    margin-top: 10px;
    opacity: 0.9;
}

/* Sections */
.section-title {
    font-size: 2rem;
    color: #444;
    margin: 0 auto 20px auto; /* Centers the block */
    text-align: center;
    font-weight: 800;
    background: var(--card-bg);
    padding: 4px 20px;
    border-radius: 25px;
    box-shadow: var(--shadow);
    display: block;
    width: max-content;
}

/* Featured (4 Items 260x176) */
.featured-section {
    margin-bottom: 50px;
}

.featured-grid {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.featured-card {
    width: 234px;
    background: var(--card-bg);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
    backdrop-filter: blur(5px);
    border: 3px solid #000;
}

.featured-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    background: var(--hover-card-bg);
    border-color: var(--primary-color);
}

.card-img-wrapper {
    width: 100%;
    height: 158px;
    overflow: hidden;
    position: relative;
    background-color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.download-count {
    position: absolute;
    top: 10px;
    right: 8px;
    background: rgba(0, 0, 0, 0.65);
    color: #fff;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 700;
    z-index: 2;
    backdrop-filter: blur(2px);
    pointer-events: none;
}

@keyframes blinkEffect {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.05); }
}

.new-badge {
    background: var(--primary-color);
    animation: blinkEffect 1.5s infinite ease-in-out;
    padding: 4px 12px;
    letter-spacing: 1px;
}

.featured-card:hover .card-img-wrapper img, .gallery-card:hover .card-img-wrapper img {
    transform: scale(1.05);
}

/* Card Content Details */
.card-content {
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.tag {
    font-size: 0.85rem;
    background-color: #eee;
    padding: 6px 12px;
    border-radius: 20px;
    color: #555;
    font-weight: 800;
}

.tag.easy { background-color: var(--diff-easy); color: #fff; }
.tag.medium { background-color: var(--diff-medium); color: #333; }
.tag.hard { background-color: var(--diff-hard); color: #fff; }

.download-btn-wrapper {
    position: relative;
    width: 100%;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    transition: transform 0.3s ease;
    display: block;
}

.download-btn-wrapper:hover {
    transform: scale(1.05);
}

.download-btn-wrapper .download-img {
    width: 100%;
    display: block;
}

.download-btn-wrapper .download-text {
    position: absolute;
    top: 50%;
    right: 20%;
    transform: translateY(-50%);
    color: #fff;
    font-weight: 800;
    font-size: 1.1rem;
    pointer-events: none;
    letter-spacing: 1px;
}

/* Filters */
.filters-section {
    margin-bottom: 30px;
    text-align: center;
}

.filter-group {
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    background: var(--card-bg);
    padding: 15px;
    border-radius: 25px;
    box-shadow: var(--shadow);
}

.hashtag {
    background-color: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}

.hashtag:hover, .hashtag.active {
    background-color: var(--primary-color);
    color: white;
}

.hashtag.diff-easy { border-color: var(--diff-easy); color: var(--diff-easy); }
.hashtag.diff-easy:hover, .hashtag.diff-easy.active { background-color: var(--diff-easy); color: white; border-color: var(--diff-easy); }

.hashtag.diff-medium { border-color: var(--diff-medium); color: #d6a100; }
.hashtag.diff-medium:hover, .hashtag.diff-medium.active { background-color: var(--diff-medium); color: #fff; border-color: var(--diff-medium); }

.hashtag.diff-hard { border-color: var(--diff-hard); color: var(--diff-hard); }
.hashtag.diff-hard:hover, .hashtag.diff-hard.active { background-color: var(--diff-hard); color: white; border-color: var(--diff-hard); }

/* Gallery Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 234px);
    justify-content: center;
    gap: 20px;
    margin-bottom: 50px;
}

.gallery-card {
    background: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 3px solid #000;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.gallery-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary-color);
}

.gallery-card .card-img-wrapper {
    height: 158px;
}

.hidden {
    display: none !important;
}

#no-results {
    text-align: center;
    font-size: 1.2rem;
    font-weight: bold;
    color: #666;
    padding: 40px;
}

/* Footer */
.main-footer {
    background-color: #fff;
    text-align: center;
    padding: 20px 0;
    margin-top: 40px;
    color: #666;
    border-top: 1px solid #eee;
    font-weight: 600;
}

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

.fade-in {
    animation: fadeIn 0.4s ease forwards;
}

@media (max-width: 1200px) {
    .featured-grid {
        display: grid;
        grid-template-columns: repeat(2, 234px);
        justify-content: center;
    }
    .gallery-grid {
        grid-template-columns: repeat(2, 234px);
        justify-content: center;
    }
}
@media (max-width: 600px) {
    .featured-grid {
        grid-template-columns: 1fr;
    }
    .featured-card {
        width: 100%;
        max-width: 256px;
        margin: 0 auto;
    }
    .gallery-grid {
        grid-template-columns: 1fr;
    }
}

/* Layout from index.php */
.layout-wrapper { width:100%; position:relative; }
.layout-wrapper:before, .layout-wrapper:after { content:''; width:100px; position:fixed; background-color: #000; z-index: 1;}
.layout-wrapper:before { height:60%; top:0; left:-76px; transform: skew(-8deg, 0deg); }
.layout-wrapper:after { height:30%; bottom:0; right: -60px; transform: skew(-21deg, 0deg); }

.layout-container { width: 100%; max-width: 1400px; margin: 0 auto; display: flex; flex-wrap: wrap; position: relative; min-height: 100vh;}
.layout-left { position: relative; z-index: 2; height: 100%;}
.layout-right { position: relative; z-index: 3; display: flex; flex-direction: column;}

.left-animation { position: relative; }

@media (min-width: 1200px) {
    .layout-left { width: 35%; height: 100%; }
    .layout-right { width: 65%; height: 100%; padding: 40px 0; }
    .left-animation { position: fixed; left: 32%; bottom: 0px; transform: translateX(-50%); }
}

@media (max-width: 1199px) {
    .layout-left, .layout-right { width: 100%; }
    .layout-right { padding-top: 20px;}
    .left-animation canvas { width:100%!important; height:auto!important;}
    .left-animation #animation_container, .left-animation #dom_overlay_container { width:100%!important; height:500px!important;}
}

.left-buttons { position:fixed; z-index:50; top: 10px; left: 10px; display: flex; align-items: flex-start; }
.carrot, .back { position:relative; z-index: 3; transform: scale(0.9); transform-origin: top left; }
.back { margin-right:15px; }

@media (min-width:1200px) {
    .left-buttons { top: 40px; left: 40px; }
}

/* En Uste Git Butonu */
@keyframes softBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}
#scrollToTopBtn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 50%;
    width: 75px;
    height: 75px;
    font-size: 42px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.5);
    display: none;
    z-index: 1000;
    transition: background 0.3s;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: softBounce 2s infinite ease-in-out;
}
#scrollToTopBtn:hover {
    background: #c0392b;
    animation-play-state: paused;
}

/* CLS Önlemi: Animasyon yüklenirken yer tut */
.left-animation {
    min-height: 825px;
}
@media (max-width: 1199px) {
    .left-animation { min-height: 500px; }
}

/* SEO Bilgilendirme Bölümü */
.seo-text-section {
    background: linear-gradient(135deg, #fff9e3, #fff3c4);
    border-top: 3px solid var(--primary-color);
    padding: 40px 20px;
    margin-top: 10px;
}
.seo-text-section h2 {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 800;
    color: #444;
    margin-bottom: 28px;
}
.seo-text-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    max-width: 1100px;
    margin: 0 auto;
}
.seo-text-col {
    background: #fff;
    border-radius: 14px;
    padding: 22px 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
    border: 2px solid #f0e6c8;
}
.seo-text-col h3 {
    font-size: 1rem;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 10px;
}
.seo-text-col p {
    font-size: 0.88rem;
    color: #555;
    line-height: 1.75;
}
@media (max-width: 900px) {
    .seo-text-grid { grid-template-columns: 1fr; }
}

/* Boyama kelimesi vurgusu */
mark.boyama-mark {
    background: linear-gradient(120deg, #ffd93d 0%, #ff914d 100%);
    color: #333;
    padding: 0 4px;
    border-radius: 4px;
    font-weight: 800;
    font-style: normal;
}

/* Accordion bölümü */
.accordion-section {
    background: #fff;
    border-top: 3px solid #ffd93d;
    max-width: 100%;
}

.accordion-toggle {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 28px;
    background: linear-gradient(135deg, #fff9e3, #fff3c4);
    border: none;
    cursor: pointer;
    font-family: 'Nunito', sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    color: #333;
    text-align: left;
    transition: background 0.3s;
    gap: 12px;
}

.accordion-toggle:hover {
    background: linear-gradient(135deg, #fff3c4, #ffe89a);
}

.accordion-arrow {
    font-size: 0.85rem;
    transition: transform 0.35s ease;
    display: inline-block;
    flex-shrink: 0;
    color: var(--primary-color);
}

.accordion-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease;
}

.accordion-body.open {
    max-height: 2000px;
}

.accordion-inner {
    padding: 28px 32px 36px;
    max-width: 900px;
    margin: 0 auto;
}

.accordion-intro {
    font-size: 0.97rem;
    color: #555;
    line-height: 1.8;
    margin-bottom: 18px;
}

.accordion-item {
    border-left: 4px solid var(--primary-color);
    padding: 14px 18px;
    margin-bottom: 20px;
    background: #fffdf5;
    border-radius: 0 10px 10px 0;
}

.accordion-item h3 {
    font-size: 1rem;
    font-weight: 800;
    color: #333;
    margin-bottom: 8px;
}

.accordion-item p {
    font-size: 0.9rem;
    color: #555;
    line-height: 1.8;
}

.accordion-closing {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--primary-color);
    text-align: center;
    margin-top: 24px;
    padding: 14px;
    background: linear-gradient(135deg, #fff9e3, #fff3c4);
    border-radius: 10px;
    line-height: 1.7;
}
