body {
    background-color: #121212;
    color: #e0e0e0;
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
}

.container {
    max-width: 700px;
    margin: auto;
    padding: 20px;
}

h2, h3 {
    color: #ffffff;
}

form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

input[type="text"] {
    padding: 10px;
    border: none;
    border-radius: 4px;
    background-color: #1f1f1f;
    color: #ffffff;
}

input[type="submit"] {
    padding: 10px;
    background-color: #28a745;
    border: none;
    border-radius: 4px;
    color: white;
    font-weight: bold;
    cursor: pointer;
}

input[type="submit"]:hover {
    background-color: #218838;
}

.download-item, .completed-item {
    background-color: #1e1e1e;
    border: 1px solid #333;
    border-radius: 5px;
    padding: 10px;
    margin-bottom: 10px;
}

.download-item strong,
.completed-item strong {
    color: #ffffff;
}

.download-item .progress-bar {
    background-color: #333;
    height: 20px;
    border-radius: 4px;
    overflow: hidden;
    margin-top: 5px;
}

.download-item .progress-bar div {
    height: 100%;
    background-color: #28a745;
    color: #000;
    text-align: center;
    line-height: 20px;
    font-size: 12px;
    transition: width 0.3s ease;
}

.meta, .download-meta {
    font-size: 14px;
    margin-top: 5px;
    color: #ccc;
}

a {
    color: #4dabf7;
    text-decoration: none;
    font-weight: bold;
}

a:hover {
    text-decoration: underline;
}

.deleted {
    color: #888;
    text-decoration: line-through;
}

/* ?? Login page style */
.login-container {
    background-color: #2a2a2a;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.7);
    width: 350px;
    text-align: center;
    margin: 15vh auto;
    border: 1px solid #404040;
}

.login-container h2 {
    color: #ffffff;
    margin-bottom: 30px;
    font-size: 24px;
    font-weight: 400;
}

.login-container form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.login-container label {
    color: #cccccc;
    font-size: 14px;
    text-align: left;
    margin-bottom: 5px;
}

.login-container input[type="password"] {
    width: 100%;
    padding: 15px;
    border-radius: 6px;
    border: 1px solid #555;
    background-color: #1a1a1a;
    color: white;
    font-size: 16px;
    box-sizing: border-box;
}

.login-container input[type="password"]:focus {
    outline: none;
    border-color: #4dabf7;
    box-shadow: 0 0 0 2px rgba(77, 171, 247, 0.2);
}

.login-container input[type="submit"] {
    width: 100%;
    padding: 15px;
    border-radius: 6px;
    border: none;
    background-color: #4dabf7;
    color: white;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
    box-sizing: border-box;
}

.login-container input[type="submit"]:hover {
    background-color: #339af0;
}

strong {
    word-break: break-word;
    white-space: normal;
}

/* ?? Responsive Mobile (<= 600px) */
@media (max-width: 600px) {
    body {
        font-size: 13px;
    }

    h2, h3 {
        font-size: 16px;
        margin-bottom: 10px;
    }

    form {
        gap: 6px;
    }

    input[type="text"], input[type="submit"] {
        font-size: 13px;
        padding: 8px;
        width: 100%;
    }

    .download-item, .completed-item {
        font-size: 13px;
        padding: 6px;
    }

    .download-item .progress-bar {
        height: 10px;
    }

    .download-item .progress-bar div {
        font-size: 9px;
        line-height: 10px;
    }

    .meta, .download-meta {
        font-size: 11px;
    }

    a {
        font-size: 12px;
    }

    strong {
        font-size: 13px;
    }
}


/* ?? Bouton "Débrider et Télécharger" personnalisé */
form:nth-of-type(2) input[type="submit"] {
    background-color: #ffc233;
    color: #000000;
}

form:nth-of-type(2) input[type="submit"]:hover {
    background-color: #e6ae2e;
}

/* ===== Styles pour les modales et interface avancée ===== */

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 20px;
    box-sizing: border-box;
}

.modal-content {
    background: #2a2a2a;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.7);
    border: 1px solid #404040;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-sizing: border-box;
}

.hidden {
    display: none;
}

.modal h3 {
    color: #ffffff;
    margin-bottom: 20px;
    font-size: 20px;
    font-weight: 400;
    text-align: center;
}

.modal textarea {
    width: 100%;
    height: 200px;
    padding: 15px;
    border-radius: 6px;
    border: 1px solid #555;
    background-color: #1a1a1a;
    color: white;
    font-size: 16px;
    font-family: Arial, sans-serif;
    resize: vertical;
    box-sizing: border-box;
    margin-bottom: 20px;
}

.modal textarea:focus {
    outline: none;
    border-color: #4dabf7;
    box-shadow: 0 0 0 2px rgba(77, 171, 247, 0.2);
}

.modal-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.modal button {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.modal .btn-cancel {
    background-color: #6c757d;
    color: white;
}

.modal .btn-cancel:hover {
    background-color: #5a6268;
}

.modal .btn-add {
    background-color: #4dabf7;
    color: white;
}

.modal .btn-add:hover {
    background-color: #339af0;
}

.modal p {
    color: #cccccc;
    font-size: 16px;
    margin-bottom: 20px;
    line-height: 1.4;
}

.button-row {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.btn-batch {
    background-color: #6f42c1;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.btn-batch:hover {
    background-color: #5a2d91;
}

.waiting-item {
    background-color: #2a2a2a;
    border: 1px solid #444;
    border-radius: 5px;
    padding: 10px;
    margin-bottom: 10px;
    color: #ccc;
}

.waiting-item strong {
    color: #ffffff;
}

/* ===== Styles mobiles avancés ===== */

/* Mobile-specific styles for modals and advanced features */
@media (max-width: 768px) {
    .modal {
        padding: 10px;
        align-items: flex-start;
        padding-top: 50px;
    }
    
    .modal-content {
        width: 100%;
        max-width: none;
        padding: 20px;
        border-radius: 8px;
        max-height: 80vh;
    }
    
    /* Améliorer l'alignement des formulaires sur mobile */
    .button-row {
        flex-direction: column;
        gap: 10px !important;
    }
    
    .button-row form {
        width: 100% !important;
    }
    
    .button-row form input[type="text"] {
        width: 100% !important;
        margin-bottom: 10px;
    }
    
    .button-row form input[type="submit"] {
        width: 100%;
    }
    
    .btn-batch {
        width: 100%;
        justify-content: center;
    }
    
    /* Mobile textarea styles */
    .modal textarea {
        font-size: 16px;
        height: 150px;
        padding: 12px;
    }
}

