@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Josefin+Sans:ital,wght@0,100..700;1,100..700&display=swap');

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    width: 100%;
    height: 100%;
    overflow-x: hidden;
}

body {
    margin: 0;
    background: linear-gradient(135deg, #1c122b 0%, #2d1b4e 50%, #1a0f2e 100%);
    color: #eee;
    font-family: 'Poppins', sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ==================== SCROLLBAR ====================*/
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: #1a1a1a;
    border-radius: 6px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #6a0dad, #9b30ff);
    border-radius: 6px;
    border: 3px solid #1a1a1a;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #9b30ff, #d4a5ff);
}

/* ==================== HERO SECTION - SLIKE KAO BACKGROUND ====================*/
.hero-section {
    position: relative;
    width: 100%;
    height: auto;
    min-height: 600px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
}

/* Striped background - slike kao pozadina */
.anime-collage {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex; 
    flex-wrap: nowrap; 
    width: 100%;
    height: 100%;
    overflow: hidden; 
}

.collage-block {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    display: flex;
    align-items: stretch;
    justify-content: stretch;
}

.collage-block img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    filter: brightness(40%) saturate(0.8);
    transition: all 0.4s ease;
}

.collage-block:hover img {
    filter: brightness(60%) saturate(1);
    transform: scale(1.05);
}

/* Temno pre nego što dođe do slike */
.anime-collage::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.5) 50%, rgba(0,0,0,0.7) 100%);
    z-index: 1;
    pointer-events: none;
}

/* ==================== OVERLAY - SEARCH I DUGME ====================*/
.overlay {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 25px;
}

.overlay .logo {
    width: auto; 
    max-width: 280px; 
    height: auto;
    margin-bottom: 40px;
    image-rendering: -webkit-optimize-contrast; 
    image-rendering: crisp-edges; 
    image-rendering: high-quality; 
    object-fit: contain;
    filter: drop-shadow(0 0 25px rgba(155, 48, 255, 0.6));
    animation: float 3s ease-in-out infinite;
    z-index: 15;
    transform: translateZ(0); 
    backface-visibility: hidden;
    -webkit-transform: translateZ(0);
    -webkit-font-smoothing: antialiased;
}


@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-12px); }
}

.center-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 25px;
    width: 100%;
    max-width: 500px;
    z-index: 15;
    position: relative;
}


/* ==================== SEARCH BAR - IZOSTAVLJEN IZNAD ====================*/
.nav-search {
    width: 100%;
    max-width: 420px;
    position: relative;
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.8);
    border-radius: 25px;
    padding: 12px 20px;
    border: 2px solid rgba(155, 48, 255, 0.4);
    transition: all 0.3s ease;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 0 20px rgba(155, 48, 255, 0.15);
    backdrop-filter: blur(10px);
}

.nav-search:focus-within {
    border-color: #9b30ff;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6), 0 0 30px rgba(155, 48, 255, 0.4);
    background: rgba(0, 0, 0, 0.95);
}

.nav-search input {
    background: transparent;
    outline: none;
    border: none;
    color: white;
    padding: 8px 10px;
    flex: 1;
    font-size: 1rem;
    font-family: 'Poppins', sans-serif;
}

.nav-search input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

/* Search rezultati */
#search-results {
    position: fixed;
    top: calc(50% - 38px); 
    left: 50%;
    transform: translateX(-50%);
    width: min(90%, 420px);
    background: rgba(26, 26, 26, 0.97);
    border-radius: 15px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6), 0 0 25px rgba(155, 48, 255, 0.25);
    max-height: 400px;
    overflow-y: auto;
    border: none;
    z-index: 9999999 !important; /* iznad svega, uključujući overlay */
    pointer-events: auto;
}


.search-item {
    display: flex;
    align-items: center;
    padding: 12px;
    cursor: pointer;
    transition: all 0.2s;
    border-bottom: 1px solid rgba(155, 48, 255, 0.1);
}

.search-item:last-child {
    border-bottom: none;
}

.search-item:hover {
    background: rgba(155, 48, 255, 0.15);
    padding-left: 18px;
}

.search-thumbnail {
    width: 45px;
    height: 65px;
    margin-right: 12px;
    border-radius: 6px;
    object-fit: cover;
    border: 1px solid rgba(155, 48, 255, 0.3);
}

.search-info {
    flex: 1;
}

.search-title {
    font-size: 14px;
    color: #e0e0e0;
    line-height: 1.3;
}


/* ==================== GLEDAJ DUGME ====================*/
.watch-button {
    font-family: 'Josefin Sans', sans-serif;
    font-weight: 700;
    font-size: 1.08rem;
    background: linear-gradient(135deg, #6a0dad 0%, #9b30ff 100%);
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: 30px;
    padding: 14px 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 6px 20px rgba(106, 13, 173, 0.5), inset 0 0 15px rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
    text-decoration: none;
    display: inline-flex;
    min-width: 200px;
}

.watch-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
    transition: left 0.6s;
}

.watch-button:hover::before {
    left: 100%;
}

.watch-button:hover {
    transform: translateY(-4px) scale(1.06);
    box-shadow: 0 10px 30px rgba(155, 48, 255, 0.7), inset 0 0 20px rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.7);
}

.watch-button:active {
    transform: translateY(-1px) scale(1.02);
}
/* === GLEDAJ DUGME UVEK VIDLJIVO I CENTRIRANO === */
.center-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center; /* uvek centrirano po vertikali */
    text-align: center;
    gap: 25px;
    width: 100%;
    max-width: 500px;
    z-index: 15;
    position: relative;
    flex-shrink: 0;
}

.hero-section {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
    min-height: 600px;
    padding: 20px;
}

.watch-button {
    flex-shrink: 0;
    max-width: 90%;
    min-width: 160px;
    width: fit-content;
    margin: 0 auto;
    text-align: center;
}

/* ==================== DESCRIPTION SEKCIJA ====================*/
.description {
    margin: 40px auto;
    padding: 50px clamp(20px, 5vw, 80px);
    font-size: clamp(0.95rem, 2vw, 1.05rem);
    line-height: 1.8;
    text-align: justify;
    background: linear-gradient(135deg, rgba(43, 19, 64, 0.8), rgba(30, 14, 47, 0.9));
    border-radius: 16px;
    backdrop-filter: blur(5px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), inset 0 0 20px rgba(155, 48, 255, 0.08);
    border: 1px solid rgba(155, 48, 255, 0.25);
    color: #e8e8e8;
    max-width: 1200px;
    width: 90%;
}

.description h2 {
    font-size: clamp(1.6rem, 4vw, 2.2rem);
    color: #d4a5ff;
    font-family: 'Josefin Sans', sans-serif;
    margin-bottom: 20px;
    text-align: center;
    text-shadow: 0 0 20px rgba(155, 48, 255, 0.3);
    animation: glow 3s ease-in-out infinite;
}

@keyframes glow {
    0%, 100% { text-shadow: 0 0 20px rgba(155, 48, 255, 0.3); }
    50% { text-shadow: 0 0 35px rgba(212, 165, 255, 0.5); }
}

.description h3 {
    font-size: clamp(1.2rem, 3vw, 1.5rem);
    color: #9b30ff;
    margin-top: 35px;
    margin-bottom: 15px;
    font-family: 'Josefin Sans', sans-serif;
    position: relative;
    padding-left: 15px;
}

.description h3::before {
    content: '✨';
    position: absolute;
    left: 0;
    animation: twinkle 1.5s ease-in-out infinite;
}

@keyframes twinkle {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.description em {
    display: block;
    font-style: italic;
    color: #00ffff;
    font-size: 0.95rem;
    margin-bottom: 15px;
    text-align: center;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.3);
}

.description ul {
    list-style: none;
    padding-left: 0;
    margin-top: 15px;
}

.description ul li {
    margin-bottom: 14px;
    padding-left: 30px;
    position: relative;
    font-weight: 500;
    transition: all 0.3s ease;
}

.description ul li:hover {
    padding-left: 40px;
    color: #d4a5ff;
}

.description ul li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: #9b30ff;
    font-size: 1.2rem;
}

.description hr {
    border: none;
    border-top: 2px solid;
    border-image: linear-gradient(90deg, transparent, rgba(155, 48, 255, 0.5), transparent) 1;
    margin: 30px 0;
}

.description strong {
    color: #ffd700;
    font-weight: 600;
}

.description a {
    color: #9b30ff;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
}

.description a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #9b30ff, #d4a5ff);
    transition: width 0.3s ease;
}

.description a:hover::after {
    width: 100%;
}

/* ==================== FORME I MODAL ====================*/
#partnerForm {
    display: none;
    justify-content: center;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
}

.form-backdrop {
    position: absolute;
    width: 100%;
    height: 100%;
    background-color: rgba(30, 14, 47, 0.95);
    backdrop-filter: blur(5px);
}

.form-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, #2b1340 0%, #3d1f5c 100%);
    color: #fff;
    max-width: 500px;
    width: 90%;
    padding: clamp(20px, 5vw, 30px);
    border-radius: 16px;
    z-index: 10000;
    animation: slideDown 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 0 30px rgba(155, 48, 255, 0.3), inset 0 0 20px rgba(155, 48, 255, 0.1);
    border: 1px solid rgba(155, 48, 255, 0.4);
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translate(-50%, -60%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

#partnerForm input,
#partnerForm select,
#partnerForm textarea {
    width: 100%;
    margin-bottom: 1rem;
    padding: 0.7rem;
    background-color: rgba(75, 43, 99, 0.6);
    border: 1px solid #6f3aa2;
    color: #fff;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
}

#partnerForm input:focus,
#partnerForm select:focus,
#partnerForm textarea:focus {
    background-color: rgba(75, 43, 99, 0.9);
    border-color: #9b30ff;
    box-shadow: 0 0 15px rgba(155, 48, 255, 0.3);
    outline: none;
}

#partnerForm input::placeholder,
#partnerForm textarea::placeholder {
    color: #c5a8e3;
}

#partnerForm button[type="submit"] {
    width: 100%;
    background: linear-gradient(135deg, #9b30ff, #d4a5ff);
    color: #fff;
    padding: 0.8rem;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(155, 48, 255, 0.3);
}

#partnerForm button[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(155, 48, 255, 0.5);
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 1.8rem;
    color: #d4a5ff;
    cursor: pointer;
    transition: all 0.3s ease;
}

.close-btn:hover {
    color: #fff;
    transform: rotate(90deg);
}

/* ==================== TOAST NOTIFIKACIJA ====================*/
#toastSuccess {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: linear-gradient(135deg, rgba(34, 139, 34, 0.95), rgba(0, 100, 0, 0.95));
    color: white;
    padding: 15px 20px;
    border-radius: 10px;
    font-size: clamp(12px, 2vw, 14px);
    text-align: left;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4), 0 0 15px rgba(34, 139, 34, 0.5);
    width: 90%;
    max-width: 280px;
    z-index: 99999;
    border: 1px solid rgba(100, 255, 100, 0.3);
    display: none;
    animation: slideInRight 0.4s ease-out;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(400px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideOutRight {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(400px);
    }
}

/* ==================== FOOTER ====================*/
.footer-bottom {
    margin-top: 10px; 
    border-top: 2px solid rgba(155, 48, 255, 0.2);
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.85), rgba(20, 10, 30, 0.95));
    padding: clamp(8px, 1vw, 12px); 
    text-align: center;
    font-size: clamp(12px, 1.4vw, 13px);
    color: #999;
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.4);
}

.footer-section {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 2px; 
    margin-bottom: 2px; 
}

.footer-section img {
    width: clamp(130px, 18vw, 180px);
    height: auto;
    filter: drop-shadow(0 0 15px rgba(155, 48, 255, 0.4));
    transition: all 0.3s ease;
}

.footer-section img:hover {
    filter: drop-shadow(0 0 25px rgba(155, 48, 255, 0.6));
    transform: scale(1.05);
}

.footer-socials {
    display: flex;
    gap: 15px; 
    justify-content: center;
    border-left: 1px solid rgba(155, 48, 255, 0.15);
    padding-left: 15px; 
}

.footer-socials a {
    font-size: 1.5rem;
    color: #aaa;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(155, 48, 255, 0.1);
}

.footer-socials a:hover {
    color: #fff;
    background: rgba(155, 48, 255, 0.3);
    transform: translateY(-2px) scale(1.1);
    box-shadow: 0 4px 15px rgba(155, 48, 255, 0.3);
}

.footer-bottom a {
    color: #aaa;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
}

.footer-bottom a:hover {
    color: #9b30ff;
    text-decoration: underline;
}

.footer-section p {
    font-size: clamp(12px, 1.4vw, 13px);
    color: #888;
    margin: 1px 0; 
    width: 100%;
}


/* ==================== RESPONSIVE DESIGN ====================*/

@media (max-width: 1024px) {
    .hero-section {
        min-height: 500px;
        padding: 20px;
    }

    .anime-collage {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    }

    .overlay {
        padding: 50px 20px;
    }

    .overlay .logo {
    width: auto;
    max-width: 220px;
    height: auto;
}


    .center-box {
        gap: 20px;
    }

    .nav-search {
        max-width: 400px;
    }

    .description {
        margin: 30px auto;
        padding: 40px clamp(20px, 4vw, 60px);
        width: 95%;
    }

    .footer-section {
        gap: 20px;
    }

    .footer-socials {
        gap: 20px;
    }

    .footer-socials a {
        width: 45px;
        height: 45px;
        font-size: 1.8rem;
    }
}

@media (max-width: 767px) {
    .hero-section {
        min-height: 450px;
        padding: 15px;
    }

    /* Mobilan - Samo jedan red sa slikama koliko stane */
    .anime-collage {
        grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
        grid-auto-rows: auto;
        height: auto;
        min-height: 300px;
    }

    .overlay {
        padding: 40px 15px;
    }

    .overlay .logo {
    width: auto;
    max-width: 220px;
    height: auto;
}


    .center-box {
        gap: 15px;
    }

    .nav-search {
        max-width: 100%;
        max-width: 380px;
    }

    .watch-button {
        font-size: 0.95rem;
        padding: 12px 40px;
        min-width: 180px;
    }

    .description {
        margin: 25px auto;
        padding: 30px clamp(15px, 3vw, 40px);
        width: 97%;
        font-size: 0.95rem;
    }

    .footer-section {
        flex-direction: column;
        gap: 15px;
        margin-bottom: 20px;
    }

    .footer-section img {
        width: clamp(70px, 15vw, 100px);
    }

    .footer-socials {
        border: none;
        padding: 0;
        gap: 12px;
    }

    .footer-socials a {
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
    }
}

@media (max-width: 575px) {
    body {
        font-size: 14px;
    }

    .hero-section {
      min-height: 420px; /* malo više prostora za dugme i logo */
      padding: 15px;
  }

    /* Mobilni telefon - Jedan red sa slikama koliko stane */
    .anime-collage {
        grid-template-columns: repeat(auto-fit, minmax(75px, 1fr));
        grid-auto-rows: auto;
        min-height: 280px;
    }

    .overlay {
        padding: 35px 12px;
    }

    .overlay .logo {
    width: auto;
    max-width: 220px;
    height: auto;
}


    .center-box {
      gap: 15px;
      justify-content: center;
  }

    .nav-search {
        max-width: 100%;
        padding: 10px 15px;
    }

    .nav-search input {
        font-size: 0.9rem;
        padding: 6px 8px;
    }

    #search-results {
        max-height: 300px;
        font-size: 0.85rem;
    }

    .watch-button {
      font-size: 0.9rem;
      padding: 10px 30px;
      min-width: 150px;
      margin-top: 10px;
  }

    .description {
        margin: 20px auto;
        padding: 25px clamp(12px, 3vw, 30px);
        width: 98%;
        font-size: 0.9rem;
        text-align: left;
    }

    .description h2 {
        font-size: 1.4rem;
        margin-bottom: 12px;
    }

    .description h3 {
        font-size: 1.05rem;
        margin-top: 20px;
    }

    .description ul li {
        margin-bottom: 8px;
        padding-left: 25px;
    }

    .form-container {
        width: 95%;
        padding: 20px;
    }

    .footer-bottom {
        padding: 12px 10px;
    }

    .footer-section {
        gap: 8px;
        margin-bottom: 8px;
    }

    .footer-section img {
        width: clamp(60px, 12vw, 90px);
    }

    .footer-section p {
        margin: 2px 0;
    }

    .footer-socials a {
        width: 38px;
        height: 38px;
        font-size: 1.3rem;
    }
}

@media (max-width: 320px) {
    .hero-section {
        min-height: 350px;
    }

    /* Ultra mali ekran - Jedan red sa slikama */
    .anime-collage {
        grid-template-columns: repeat(auto-fit, minmax(70px, 1fr));
        grid-auto-rows: auto;
        min-height: 260px;
    }

    .overlay .logo {
    width: auto;
    max-width: 180px;
    height: auto;
}


    .watch-button {
      font-size: 0.9rem;
      padding: 10px 30px;
      min-width: 150px;
      margin-top: 10px;
  }

    .footer-bottom {
        padding: 15px 10px;
    }

    .footer-section img {
        width: 60px;
    }
}

@media (max-height: 600px) and (orientation: landscape) {
    .hero-section {
        min-height: 320px;
        padding: 10px;
    }

    .anime-collage {
        grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    }

    .overlay {
        padding: 20px;
    }

    .overlay .logo {
    width: auto;
    max-width: 180px;
    height: auto;
}


    .center-box {
        gap: 10px;
    }

    .watch-button {
        padding: 10px 35px;
    }
}

@media (hover: none) and (pointer: coarse) {
    .collage-block img {
        transition: all 0.2s ease;
    }

    .description ul li:hover {
        padding-left: 30px;
    }
}

/* ==================== RESPONSIVE ANIME COLLAGE ==================== */

/* Desktop 1440px+ — prikaži sve slike */
@media (min-width: 1440px) {
  .collage-block { flex: 0 0 calc(100% / 14); } /* svih 14 slika */
}

/* Laptop ~1200px — prikaži 10 slika */
@media (max-width: 1439px) and (min-width: 1024px) {
  .collage-block { flex: 0 0 calc(100% / 10); }
}

/* Tablet horizontalni ~900px — prikaži 8 slika */
@media (max-width: 1023px) and (min-width: 768px) {
  .collage-block { flex: 0 0 calc(100% / 8); }
}

/* Tablet vertikalni / veći telefoni ~600px — prikaži 6 slika */
@media (max-width: 767px) and (min-width: 480px) {
  .collage-block { flex: 0 0 calc(100% / 6); }
}

/* Manji telefoni — prikaži 4 slike */
@media (max-width: 479px) and (min-width: 360px) {
  .collage-block { flex: 0 0 calc(100% / 4); }
}

/* Veoma mali ekrani — prikaži 2 slike */
@media (max-width: 359px) {
  .collage-block { flex: 0 0 calc(100% / 2); }
}
