@import url('https://fonts.googleapis.com/css2?family=Creepster&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Bangers&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@500&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;1,400&display=swap');

/* ==========================================
   1. OPŠTI STILOVI & PREKIDAČ (SWITCH)
   ========================================== */

.theme-switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 20px;
    flex-shrink: 0;
}

.theme-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #3d281a;
    transition: 0.3s;
    border-radius: 20px;
    border: 1px solid #5c3d2e;
}

.slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 2px;
    bottom: 2px;
    background-color: #f0e6d2;
    transition: 0.3s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #c59d5f;
}

input:checked + .slider:before {
    transform: translateX(20px);
}

body.no-theme .romantic-corner-ribbon {
    display: none !important;
}


/* ==========================================
   2. MANGA MONDAY (Strip & Comic estetika)
   ========================================== */

.manga-sticks-container,
body.no-theme .manga-sticks-container,
body:not(.theme-manga) .manga-sticks-container {
    display: none !important;
}

body.theme-manga:not(.no-theme) .manga-sticks-container {
    display: block !important;
}

body:not(.no-theme).theme-manga h1, 
body:not(.no-theme).theme-manga h2 {
    font-family: 'Bangers', 'Comic Sans MS', cursive, sans-serif !important;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

body:not(.no-theme).theme-manga::before {
    content: "";
    position: fixed; 
    top: 0; left: 0; 
    width: 100vw; height: 100vh;
    pointer-events: none; 
    z-index: 9999;
    background: radial-gradient(circle, #000000 10%, transparent 11%);
    background-size: 12px 12px;
    opacity: 0.03;
}

.manga-notice-box {
    text-align: center;
    background: #fff0f5;
    border: 2px dashed #ff69b4;
    color: #c71585;
    padding: 8px 15px;
    border-radius: 8px;
    margin: 10px auto 20px auto;
    max-width: 420px;
    font-weight: 600;
    box-shadow: 2px 2px 0px #000;
}

.pageflip-wrapper {
    width: 100% !important;
    max-width: 800px !important;
    margin: 30px auto !important;
    display: flex !important;
    justify-content: center !important;
}

#flip-book {
    margin: 0 auto;
    box-sizing: border-box;
}

/* Stranice stripa zadržavaju svoju belu pozadinu i jasan okvir */
.page {
    background-color: #fdfbf7 !important;
    border: 1px solid #c9b097 !important;
    overflow: hidden !important;
    box-sizing: border-box;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15) !important;
}

body:not(.no-theme).theme-manga .page {
    border: 3px solid #000 !important;
    background-color: #ffffff !important;
    box-shadow: 4px 4px 0px #000 !important;
}


/* ==========================================
   3. STICK PUPPETS (LIKOVI I ŠTAPIĆI)
   ========================================== */

.manga-stick {
    position: fixed !important;
    bottom: -160px;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    pointer-events: none;
    will-change: transform;
    transform-origin: bottom center;
}

.manga-character img {
    height: 160px;
    width: auto;
    max-width: 220px;
    object-fit: contain;
    border: none !important;
    background: transparent !important;
    padding: 0 !important;
    display: block;
    filter: drop-shadow(2px 4px 6px rgba(0,0,0,0.15));
}

/* Osnovna boja štapića (za Light mode) */
.stick-line {
    width: 2px;
    height: 400px;
    background: #3d281a; 
    border-radius: 2px;
    margin-top: -3px;
    opacity: 0.8;
}

.stick-left-1 { 
    left: 4%; 
    bottom: -110px !important; 
}
.stick-left-1 .manga-character img { height: 200px; }

.stick-left-2 { 
    left: 14%; 
    bottom: -220px !important; 
}
.stick-left-2 .manga-character img { height: 90px; }

.stick-right-1,
.red-eyes-dragon,
img[alt*="Red-Eyes"] { 
    right: 14%; 
    bottom: -200px !important; 
    pointer-events: none !important;
}
.stick-right-1 .manga-character img { height: 160px; }

.stick-right-2 { 
    right: 4%; 
    bottom: -90px !important; 
}
.stick-right-2 .manga-character img { height: 220px; }


/* ==========================================
   4. ROMANTIC FRIDAY
   ========================================== */

body:not(.no-theme).theme-romantic a:not(.romantic-corner-ribbon):hover, 
body:not(.no-theme).theme-romantic button:hover {
    position: relative;
}

body:not(.no-theme).theme-romantic a:not(.romantic-corner-ribbon):hover::before, 
body:not(.no-theme).theme-romantic button:hover::before {
    content: "💖";
    position: absolute;
    top: -5px;
    left: 20%;
    font-size: 1.2rem;
    pointer-events: none;
    animation: multiHeart1 0.8s ease-out forwards;
}

body:not(.no-theme).theme-romantic a:not(.romantic-corner-ribbon):hover::after, 
body:not(.no-theme).theme-romantic button:hover::after {
    content: "💕";
    position: absolute;
    top: -5px;
    right: 20%;
    font-size: 1.2rem;
    pointer-events: none;
    animation: multiHeart2 0.8s ease-out forwards;
}

@keyframes multiHeart1 {
    0% { transform: translate(0, 0) scale(0.4); opacity: 1; }
    100% { transform: translate(-25px, -30px) scale(1.3); opacity: 0; }
}

@keyframes multiHeart2 {
    0% { transform: translate(0, 0) scale(0.4); opacity: 1; }
    100% { transform: translate(25px, -30px) scale(1.3); opacity: 0; }
}

body:not(.no-theme) .romantic-corner-ribbon {
    position: fixed;
    top: 0;
    left: 0;
    background: url('ribbon.png') no-repeat center center;
    background-size: 100% 100%;
    color: #ffffff !important;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    width: 380px;
    height: 110px;
    padding: 0 40px;
    font-family: 'Georgia', serif;
    font-size: 1.1rem;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    text-decoration: none;
    z-index: 99999;
    transform: translate(-55px, 25px) rotate(-42deg);
    transform-origin: center center;
    pointer-events: none;
    transition: none !important;
    animation: none !important;
    will-change: auto;
}


/* ==========================================
   5. UKLANJANJE BELE KUTIJE SAMO ZA MANGA SEKCIJU KARTICA
   ========================================== */

section.popular-books.daily-theme-section {
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
}


/* ==========================================
   6. DARK MODE SPECIJALNA PRAVILA
   ========================================== */

body.dark.theme-manga h2,
body.dark.theme-manga .daily-theme-title {
    color: #ffffff !important;
    text-shadow: none !important;
}

body.dark.theme-manga .stick-line {
    background: #ffffff !important;
    opacity: 0.6;
}