/* Definição de variáveis globais para consistência visual */
:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --success-color: #27ae60;
    --danger-color: #e74c3c;
    --warning-color: #f1c40f;
    --background-color: #f5f5f5;
    --text-color: #333;
    --border-color: #ddd;
    --shadow-color: rgba(0, 0, 0, 0.1);
}

/* Reset e estilos base */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    background-color: var(--background-color);
    color: var(--text-color);
    min-height: 100vh;
}

/* Estilização da página de login */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

.login-container {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px var(--shadow-color);
    width: 100%;
    max-width: 400px;
}

.login-form h2 {
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 1.5rem;
}

.login-input {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    margin-bottom: 1rem;
    font-size: 1rem;
}

.login-button {
    width: 100%;
    padding: 0.8rem;
    background-color: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s ease;
}

.login-button:hover {
    background-color: #2980b9;
}

/* Layout do Dashboard */
.dashboard-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px var(--shadow-color);
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Seções do Dashboard */
.upload-section,
.torrents-section,
.config-section {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px var(--shadow-color);
    margin-bottom: 20px;
}

/* Estilização da tabela de torrents */
.table-responsive {
    overflow-x: auto;
}

.torrents-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.torrents-table th,
.torrents-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.torrents-table th {
    background-color: #f8f9fa;
    font-weight: bold;
    color: var(--primary-color);
}

.torrents-table tr:hover {
    background-color: #f8f9fa;
}

/* Controles e Formulários */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

input[type="text"],
input[type="number"],
input[type="password"],
select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 14px;
}

/* Botões e Ações */
button {
    background-color: var(--secondary-color);
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s ease;
}

button:hover {
    background-color: #2980b9;
}

.remove-button {
    background-color: var(--danger-color);
    padding: 5px 10px;
    font-size: 12px;
}

.remove-button:hover {
    background-color: #c0392b;
}

/* Status e Indicadores */
.status-badge {
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: bold;
}

.status-badge.active {
    background-color: var(--success-color);
    color: white;
}

.status-badge.inactive {
    background-color: var(--danger-color);
    color: white;
}

/* Responsividade */
@media (max-width: 768px) {
    .dashboard-container {
        padding: 10px;
    }

    .torrents-table {
        display: block;
        overflow-x: auto;
    }

    .form-group {
        margin-bottom: 20px;
    }

    button {
        width: 100%;
        margin-bottom: 10px;
    }

    header {
        flex-direction: column;
        text-align: center;
    }

    .header-status {
        margin-top: 10px;
    }
}

/* Animações */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.torrent-item {
    animation: fadeIn 0.3s ease-in;
}