@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. OSNOVNI RESET I BAZNI STILOVI
   ========================================== */
* {
    box-sizing: border-box;
}

body {
    font-family: Verdana, sans-serif;
    font-size: 14px;
    background-color: #f8f6f1;
    color: #333333;
    margin: 0;
    padding: 0;
    line-height: 1.5;
}

h1 {
    color: #1e293b;
    text-align: center;
    font-size: 42px;
    margin: 20px;
    letter-spacing: 1px;
}

a {
    color: #1e293b;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #c59d5f;
}

/* Naslovi po sekcijama */
#oMeni { color: coral; margin: 5px; padding: 5px; }
#Hobiji { color: purple; margin: 5px; padding: 5px; }
#OmiljeniSajtovi { color: blueviolet; margin: 5px; padding: 5px; }
#Kontakt { color: gold; margin: 5px; padding: 5px; }

/* DUGMAD (Generalno) */
button {
    background-color: #1e293b;
    color: #ffffff;
    border: none;
    padding: 10px 18px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 15px;
}

button:hover {
    background-color: #c59d5f;
    transform: translateY(-2px);
}

.backbtn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background-color: #1e293b;
    color: #ffffff;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.backbtn:hover {
    background-color: #334155;
    transform: translateX(-3px);
}

.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. STICKY NAVIGACIJA I DROPDOWN MENI
   ========================================== */
nav, .navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px 20px;
    background-color: #2c221e;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

nav ul.nav-left {
    list-style-type: none;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    margin: 0;
    padding: 0;
}

nav ul.nav-left > li > a {
    color: #ffffff;
    text-decoration: none;
    font-size: 16px;
}

nav ul.nav-left > li > a:hover {
    color: #c59d5f;
}

.dropdown {
    position: relative;
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #333333;
    min-width: 200px;
    padding: 0;
    margin: 0;
    z-index: 999;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    list-style: none;
}

.dropdown:hover > .dropdown-content {
    display: block;
}

.genre-item {
    position: relative;
    list-style: none;
}

.genre-item > a {
    display: block;
    padding: 12px 15px;
    color: #ffffff;
    text-decoration: none;
    white-space: nowrap;
}

.genre-item:hover {
    background-color: #555555;
}

.submenu {
    display: none;
    position: absolute;
    top: 0;
    left: 100%;
    background-color: #333333;
    min-width: 200px;
    padding: 0;
    margin: 0;
    list-style: none;
}

.genre-item:hover > .submenu {
    display: block;
}

.submenu li {
    list-style: none;
}

.submenu a {
    display: block;
    padding: 12px 15px;
    color: #ffffff;
    text-decoration: none;
    white-space: nowrap;
}

.submenu a:hover {
    background-color: #555555;
}

.top-header-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    margin-top: 15px;
    margin-right: 20px;
}

.user-nav-box .user-link {
    color: #3b2d25;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.95em;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.user-nav-box .user-link:hover {
    color: #8c6d58;
}

.auth-link {
    color: #3b2d25;
    text-decoration: none;
    font-weight: 500;
}

.nav-divider {
    color: #ccc;
    opacity: 0.5;
    margin: 0 4px;
}

/* ==========================================
   3. PROFIL I DASHBOARD
   ========================================== */
.profile-container {
    max-width: 1000px;
    margin: 40px auto;
    padding: 0 20px;
    box-sizing: border-box;
}

.user-link {
    color: #1e293b;
    text-decoration: none;
    font-weight: bold;
    font-size: 17px;
}

.user-link:hover {
    color: #c59d5f;
}

.profile-card {
    width: 400px;
    margin: 50px auto;
    background-color: #ffffff;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    text-align: center;
}

.profile-card p {
    font-size: 18px;
    margin: 20px;
}

.streak-badge {
    background-color: #fff3e0;
    color: #e65100;
    border: 1px solid #ffe0b2;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.85em;
    font-weight: bold;
    display: inline-block;
    margin-left: 6px;
}

.user-profile-banner {
    background: #ffffff;
    border: 1px solid #e2d9cd;
    border-radius: 16px;
    padding: 24px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
    margin-bottom: 30px;
    width: 100%;
    box-sizing: border-box;
}

.user-info-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.avatar-circle {
    width: 65px;
    height: 65px;
    background: #f3ede6;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2em;
}

.user-text-details h2 {
    margin: 0 0 4px 0;
    color: #2c221e;
    font-size: 1.6em;
}

.user-email, .user-joined {
    display: block;
    font-size: 0.85em;
    color: #776e65;
    margin-top: 2px;
}

.streak-pill {
    background: #fff4e5;
    border: 1px solid #ffe0b2;
    color: #d85100;
    padding: 8px 18px;
    border-radius: 30px;
    font-size: 0.95em;
}

.profile-dashboard-grid {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 25px;
    align-items: start;
}

.dashboard-section {
    background: #ffffff;
    border: 1px solid #e2d9cd;
    border-radius: 16px;
    padding: 22px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.02);
}

.dashboard-section h3 {
    margin-top: 0;
    margin-bottom: 18px;
    color: #3b2e28;
    font-size: 1.1em;
    border-bottom: 1px solid #f0e8de;
    padding-bottom: 10px;
}

.habits-cards-wrapper {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.habit-card {
    background: #faf6f0;
    border: 1px solid #eee5da;
    border-radius: 12px;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.habit-icon {
    font-size: 1.8em;
}

.habit-number {
    display: block;
    font-size: 1.3em;
    font-weight: bold;
    color: #2c221e;
}

.habit-label {
    font-size: 0.78em;
    color: #887e75;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.favorites-books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 18px;
}

.fav-card {
    border: 1px solid #eee2d5;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease;
}

.fav-card:hover {
    transform: translateY(-4px);
}

.fav-cover {
    height: 190px;
    background: #f5f0eb;
    overflow: hidden;
}

.fav-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.fav-info {
    padding: 12px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.fav-info h4 {
    margin: 0 0 4px 0;
    font-size: 0.9em;
    color: #2c221e;
}

.fav-info p {
    margin: 0 0 12px 0;
    font-size: 0.78em;
    color: #887e75;
    flex-grow: 1;
}

.fav-btn {
    text-align: center;
    background: #8c6d58;
    color: #fff;
    text-decoration: none;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 0.8em;
    font-weight: bold;
}

.empty-msg {
    color: #998e85;
    font-size: 0.9em;
    font-style: italic;
}

/* ==========================================
   4. MANGA MONDAY & STICK PUPPETS
   ========================================== */
.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: flex !important;
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100vw !important;
    pointer-events: none !important;
    z-index: 99999 !important;
    justify-content: space-between !important;
    align-items: flex-end !important;
    padding: 0 30px !important;
    box-sizing: border-box !important;
    margin: 0 !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;
}

.manga-stick {
    position: relative !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    pointer-events: auto !important;
}

.manga-character-link img,
.manga-character img {
    width: auto !important;
    object-fit: contain;
    border: none !important;
    background: transparent !important;
    background-color: transparent !important;
    display: block;
    mix-blend-mode: darken !important; 
    filter: drop-shadow(2px 3px 4px rgba(0,0,0,0.15));
    transition: transform 0.2s ease;
}

.manga-character-link img:hover {
    transform: scale(1.08);
}

.stick-left-1 .manga-character-link img {
    height: 190px !important;
    max-width: 220px !important;
}

.stick-left-2 { 
    transform: translateX(50px) !important; 
}
.stick-left-2 img {
    height: 75px !important;
}

.stick-right-1 { 
    transform: translateX(-50px) !important; 
}
.stick-right-1 img {
    height: 85px !important;
}

.stick-right-2 .manga-character-link img {
    height: 200px !important;
    max-width: 230px !important;
}

.stick-line {
    width: 2px;
    height: 35px !important;
    background: #3d281a; 
    border-radius: 2px;
    margin-top: -2px;
    margin-bottom: 0 !important;
    opacity: 0.9;
}

/* ==========================================
   5. ROMANTIC FRIDAY & RIBBON
   ========================================== */
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;
}

section.popular-books.daily-theme-section {
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

.daily-theme-section {
    margin-bottom: 40px;
    padding: 20px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}

body.theme-manga .daily-theme-section {
    border: 3px solid #000;
    box-shadow: 6px 6px 0px #000;
    background: #fff;
}

body.theme-manga #daily-theme-title {
    font-family: 'Bangers', 'Comic Sans MS', cursive, sans-serif !important;
    letter-spacing: 1.5px;
    color: #ff4757 !important;
    text-transform: uppercase;
}

/* ==========================================
   6. THRILLER THURSDAY (DETEKTIVSKA TBL & ŠEŠIR)
   ========================================== */
body.theme-thriller:not(.no-theme) .detective-corner-widget {
    display: block !important;
}

.detective-corner-widget {
    display: none;
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 380px;
    height: 280px;
    background-color: #b0855b;
    border: 8px solid #3d2314;
    box-shadow: 5px 8px 20px rgba(0,0,0,0.6);
    padding: 12px;
    z-index: 9998;
    transform: rotate(-2deg);
    transition: transform 0.3s ease;
    pointer-events: auto;
    font-family: 'Courier New', monospace;
}

.detective-corner-widget:hover {
    transform: rotate(0deg) scale(1.02);
}

.detective-corner-widget::before {
    content: "";
    position: absolute;
    top: -10px;
    left: 50px;
    width: 3px;
    height: 280px;
    background: #cc241d;
    transform: rotate(25deg);
    pointer-events: none;
    box-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    z-index: 2;
}

.corner-header {
    font-size: 0.75rem;
    background: #111;
    color: #ff3333;
    padding: 6px;
    font-weight: bold;
    text-align: center;
    margin-bottom: 10px;
    border: 2px dashed #ff3333;
    letter-spacing: 1px;
    position: relative;
    z-index: 3;
}

.corner-content-grid {
    display: flex;
    gap: 15px;
    align-items: center;
    position: relative;
    z-index: 3;
}

.corner-polaroid {
    background: #fff;
    padding: 6px 6px 20px 6px;
    width: 130px;
    box-shadow: 3px 4px 8px rgba(0,0,0,0.4);
    transform: rotate(-4deg);
}

.corner-polaroid img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    display: block;
}

.corner-note-box {
    background: #fdfbf7;
    padding: 10px;
    border: 1px solid #d4c5b9;
    font-size: 0.75rem;
    color: #222;
    line-height: 1.3;
    box-shadow: 2px 2px 5px rgba(0,0,0,0.2);
    transform: rotate(2deg);
    flex-grow: 1;
    cursor: pointer;
    transition: background 0.2s ease;
}

.corner-note-box:hover {
    background: #fffdf9;
    outline: 1px dashed #cc241d;
}

.evidence-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 99999;
    justify-content: center;
    align-items: center;
}

.crumpled-paper-popup {
    background: #f4eee1 url('https://images.unsplash.com/photo-1586075010923-2dd4570fb338?auto=format&fit=crop&w=600&q=80') center/cover;
    background-blend-mode: multiply;
    width: 450px;
    padding: 40px;
    border: 1px solid #d1c2a5;
    box-shadow: 0 15px 35px rgba(0,0,0,0.8), inset 0 0 30px rgba(0,0,0,0.1);
    transform: rotate(-1deg);
    position: relative;
    font-family: 'Courier New', monospace;
    color: #1a1a1a;
}

.crumpled-paper-popup h3 {
    text-align: center;
    color: #cc241d;
    margin-bottom: 15px;
    border-bottom: 2px dashed #cc241d;
    padding-bottom: 8px;
    letter-spacing: 1px;
}

.crumpled-paper-popup p {
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 20px;
}

.close-paper-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    background: #111;
    color: #fff;
    border: none;
    width: 30px;
    height: 30px;
    font-weight: bold;
    cursor: pointer;
    border-radius: 50%;
}

body.theme-thriller:not(.no-theme) .detective-hat-widget {
    display: block !important;
}



/* ==========================================
   7. YUGIOH ARENA & KNJIGE (PAGEFLIP)
   ========================================== */
.book-section {
    max-width: 950px;
    margin: 40px auto;
    text-align: center;
    padding: 0 15px;
}

.book-section h2 {
    font-family: 'Georgia', serif;
    color: #333333;
    margin-bottom: 15px;
}

.pageflip-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px 0;
    margin: 10px auto;
    width: 100%;
    max-width: 800px;
}

#flip-book {
    width: 760px;
    height: 520px;
    position: relative;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.25);
    background-color: #fdfbf7;
    margin: 0 auto;
}

#flip-book .page {
    width: 380px;
    height: 520px;
    padding: 30px 25px;
    background-color: #fdfbf7 !important;
    color: #2c2c2c;
    font-family: 'Georgia', serif;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border: 1px solid #eae5d9 !important;
    overflow: hidden !important;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15) !important;
}

#flip-book:not(.stpageflip) .page:not(:first-child) {
    display: none;
}

.page-header {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #888;
    border-bottom: 1px solid #e0dacf;
    padding-bottom: 5px;
    margin-bottom: 12px;
}

.page-content {
    flex-grow: 1;
    font-size: 0.95rem;
    line-height: 1.6;
    text-align: justify;
    word-break: normal;
    overflow-wrap: anywhere;
    hyphens: auto;
}

.author-subtitle {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 15px;
    font-style: italic;
    text-align: center;
}

.page-footer {
    text-align: center;
    font-size: 0.8rem;
    color: #888;
    border-top: 1px solid #e0dacf;
    padding-top: 8px;
    margin-top: 10px;
}

.book-controls {
    text-align: center;
    margin-top: 20px;
    margin-bottom: 25px;
}

.book-controls button {
    background: #1e293b;
    color: #ffffff;
    border: none;
    padding: 10px 22px;
    margin: 0 8px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.95rem;
    transition: background 0.2s ease;
}

.book-controls button:hover {
    background: #c59d5f;
}

.book-action-box {
    margin-top: 20px;
    text-align: center;
}

.timer-display {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-top: 15px;
}

.timer-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.coffee-animation {
    position: relative;
    display: inline-block;
    text-align: center;
}

.cup-emoji {
    font-size: 3em;
    line-height: 1;
    position: relative;
    z-index: 1;
}

.steam-container {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 2;
}

.steam {
    font-size: 1.2em;
    font-weight: bold;
    color: #a89280;
    opacity: 0;
    display: inline-block;
    animation: riseSteam 2s infinite linear;
}

.steam-1 { animation-delay: 0s; }
.steam-2 { animation-delay: 0.6s; }
.steam-3 { animation-delay: 1.2s; }

@keyframes riseSteam {
    0% { transform: translateY(0) scaleX(1); opacity: 0; }
    30% { opacity: 0.7; }
    80% { opacity: 0.3; }
    100% { transform: translateY(-20px) scaleX(1.5); opacity: 0; }
}

.word-of-the-day-card {
    background-color: #fdfbf7;
    border: 1px solid #e2d9cc;
    border-radius: 12px;
    padding: 25px;
    max-width: 450px;
    margin: 20px auto;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    font-family: 'Georgia', serif;
}

.wotd-badge {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #8c6d53;
    font-weight: bold;
    margin-bottom: 10px;
}

.wotd-title {
    font-size: 2rem;
    color: #2c221e;
    margin: 0 0 5px 0;
}

.wotd-meta {
    font-size: 0.9rem;
    color: #7a7067;
    margin-bottom: 15px;
}

.wotd-meaning {
    font-size: 1.05rem;
    line-height: 1.5;
    color: #3b322c;
    margin-bottom: 15px;
}

.wotd-example {
    font-style: italic;
    color: #63584e;
    border-left: 3px solid #8c6d53;
    margin: 0;
    padding-left: 12px;
    font-size: 0.95rem;
}

.audio-btn {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    margin-left: 8px;
    padding: 4px 8px;
    border-radius: 50%;
    transition: transform 0.2s ease, background-color 0.2s ease;
    vertical-align: middle;
}

.audio-btn:hover {
    transform: scale(1.15);
    background-color: #f0eae1;
}

.audio-btn:active {
    transform: scale(0.95);
}

.popular-books {
    width: 90%;
    margin: 60px auto;
}

.popular-books h2 {
    margin-bottom: 30px;
    text-align: center;
}

.popular-container {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.popular-card {
    width: 220px;
    text-align: center;
    border: 1px solid #dddddd;
    border-radius: 10px;
    padding: 15px;
    background-color: #ffffff;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.popular-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.popular-card img,
.book-image img,
.recommend-book img {
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

.popular-card img {
    width: 170px;
    height: 250px;
    object-fit: cover;
}

.popular-card h3 {
    font-size: 18px;
    margin: 15px 0 10px;
}

.popular-card p {
    color: #777777;
}

.books_table {
    margin: 30px auto;
    width: 80%;
}

.books_table th, 
.books_table td {
    text-align: center;
    vertical-align: middle;
}

.book-details,
.author-details {
    display: flex;
    gap: 40px;
    margin-top: 30px;
    align-items: flex-start;
}

.book-text,
.author-text {
    max-width: 600px;
    font-size: 18px;
    line-height: 1.6;
}

.recommendations {
    display: flex;
    gap: 25px;
    margin-top: 30px;
}

.recommend-book {
    text-align: center;
}

.recommend-book img {
    height: 180px;
    width: 120px;
    object-fit: cover;
}

.search_input,
input[name="search"] {
    width: 350px;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 15px;
}

.filter_select {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
}

.pretrazi_dugme {
    background-color: #2c7be5;
    color: #ffffff;
    border: none;
    padding: 10px 18px;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.pretrazi_dugme:hover {
    background-color: #1d5fbf;
}

.reset_button {
    display: inline-block;
    padding: 10px 18px;
    border: 1px solid #2c7be5;
    color: #2c7be5;
    border-radius: 6px;
    text-decoration: none;
}

.reset_button:hover {
    background-color: #2c7be5;
    color: #ffffff;
}

.favorite-btn {
    background-color: #c59d5f;
    color: #ffffff;
    padding: 12px 20px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 16px;
}

.favorite-btn:hover {
    background-color: #a67c3c;
}

.favorite-active,
.favorite-active:hover {
    background-color: #e11d48;
    cursor: default;
    transform: none;
}

/* YuGiOh Arena */
.yugioh-arena-container {
    background: #121216;
    border: 2px solid #3b3b4f;
    border-radius: 12px;
    padding: 20px;
    max-width: 600px;
    margin: 20px auto;
    font-family: 'Courier New', monospace;
    color: #f0f0f5;
    box-shadow: 0 8px 25px rgba(0,0,0,0.7);
}

.duel-header {
    text-align: center;
    margin-bottom: 20px;
}

.duel-header h2 {
    color: #ffd700;
    margin-bottom: 5px;
    font-size: 22px;
}

.duel-header p {
    font-size: 13px;
    color: #a0a0b0;
}

.battlefield {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.fighter-card {
    background: #1c1c24;
    border: 1px solid #2e2e3d;
    border-radius: 8px;
    padding: 15px;
    width: 42%;
    text-align: center;
}

.avatar-container {
    font-size: 45px;
    margin-bottom: 8px;
}

.fighter-card h3 {
    font-size: 15px;
    margin-bottom: 10px;
    color: #e0e0ff;
}

.hp-bar-container {
    background: #2a2a38;
    border-radius: 4px;
    height: 12px;
    overflow: hidden;
    margin-bottom: 5px;
    border: 1px solid #44445c;
}

.hp-bar {
    background: #4caf50;
    height: 100%;
    transition: width 0.3s ease;
}

.enemy-side .hp-bar {
    background: #f44336;
}

.fighter-card span {
    font-size: 12px;
    color: #a0a0b0;
}

.vs-badge {
    font-weight: bold;
    font-size: 18px;
    color: #ffd700;
}

.duel-log {
    background: #0a0a0e;
    border: 1px solid #2e2e3d;
    border-radius: 6px;
    padding: 12px;
    min-height: 50px;
    font-size: 13px;
    margin-bottom: 15px;
    color: #d0d0e0;
    line-height: 1.4;
}

.duel-controls {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.duel-status-controls {
    display: flex;
    justify-content: center;
}

.duel-btn {
    padding: 10px 15px;
    border: none;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    font-family: inherit;
    font-size: 13px;
    transition: opacity 0.2s, transform 0.1s;
}

.duel-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.attack-btn { background: #ff9800; color: #fff; }
.spell-btn { background: #2196f3; color: #fff; }
.trap-btn { background: #9c27b0; color: #fff; }
.restart-btn { background: #4caf50; color: #fff; width: 100%; }

.character-select-screen {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 20px 0;
}

.fighter-choice {
    background: #1c1c24;
    border: 2px solid #3b3b4f;
    border-radius: 10px;
    padding: 20px;
    width: 45%;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.fighter-choice:hover {
    border-color: #ffd700;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(255, 215, 0, 0.2);
}

.choice-emoji {
    font-size: 50px;
    display: block;
    margin-bottom: 10px;
}

.fighter-choice h3 {
    color: #ffd700;
    margin-bottom: 5px;
    font-size: 16px;
}

.fighter-choice p {
    font-size: 11px;
    color: #a0a0b0;
}

/* ==========================================
   8. ADMIN FORME & DARK MODE
   ========================================== */
.admin-container {
    display: flex;
    gap: 50px;
    align-items: flex-start;
}

.book-form {
    width: 450px;
}

.author-form {
    width: 400px;
}

form button {
    padding: 8px 14px;
    cursor: pointer;
}

.dark-mode-container {
    display: flex;
    justify-content: flex-end;
    padding: 10px 30px;
}

#darkModeBtn {
    padding: 10px 18px;
    border: none;
    border-radius: 8px;
    background-color: #333333;
    color: #ffffff;
    cursor: pointer;
    font-size: 15px;
    transition: background-color 0.3s ease;
}

#darkModeBtn:hover {
    background-color: #555555;
}

body.dark {
    background-color: #121212;
    color: #e0e0e0;
}

body.dark nav,
body.dark .navbar {
    background-color: #000000;
}

body.dark h1 { color: #90caf9; }
body.dark h2 { color: #eeeeee; }
body.dark a { color: #90caf9; }

body.dark #oMeni { color: #ffcc80; }
body.dark #Hobiji { color: #ce93d8; }
body.dark #OmiljeniSajtovi { color: #b39ddb; }
body.dark #Kontakt { color: #ffd54f; }

body.dark .popular-card,
body.dark .profile-card,
body.dark .dashboard-section,
body.dark .user-profile-banner {
    background-color: #1e1e1e;
    color: #ffffff;
    border-color: #333333;
}

body.dark .popular-card:hover {
    box-shadow: 0 10px 25px rgba(255, 255, 255, 0.1);
}

body.dark input,
body.dark select,
body.dark textarea {
    background-color: #222222;
    color: #ffffff;
    border: 1px solid #555555;
}

body.dark .user-link {
    color: #90caf9;
}

body.dark .user-link:hover {
    color: #00ff99;
}

body.dark #flip-book,
body.dark #flip-book .page,
body.dark .stf__wrapper,
body.dark .stf__item {
    background-color: #1a1a1a !important;
    color: #dcdcdc !important;
    border-color: #333333 !important;
}

body.dark .page *, 
body.dark #flip-book * {
    color: #dcdcdc;
}

body.dark #flip-book a,
body.dark .page a {
    color: #90caf9 !important;
}

body.dark .page-header,
body.dark .page-footer {
    border-color: #333333 !important;
    color: #aaaaaa !important;
}

body.dark .author-subtitle {
    color: #bbbbbb !important;
}

body.dark .word-of-the-day-card {
    background-color: #1e1e1e;
    border-color: #333333;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

body.dark .wotd-badge { color: #c59d5f; }
body.dark .wotd-title { color: #ffffff; }
body.dark .wotd-meta { color: #aaa; }
body.dark .wotd-meaning { color: #dddddd; }
body.dark .wotd-example {
    color: #bbbbbb;
    border-left-color: #c59d5f;
}

body.dark .audio-btn:hover {
    background-color: #333333;
}

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;
}

/* ==========================================
   9. RESPONSIVE
   ========================================== */
@media (max-width: 768px) {
    nav ul {
        flex-direction: column;
        gap: 15px;
    }

    .profile-dashboard-grid {
        grid-template-columns: 1fr;
    }

    .user-profile-banner {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .book-details,
    .author-details,
    .admin-container {
        flex-direction: column;
        gap: 20px;
    }

    .book-form,
    .author-form {
        width: 100%;
    }
}
/* ==========================================
   9. RANDOM BOOK
   ========================================== */
   .popular-books {
    text-align: center; /* Centrira naslov i inline elemente */
}

.random-book {
    display: flex;
    flex-direction: column;
    align-items: center; /* Centrira sliku i formu po sredini */
    justify-content: center;
}

.random-image {
    display: block;
    margin: 0 auto 20px auto; /* Osigurava da je slika savršeno centrirana sa razmakom ispod */
    max-width: 200px; /* Smanji slobodno vrednost ako želiš da manja slika upitnika bude (npr. 150px ili 180px) */
    height: auto;
}