* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}


header {
    background-color: #333;
    color: #fff;
    padding: 20px;
    text-align: center;
    width: 100%;
    margin-bottom: 20px;
}

header h1 {
    margin: 0;
    font-size: 36px;
}


header button {
    background-color: #333;
    color: white;
    padding: 10px;
    border: none;
    cursor: pointer;
    font-size: 35px;
}


.header-content {
    display: flex; 
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.header-buttons {
    display: flex;
    gap: 10px;
    margin-right: 30px;
}


.btn-add-film, .btn-film-vu, .btn-films {
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 10px;
    font-size: 14px;
    cursor: pointer;
    border-radius: 3px;
    display: inline-flex;
    align-items: center;
}

.btn-film-vu {
    background-color: #3259f6;
}

.btn-films {
    background-color: #FF6347;
}

.btn-add-film i, .btn-film-vu i , .btn-films i {
    margin-right: 5px;
}

.btn-add-film:hover, .btn-film-vu:hover, .btn-films:hover {
    opacity: 0.8;
}


main {
    padding: 20px;
    padding-left: 10%;
    padding-right: 10%;
}

h2 {
    text-align: left;
    margin-bottom: 15px;
}

.header-stats-link {
    color: #f1f1f1;
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 14px;
}

.header-stats-link a {
    color: #f1f1f1;
    text-decoration: none;
}


.header-stats-link a:hover {
    text-decoration: underline;
}

.category-box, .stats-box, .economies-box, .economies-container {
    background-color: #1c1c1c;
    color: #f1f1f1;
}

.category-box, .stats-box {
    position: relative;
    background-color: #1c1c1c;
    padding: 20px;
    margin: 20px auto;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    width: 90%;
    text-align: center;
    color: #f1f1f1;
}


.category-box h2 {
    margin-bottom: 20px;
    text-align: center;
    font-size: 24px;
}


.film-grid {
    display: flex;
    justify-content: space-between;
    flex-wrap: nowrap;
    gap: 10px;
}


.film-item {
    background-color: #1a1a1a;
    color: #f1f1f1;
    position: relative;
    flex-basis: 18%;
    text-align: center;
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
    overflow: hidden;
}

.film-streaming-icon {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 10;
}

.film-item:hover {
    transform: scale(1.05);
}

a.film-item {
    text-decoration: none;
    color: inherit;
    display: block;
}


.film-image {
    width: 100%;
    height: auto;
    border-radius: 5px;
}

.film-title {
    margin: 10px 0 5px;
    font-size: 16px;
    font-weight: bold;
    color: #f1f1f1;
}

.film-date {
    font-size: 14px;
    color: #bbbbbb;
}

.film-item .platform-logo {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 30px;
    height: auto;
    z-index: 1;
}

.streaming-logo {
    width: 50px;
    height: auto;
}


canvas {
    max-width: 600px;
    width: 600px;
    height: 250px;
    height: auto;
    margin: 20px auto;
}



.stats-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.stats-box p {
    font-size: 18px;
    font-weight: bold;
    margin: 20px auto;
    color: #f1f1f1;
}

.stats-box p:nth-child(3) {
    font-size: 20px;
    font-weight: bold;
    color: #d9534f;
}

.stats-box p:nth-child(3):before {
    content: '🎬 ';
}

.stats-box p:nth-child(3).advance {
    color: #5cb85c;
}

.total-time {
    margin-top: 20px;
    font-size: 18px;
    text-align: center;
    padding: 10px;
    background-color: #1e1e1e;
    color: #f1f1f1;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}


.category-box h3 {
    margin-bottom: 10px;
    font-size: 24px;
    color: #f1f1f1;
}

.category-box p {
    font-size: 18px;
    color: #cccccc;
    margin-bottom: 8px;
}


.flex-container {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

@media (max-width: 768px) {
    .film-grid {
        flex-wrap: wrap;
        justify-content: center;
    }

    .film-item {
        flex-basis: 45%;
        margin-bottom: 15px;
    }

    .flex-container {
        flex-direction: column;
        gap: 20px;
    }

    .graph-container,
    .economies-container {
        width: 100%;
    }

    main {
        padding-left: 5%;
        padding-right: 5%;
    }

    header h1 {
        font-size: 28px;
    }

    .header-buttons {
        flex-direction: column;
        gap: 5px;
        margin-right: 0;
    }

    .btn-add-film, .btn-film-vu, .btn-films {
        width: 100%;
        justify-content: center;
    }
}
