:root {
    --bg-page: #fdfcf0;
    --primary: #4f46e5;
    --accent: #6366f1;
}

html {
    overflow-y: scroll;
    scroll-behavior: smooth;
}

body {
    font-family: 'Quicksand', sans-serif;
    background-color: var(--bg-page);
    position: relative;
}

a.notebook-card {
    text-decoration: none;
    color: inherit;
    display: flex;
}

::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 5px;
    border: 2px solid #f1f5f9;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* YENİ ARKAPLAN ANİMASYONU: Ambient Blobs */
.bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    background: #fdfcf0;
}

.ambient-shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.6;
    animation: floatAmbient 10s infinite ease-in-out alternate;
}

@keyframes floatAmbient {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(20px, -20px) scale(1.1);
    }
}

.hero-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
    padding-bottom: 4rem;
}

.hero-wave-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    transform: rotate(180deg);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 320'%3E%3Cpath fill='%236366f1' fill-opacity='0.15' d='M0,192L48,197.3C96,203,192,213,288,229.3C384,245,480,267,576,250.7C672,235,768,181,864,181.3C960,181,1056,235,1152,234.7C1248,235,1344,181,1392,154.7L1440,128L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z'%3E%3C/path%3E%3Cpath fill='%234f46e5' fill-opacity='0.2' d='M0,256L48,245.3C96,235,192,213,288,192C384,171,480,149,576,160C672,171,768,213,864,224C960,235,1056,213,1152,192C1248,171,1344,149,1392,138.7L1440,128L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center bottom;
    background-size: cover;
}

.animate-hero {
    animation: fadeInUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.notebook-card {
    background: white;
    border-radius: 1.5rem;
    transition: all 0.3s;
    border: 1px solid #f1f5f9;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
}

@media (min-width: 768px) {
    .notebook-card {
        border-radius: 2rem;
    }
}

.notebook-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.05);
}

.active-filter,
.active-tab {
    background-color: var(--primary) !important;
    color: white !important;
}

.no-scrollbar::-webkit-scrollbar {
    display: none;
}

.modal-bg {
    backdrop-filter: blur(8px);
    background: rgba(255, 255, 255, 0.98);
}

.pdf-preview-container {
    width: 100%;
    background: #f8fafc;
    border-radius: 1rem;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (min-width: 768px) {
    .pdf-preview-container {
        border-radius: 1.5rem;
    }
}

canvas {
    max-width: 100%;
    height: auto !important;
}

.icon-opt {
    @apply w-10 h-10 flex items-center justify-center border rounded-xl cursor-pointer hover:bg-indigo-50 transition-all text-xl;
}

.icon-opt.selected {
    @apply border-indigo-600 bg-indigo-50 scale-110 shadow-sm;
}

.delete-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 50;
    background: #ef4444;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: 2px solid white;
    font-size: 0.7rem;
}

@media (min-width: 768px) {
    .delete-btn {
        width: 32px;
        height: 32px;
        top: 12px;
        right: 12px;
        font-size: 1rem;
    }

    .edit-btn {
        width: 32px;
        height: 32px;
        top: 12px;
        right: 50px;
        font-size: 1rem;
    }
}

.edit-btn {
    position: absolute;
    top: 8px;
    right: 40px;
    z-index: 50;
    background: #f59e0b;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: 2px solid white;
    font-size: 0.7rem;
}

#b-content:empty:before {
    content: attr(placeholder);
    color: #94a3b8;
}

.card-header-visual {
    width: 100%;
    height: 100px;
    background: #f8fafc;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

@media (min-width: 768px) {
    .card-header-visual {
        height: 160px;
    }
}

.card-header-visual img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 10px;
}

.card-header-visual .emoji-fallback {
    font-size: 2.5rem;
}

@media (min-width: 768px) {
    .card-header-visual .emoji-fallback {
        font-size: 3.5rem;
    }
}

.game-thumb-placeholder {
    width: 100%;
    height: 100px;
    background: linear-gradient(135deg, #fef3c7 0%, #fbbf24 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    border-radius: 1rem;
}

@media (min-width: 768px) {
    .game-thumb-placeholder {
        height: 180px;
        font-size: 4rem;
        border-radius: 1.5rem;
    }
}

.breadcrumb-item {
    @apply flex items-center gap-2 text-slate-400 text-xs font-bold uppercase tracking-widest;
}

.breadcrumb-item:not(:last-child):after {
    content: '›';
    @apply text-slate-300 text-lg mx-1;
}

.main-cat-active {
    background-color: #f43f5e !important;
    color: white !important;
    box-shadow: 0 4px 6px -1px rgba(244, 63, 94, 0.3);
}

.suggestion-card {
    @apply flex gap-4 p-4 bg-white border border-slate-100 rounded-2xl hover:bg-slate-50 transition-all cursor-pointer;
}

.suggestion-thumb {
    @apply w-16 h-16 rounded-xl bg-slate-100 flex-shrink-0 flex items-center justify-center text-2xl overflow-hidden;
}

.suggestion-thumb img {
    @apply w-full h-full object-cover;
}

.search-container {
    position: relative;
    width: 100%;
    max-width: 300px;
}

.search-input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    outline: none;
    transition: all 0.3s;
    font-size: 0.875rem;
    font-weight: 500;
}

.search-input:focus {
    background: white;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
}

.search-icon {
    position: absolute;
    left: 0.875rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    pointer-events: none;
}

.premium-action-btn {
    padding: 0.8rem 1.8rem;
    border-radius: 1.25rem;
    font-weight: 700;
    font-size: 0.8rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.1);
    min-width: 140px;
}

@media (max-width: 768px) {
    .premium-action-btn {
        padding: 0.6rem;
        min-width: auto;
        width: 42px;
        height: 42px;
        border-radius: 50%;
    }

    .premium-action-btn span {
        display: none;
    }
}

.btn-share-premium {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: white;
    box-shadow: 0 10px 20px -5px rgba(79, 70, 229, 0.4);
}

.btn-share-premium:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 25px -5px rgba(79, 70, 229, 0.5);
    background: linear-gradient(135deg, #4338ca 0%, #6d28d9 100%);
}

.btn-share-premium:active {
    transform: translateY(1px) scale(0.98);
}

.btn-share-premium svg {
    transition: transform 0.3s ease;
}

.btn-share-premium:hover svg {
    transform: rotate(-15deg) scale(1.1);
}

.btn-close-premium {
    background-color: #f15bb5;
    color: white;
    border: none;
    box-shadow: 0 10px 20px -5px rgba(241, 91, 181, 0.4);
}

.btn-close-premium:hover {
    background-color: #d6338a;
    transform: translateY(-2px);
    box-shadow: 0 15px 25px -5px rgba(241, 91, 181, 0.5);
}

.btn-close-premium:active {
    transform: translateY(1px) scale(0.98);
}

#toast {
    position: fixed;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #1e293b;
    color: white;
    padding: 12px 24px;
    border-radius: 1rem;
    font-weight: 600;
    font-size: 0.85rem;
    z-index: 1000;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

#toast.show {
    transform: translateX(-50%) translateY(0);
}

.blog-content iframe {
    display: block;
    width: 100% !important;
    max-width: 1200px;
    margin: 2rem auto !important;
    aspect-ratio: 16 / 9;
    border-radius: 1.5rem;
    border: 2px solid #f1f5f9;
    box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.1);
}

#postMainContent {
    width: 100% !important;
    flex: 1 1 100% !important;
    max-width: 1200px;
    margin: 0 auto;
}

@media (min-width: 1024px) {
    #postSidebar {
        width: 300px !important;
        border-left: 1px solid #f1f5f9;
        background: #fdfcf0;
    }
}

.aesthetic-desc {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-left: 5px solid var(--primary);
    padding: 1.25rem 1.5rem;
    border-radius: 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.7;
    color: #1e293b;
    margin-top: 1.5rem;
    box-shadow: 0 10px 30px -10px rgba(79, 70, 229, 0.08);
    position: relative;
    white-space: pre-wrap;
    text-align: left;
}

@media(min-width: 768px) {
    .aesthetic-desc {
        padding: 1.5rem 2rem;
        font-size: 1.05rem;
        line-height: 1.8;
    }
}

.aesthetic-desc::before {
    content: '"';
    position: absolute;
    top: 0.5rem;
    right: 1.5rem;
    font-size: 4rem;
    color: rgba(79, 70, 229, 0.06);
    font-family: serif;
    line-height: 1;
}

.desc-clamped {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rec-carousel {
    display: flex;
    overflow-x: auto;
    gap: 1.5rem;
    padding: 1rem 0.5rem 2rem 0.5rem;
    scroll-snap-type: x mandatory;
}

.rec-carousel::-webkit-scrollbar {
    height: 6px;
}

.rec-carousel::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

.rec-card {
    min-width: 280px;
    max-width: 280px;
    scroll-snap-align: start;
    background: white;
    border: 1px solid #f1f5f9;
    border-radius: 1.5rem;
    padding: 1.25rem;
    transition: all 0.3s;
    cursor: pointer;
}

.rec-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 25px -5px rgba(0, 0, 0, 0.08);
    border-color: #e0e7ff;
}

.page-btn {
    background: #e0e7ff;
    border: 2px solid #c7d2fe;
    color: #4338ca;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    transition: all 0.2s;
    box-shadow: 0 4px 6px -1px rgba(79, 70, 229, 0.1);
}

.page-btn:hover:not(:disabled) {
    background: #4f46e5;
    border-color: #4f46e5;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(79, 70, 229, 0.3);
}

.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f1f5f9;
    border-color: #e2e8f0;
    color: #94a3b8;
    box-shadow: none;
}

.page-info {
    background: #e0e7ff;
    padding: 0.5rem 1.5rem;
    border-radius: 12px;
    border: 2px solid #c7d2fe;
    font-size: 0.9rem;
    font-weight: 800;
    color: #4338ca;
    box-shadow: 0 4px 6px -1px rgba(79, 70, 229, 0.1);
    display: flex;
    align-items: center;
}

/* Editör için özel stil (Canva'dan yapıştırma uyumlu) */
.wysiwyg-content * {
    color: inherit !important;
    font-family: inherit;
}

.wysiwyg-content p {
    margin-bottom: 0.5em;
}

.wysiwyg-content ul {
    list-style: disc;
    padding-left: 1.5em;
    margin-bottom: 0.5em;
}

.wysiwyg-content ol {
    list-style: decimal;
    padding-left: 1.5em;
    margin-bottom: 0.5em;
}

.wysiwyg-content a {
    color: #4f46e5;
    text-decoration: underline;
}