/* Reset et styles de base */
body, html {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: 'Roboto', sans-serif;
    overflow: hidden;
    background-color: rgba(0, 0, 0, 0.2);
}

/* Styles du bureau */
#desktop {
    height: calc(100% - 40px);
    background-image: url('img/RetroLight_Background_Img.jpg');
    background-size: cover;
    background-position: center;
    position: relative;
    transition: all 0.3s ease;
    padding: 20px;
    overflow: hidden;
}

/* Styles de la barre des tâches */
#taskbar {
    height: 40px;
    background-color: var(--taskbar-color, rgba(25, 25, 25, 0.8));
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 10px;
    box-sizing: border-box;
    z-index: 9995;
}

#start-button {
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: background-color 0.3s ease;
    background-image: url('img/RetroLight_icon.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

#start-button:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

#start-button i {
    display: none;
}

#open-windows {
    display: flex;
    flex-grow: 1;
    margin: 0 10px;
}

.taskbar-item {
    padding: 5px 10px;
    margin-right: 5px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    cursor: pointer;
    z-index: 9998;
}

#time {
    color: white;
    font-size: 14px;
}

/* Styles du menu Démarrer */
#start-menu {
    position: fixed;
    bottom: 40px;
    left: 0;
    width: 300px;
    background-color: rgba(25, 25, 25, 0.9);
    border-top-right-radius: 10px;
    color: white;
    padding: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease;
    transform: translateY(100%);
    display: none; /* Cachez le menu par défaut */
    z-index: 9992;
}

#start-menu.visible {
    transform: translateY(0);
    display: block; /* Affichez le menu lorsqu'il est visible */
}

.start-menu-header input {
    width: 100%;
    padding: 5px;
    margin-bottom: 10px;
    border: none;
    border-radius: 5px;
}

.start-menu-item {
    padding: 10px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.start-menu-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.start-menu-item i {
    margin-right: 10px;
}

/* Styles des icônes du bureau */
#desktop-icons {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.icon {
    width: 100px;
    height: 100px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: absolute; /* Ajoutez cette ligne pour permettre le positionnement libre */
    text-align: center;
}

.icon i {
    font-size: 48px;
    color: rgb(29, 196, 218); /* Changez la couleur en blanc pour une meilleure visibilité */
    margin-bottom: 10px;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
}

.icon span {
    color: white;
    font-size: 14px;
    text-align: center;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
    word-wrap: break-word;
    max-width: 100%;
}

.icon:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
}

/* Styles des fenêtres */
#window{
    position: absolute;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    display: none;
    overflow: hidden;
    transition: all 0.3s ease;
    margin: 0 20px;
    max-width: calc(100% - 40px);
    box-sizing: border-box;
}

.window {
    position: absolute;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    display: none;
    overflow: hidden;
    transition: all 0.3s ease;
    margin: 0 20px;
    max-width: calc(100% - 40px);
    box-sizing: border-box;
}

.window-header {
    background-color: #0078D7;
    color: white;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: move;
}

.window-header i {
    margin-right: 10px;
    font-size: 20px;
}

.window-content {
    padding: 20px;
    height: calc(100% - 50px);
    overflow-y: auto;
}

.window-controls {
    display: flex;
    align-items: center;
}

.minimize-button,
.close-button {
    cursor: pointer;
    font-size: 18px;
    transition: all 0.3s ease;
    width: 30px;
    height: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    margin-left: 5px;
}

.minimize-button:hover,
.close-button:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

.close-button:hover {
    background-color: #e81123;
}

/* Styles spécifiques aux applications */
#settings.window {
    width: 400px;
    height: 450px;
}

#settings .window-content h3 {
    margin-top: 20px;
    margin-bottom: 10px;
}

#settings .window-content select,
#settings .window-content input[type="text"],
#settings .window-content input[type="color"],
#settings .window-content input[type="range"] {
    width: 100%;
    padding: 5px;
    margin-bottom: 10px;
}

#settings .window-content button {
    background-color: #0078D7;
    color: white;
    border: none;
    padding: 5px 10px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#settings .window-content button:hover {
    background-color: #005a9e;
}

/* Styles du lecteur de musique */
#musicPlayer .window-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
}

#spotify-login {
    margin: 20px 0;
}

#spotify-connect {
    background-color: #1DB954;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: bold;
}

#player-controls {
    display: flex;
    justify-content: center;
    margin: 20px 0;
}

#player-controls button {
    font-size: 24px;
    margin: 0 10px;
    background: none;
    border: none;
    cursor: pointer;
}

#now-playing {
    text-align: center;
}

#album-cover {
    width: 200px;
    height: 200px;
    object-fit: cover;
    margin-bottom: 10px;
}

#track-name {
    font-weight: bold;
    margin-bottom: 5px;
}

#artist-name {
    color: #666;
}

/* Styles de l'explorateur de fichiers */
#file-explorer-toolbar {
    display: flex;
    align-items: center;
    padding: 10px;
    background-color: #f0f0f0;
    border-bottom: 1px solid #ddd;
}

#file-explorer-toolbar button {
    background: none;
    border: none;
    font-size: 16px;
    margin-right: 10px;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 3px;
}

#file-explorer-toolbar button:hover {
    background-color: #e0e0e0;
}

#file-path {
    flex-grow: 1;
    padding: 5px;
    border: 1px solid #ddd;
    border-radius: 3px;
}

#file-explorer-content {
    height: calc(100% - 50px);
    overflow-y: auto;
}

.file-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
    padding: 10px;
}

.file-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 10px;
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.file-item:hover {
    background-color: #f0f0f0;
}

.file-item i {
    font-size: 32px;
    margin-bottom: 5px;
}

.file-item span {
    font-size: 12px;
    word-break: break-word;
}

/* Styles pour la date dans la barre des tâches */
#date {
    color: white;
    font-size: 14px;
    margin-left: 10px;
}

/* Styles pour les notifications */
.notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #333;
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    z-index: 1000;
    transition: opacity 0.3s ease;
}

.notification.hide {
    opacity: 0;
}

/* Styles pour la fenêtre des paramètres */
#settings .window-content {
    padding: 20px;
}

#settings h2 {
    margin-bottom: 20px;
    color: #333;
}

#settings h3 {
    margin-top: 20px;
    margin-bottom: 10px;
    color: #555;
}

/* Styles pour le sélecteur de thème */
#theme-select {
    width: 100%;
    padding: 8px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background-color: #fff;
    font-size: 14px;
}

/* Styles pour la section de fond d'écran personnalisé */
#custom-wallpaper {
    background-color: #f5f5f5;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
}

#wallpaper-url {
    width: calc(100% - 22px);
    padding: 8px;
    margin-bottom: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
}

/* Styles pour les boutons */
#settings button {
    background-color: #0078D7;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s ease;
}

#settings button:hover {
    background-color: #005a9e;
}

/* Styles pour les contrôles de couleur et de taille des icônes */
#icon-color {
    width: 50px;
    height: 30px;
    padding: 0;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

#icon-size {
    width: 100%;
    margin-bottom: 10px;
}

/* Styles pour améliorer la lisibilité des labels */
#settings label {
    display: block;
    margin-bottom: 5px;
    color: #333;
}

/* Styles pour gérer l'espacement entre les sections */
#settings .section {
    margin-bottom: 25px;
}

/* Styles pour le fond d'écran du bureau */
#desktop {
    background-size: cover;
    background-position: center;
    transition: background-image 0.5s ease;
}

/* SNAKE */
#snakeCanvas {
    border: 1px solid #000;
    display: block;
    margin: 0 auto;
    width: 100%;
}

#snakeControls {
    text-align: center;
    margin-top: 10px;
}

#startSnakeGame {
    background-color: #4CAF50;
    border: none;
    color: white;
    padding: 10px 20px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 16px;
    margin: 4px 2px;
    cursor: pointer;
}

#snakeScore {
    font-size: 18px;
    margin-left: 20px;
}

#gameOverScreen {
    font-family: Arial, sans-serif;
}

.game-over-overlay {
    display: none;
    position: absolute;
    top: 40px; /* Ajustez cette valeur selon la hauteur de votre barre de titre */
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0,0,0,0.8);
    color: white;
    text-align: center;
}

.game-over-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
}

#gameOverScreen h2 {
    font-size: 36px;
    margin-bottom: 20px;
}

#restartGame {
    background-color: #4CAF50;
    border: none;
    color: white;
    padding: 15px 32px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 16px;
    margin: 4px 2px;
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.3s;
}

#restartGame:hover {
    background-color: #45a049;
}

#finalScore {
    font-size: 24px;
    margin-bottom: 30px;
}




/* Plateformer */
#platformerCanvas {
    border: 1px solid #000;
    display: block;
    margin: 0 auto;
    width: 85%;
}

#platformerControls {
    text-align: center;
    margin-top: 10px;
}

#startPlatformerGame, #restartPlatformerGame {
    background-color: #4CAF50;
    border: none;
    color: white;
    padding: 10px 20px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 16px;
    margin: 4px 2px;
    cursor: pointer;
}

#platformerScore {
    font-size: 18px;
    margin-left: 20px;
}

#gameOverScreenPlatformer {
    display: none;
    position: absolute;
    top: 40px;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0,0,0,0.8);
    color: white;
    text-align: center;
}

.game-over-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
}

.desktop-widget {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 200px;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 10px;
    padding: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    font-family: Arial, sans-serif;
    z-index: 1000;
}

.widget-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

#citySelect {
    font-size: 12px;
    padding: 2px;
}

#weatherInfo {
    text-align: center;
}

#weatherIcon {
    font-size: 3em;
    margin: 10px 0;
}

#temperature {
    font-size: 2em;
    margin: 5px 0;
}

#weatherDescription {
    font-size: 1em;
    margin-bottom: 10px;
}

#humidity, #windSpeed {
    font-size: 0.8em;
    margin-top: 5px;
}