/* Opći stilovi */
body {
    font-family: 'Abel', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
    text-align: center;
}

/* Header i navigacija */
header {
    background: linear-gradient(135deg, #CE8946, #D4AF37);
    color: white;
    padding: 15px 20px;
    position: relative;
}

.header-top {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

header h1 {
    margin: 0;
    font-size: 24px;
    text-align: center;
    width: 100%;
}

.menu-wrapper {
    margin-top: 10px;
    position: absolute;
    left: 0;
}

#menu-toggle {
    display: none;
}

.menu-btn {
    display: inline-block;
    width: fit-content;
    margin: 0 auto;
    font-size: 24px;
    cursor: pointer;
    color: white;
    background: rgba(245, 169, 110, 0.448);
    padding: 10px 15px;
    border-radius: 8px;
    transition: all 0.3s ease;
    user-select: none;
}

.menu-btn:hover {
    background: rgba(234, 157, 79, 0.444);
    transform: scale(1.05);
}

.menu-btn::before {
    content: "☰";
    font-size: 18px;
    transition: all 0.3s ease;
}

#menu-toggle:checked+.menu-btn::before {
    content: "✖";
}

nav {
    overflow: hidden;
    position: absolute;
    top: 60px;
    left: 0;
    width: 200px;
}

.nav-menu {
    max-height: 0;
    overflow: hidden;
    transition: transform 0.3s ease;
    background: white;
    padding: 0;
    list-style: none;
    margin: 0;
    opacity: 0;
    transform: translateY(-10px);
    border-radius: 0 10px 10px 0;
}

#menu-toggle:checked+.menu-btn+nav .nav-menu {
    max-height: 300px;
    opacity: 1;
    transform: translateY(0);
}

.nav-menu li {
    list-style: none;
    margin: 0 15px;
    border-bottom: 1px solid rgba(242, 151, 95, 0.24);
    max-width: auto;
}

.nav-menu a {
    text-decoration: none;
    color: black;
    font-weight: bold;
    display: block;
    padding: 12px;
    transition: all 0.3s ease;
}

.nav-menu a:hover {
    background: rgba(246, 160, 89, 0.529);
    padding-left: 20px;
}

.main-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    padding: 20px;
    flex-wrap: wrap;
}

.main-content table {
    border-collapse: collapse;
    width: 65%;
    min-width: 300px;
}

.table-wrapper {
    flex: 1 1 60%; 
    min-width: 300px;
    overflow-x: auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.1);
}

.table-wrapper table {
    border-collapse: collapse;
    width: 100%;
    min-width: 500px; 
}

.main-content th,
.main-content td {
    border: 1px solid #e0e0e0;
    padding: 12px 15px;
    text-align: left;
}

.main-content th {
    background: #CE8946;
    color: white;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 0.5px;
}

.main-content tbody tr {
    transition: all 0.3s ease;
}

.main-content tbody tr:hover {
    background-color: rgba(206, 137, 70, 0.1);
    box-shadow: inset 0 0 8px rgba(206, 137, 70, 0.2);
}

.main-content tbody tr:nth-child(even) {
    background-color: #f9f9f9;
}

aside {
    margin-top: 20px;
}

.img-cinema {
    width: 500px;
    height: 400px;
}

/* Aside sa slikama filmova */
.film-aside {
    flex: 1 1 35%; /* zauzima ~35% prostora */
    min-width: 200px;
}

.film-aside h3 {
    margin-top: 0;
    font-size: 18px;
    color: #2c3e50;
}

.film-aside figure {
    margin: 10px 0;
    text-align: center;
}

.film-aside img {    
    width: 100%;
    border-radius: 8px;
}

.film-aside img:hover {
    transform: scale(1.05);
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.2);
}

.film-aside figcaption {
    margin-top: 5px;
    font-size: 14px;
    color: #333;
}

input,
button {
    width: 80%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

button {
    background-color: #3498db;
    color: white;
    border: none;
    cursor: pointer;
    width: 50%;
}

button:hover {
    background-color: #2980b9;
}

/* Responzivnost */
@media (max-width: 768px) {

    /* Hamburger gumb */
    .menu-btn {
        display: inline-block;
        font-size: 20px;
        padding: 8px 15px;
        cursor: pointer;
        background: rgba(255, 255, 255, 0.1);
        border-radius: 8px;
        color: white;
        user-select: none;
    }

    .menu-btn::before {
        content: "☰";
        font-size: 24px;
    }

    #menu-toggle:checked+.menu-btn::before {
        content: "✖";
    }

    /* Meni po defaultu skriven */
    nav-menu {
        display: none;
        /* skriven po defaultu */
        flex-direction: column;
        background: white;
        position: absolute;
        top: 60px;
        left: 0;
        width: 200px;
        padding: 0;
        margin: 0;
        border-radius: 0 10px 10px 0;
        box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.2);
        z-index: 10;
    }

    #menu-toggle:checked+.menu-btn+nav .nav-menu {
        display: flex;
        /* prikaz kada je kliknut */
    }

    .nav-menu a {
        display: block;
        padding: 10px 15px;
        text-decoration: none;
        color: black;
        font-weight: bold;
    }

    .nav-menu a:hover {
        background: rgba(0, 0, 0, 0.05);
    }

    .main-content {
        flex-direction: column;
        align-items: stretch;
    }

    .main-content table,
    .film-aside {
        width: 100%;
    }


    .data-container {
        flex-direction: column;
        align-items: center;
    }

    .analysis-flex {
        flex-direction: column;
        align-items: center;
    }

    .nav-menu {
        flex-direction: column;
        text-align: center;
    }

    .form-flex input,
    .form-flex button {
        width: 100%;
    }
    .table-wrapper {
        width: 100%;
    }

    .film-aside {
        width: 100%;
        margin-top: 20px;
    }

}

/* Za male mobitele (najmanji prozori) */
@media (max-width: 700px) {
    .menu-btn {
        font-size: 18px;
        padding: 8px 12px;
    }

    .menu-btn::before {
        content: "☰";
        font-size: 18px;
    }

    #menu-toggle:checked+.menu-btn::before {
        content: "✖";
    }

    nav {
        position: absolute;
        top: 60px;
        left: 0;
        width: 200px;
    }

    .nav-menu {
        display: none;
        /* po defaultu */
        flex-direction: column;
        background: white;
        list-style: none;
        padding: 0;
        margin: 0;
        border-radius: 0 10px 10px 0;
        box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.2);
    }

    /* ovo je važno: selektor mora odgovarati HTML-u */
    #menu-toggle:checked~nav .nav-menu {
        display: flex;
    }

    .nav-menu a {
        padding: 10px;
        color: black;
        font-weight: bold;
        text-decoration: none;
    }

    .nav-menu a:hover {
        background: rgba(0, 0, 0, 0.05);
    }
}

footer {
    margin-top: 30px;
    padding: 10px;
    background: #e3caa5;
    color: white;
    position: fixed;
    bottom: 0;
    width: 100%;
}