﻿body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(45deg, #97f2f5, #ee81ca);
    min-height: 100vh;
    flex-direction: column;
    color: white;
    margin: 0;
}

input:focus{
    outline:none;
}

.ce {
    display:flex;
    justify-content:center;
    align-items:center;
}

.loginpanel {
    width: 30%;
    height: 300px;
    background-color: rgba(255,255,255,0.3);
    border-radius: 20px;
    position: relative;
    flex-direction:column;
}

.error{
    color: red;
}

#loginform{
    flex-direction:column;
    gap:20px;
    width:80%;
    height:80%;
}

#loginform > input{
    border:none;
    width:70%;
    height:40px;
    border-radius:10px;
    text-align:center;
}

#loginform > input[type=submit]{
    background-color:transparent;
    border: solid 2px white;
    color: deeppink;
    border-radius:20px;
}

.login-icon {
    top:-60px;
    left:-50px;
    position:absolute;
    width: 100px;
}

@media (max-width: 768px) {
    .loginpanel{
        width:80%;
    }

    #loginform {
        flex-direction: column;
        gap: 20px;
        width: 100%;
        height: 80%;
    }

    .login-icon{
        width:60px;
        top:-40px;
        left:-20px;
    }
}

.layout {
    display: grid;
    grid-template-columns: 70px 1fr 300px; /* sidebar + içerik */
    position: relative;
}

#sidebar {
    background-color: rgba(0,0,0, 0.3);
    color: #fff;
    width: 70px; /* collapsed width */
    transition: width 0.3s;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    z-index: 1;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
}

.content {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    position: relative;
    margin-left: 70px; /* sol sidebar genişliği */
    margin-right: 300px; /* sağ sidebar genişliği */
    width: calc(100vw - 70px - 300px);
    min-width: 1000px
}

footer {
    grid-column: 1 / -1; /* footer tüm sütunları kapsar */
    padding: 1rem;
    background-color: #f5f5f5;
}

#sidebar ul.menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

#sidebar ul.menu li{
    display: flex;
    align-items: center;
    padding: 15px;
    cursor: pointer;
    gap:5px;
}

#sidebar ul.menu li a{
    display: flex;
    align-items: center;
    cursor: pointer;
    gap: 5px;
    text-decoration:none;
    color:white;
}

#sidebar ul.menu li .icon {
    font-size: 1.5rem;
    width: 30px;
    text-align: center;
}

#sidebar ul.menu li .title {
    margin-left: 10px;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s;
}

/* Hover ile genişleme */
#sidebar.collapsed:hover {
    width: 200px; /* açık hali */
    background-color: rgba(0,0,0,.4)
}

#sidebar.collapsed:hover li .title {
    opacity: 1;
}

#sidebar.collapsed:hover li:hover {
    background-color: rgba(0,0,0,.3);
}

.activitybar {
    max-width:300px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    height: 100vh;
    padding-top:10px;
    position: fixed;
    top: 0;
    right: 0;
    z-index:98;
}

.profile{
    background-color: rgba(0,0,0,.2);
    width:250px;
    height:50px;
    border-radius:50px;
    display:flex;
    align-items:center;
    padding: 10px 10px 10px 10px;
    gap:10px;
}

.activitybar .status{
    display:flex;
    flex-direction:column;
    gap:10px;
}

.activitybar .avatar{
    margin-left:10px;
    height:80%;
}

.profile .details {
    display:flex;
    flex-direction:column;
}

.details .name{
    font-size:20px;
}

.details .napiyo {
    font-size: 10px;
}

.activitydot, .napiyo {
    transition: color 0.3s ease, opacity 0.3s ease;
}

.activity{
    display:flex;
    gap:3px;
    align-items:center;
}

.activitydot{
    font-size:8px;
}

.add-button{
    width:40px;
    height:40px;
    background-color: lawngreen;
    color:darkgreen;
    border-radius:40px;
    top:50px;
    right:50px;
    position:absolute;

    display:flex;
    justify-content:center;
    align-items:center;
    font-size:30px;
}

.add-button:hover {
    background-color: ButtonShadow;
    cursor: pointer;
}

.main-container{
    width: 90%;
    display:flex;
    justify-content:center;
    flex-direction:column;
    border-radius: 20px;
    gap:20px;
}

.single-movie {
    background-color: rgba(0,0,0,.2);
    border-radius:20px;
    min-height: 80px;
    width: 90%;
    display: flex;
    align-items: center;
    padding: 10px 20px;
    box-shadow: rgba(0,0,0,.1) 0 3px;
    position:relative;
}

.single-movie .movie-title {
    font-size: 20px;
    font-weight:bold;
    text-align:center;
}

.single-movie .movie-description {
    font-size:12px;
    flex-grow: 1;
    text-align:start;
    width:100%;
}

.single-movie .movie-watchedat{
    font-size:11px;
}

.movie-controls{
    display:flex;
    gap:5px;
    position:absolute;
    top:0px;
    right:10px;
}

.small-button {
    width: 30px;
    height: 30px;
    border-radius: 5px;
    top: 10px;
    right: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 10px;
}

.edit-button {
    background-color: #e2b917;
}

.delete-button {
    background-color: #fc5c5c;
}

.small-button-icon {
    width: 70%;
}

.generic-form{
    display:flex;
    flex-direction: column;
    align-items:center;
    gap:20px;
    width:60%;
}

.generic-input{
    width:80%;
    height: 30px;
    outline: none;
    border:none;
    border-radius:20px;
    padding:10px;
    text-align:center;
    background-color: rgba(255,255,255,.5)
}

.generic-button-tr {
    width: 30%;
    height: 40px;
    outline: none;
    border: solid 2px white;
    border-radius: 30px;
    padding: 10px;
    text-align: center;
    background-color: transparent;
    color:white;
}

.generic-button-tr:hover{
    background-color: rgba(0,0,0,.2)
}

.label-input {
    width: 90%;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100px;
    gap:5px;
}

.chat-toggle{
    display:none;
}

@media (max-width: 1200px) {
    /* Sidebar davranışı */
    #sidebar {
        width: 70px;
        overflow-y: auto;
        -ms-overflow-style: none;
        scrollbar-width: none;
    }
    #sidebar::-webkit-scrollbar {
        display: none;
    }

    #sidebar.collapsed:hover {
        width: 70px; /* hoverda genişleme yok */
    }
    #sidebar.expanded {
        width: 150px;
        background-color: rgba(0,0,0,.4);
    }
    #sidebar.expanded li .title {
        opacity: 0;
    }

    #sidebar ul.menu li .title {
        margin-left: 10px;
        white-space: nowrap;
        opacity: 0;
    }

    #sidebar.collapsed:hover li .title {
        opacity: 0;
    }

    /* İçerik alanı: sağdaki chat gizlendiğinde tam genişlik olsun */
    .content {
        margin-right: 0;
        width: calc(100vw - 70px);
        min-width: auto;
    }

    /* Chat paneli tablette gizlenecek */
    .activitybar {
        display: none;
    }

    /* Chat toggle butonu */
    .chat-toggle {
        position: fixed;
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
        border-radius: 50%;
        background-color: deeppink;
        color: white;
        display: flex;
        justify-content: center;
        align-items: center;
        font-size: 24px;
        z-index: 999;
        cursor: pointer;
    }

    /* Chat açıkken görünür */
    .activitybar.open {
        display: flex;
        background: linear-gradient(45deg, #97f2f5, #ee81ca);
        width: 300px;
        max-width: 400px;
    }

    .loginpanel{
        width:400px;
    }
}