/* Общие стили */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    background: #fff;
    min-height: 100vh;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
}

/* Авторизация */
.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-form {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 400px;
}

.login-form h1 {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #555;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e1e5e9;
    border-radius: 5px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
}

.default-credentials {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 5px;
    margin-top: 20px;
    text-align: center;
    font-size: 14px;
    color: #666;
}

/* Кнопки */
.btn-primary, .btn-secondary, .btn-success, .btn-danger {
    padding: 12px 24px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5a6fd8;
    transform: translateY(-1px);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-success:hover {
    background: #218838;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #c82333;
}

/* Заголовок */
header {
    background: #fff;
    padding: 20px 30px;
    border-bottom: 1px solid #e1e5e9;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header h1 {
    color: #333;
    font-size: 28px;
}

.user-info {
    color: #666;
}

/* Основной контент */
.main-content {
    display: flex;
    min-height: calc(100vh - 80px);
}

.sidebar {
    width: 300px;
    background: #f8f9fa;
    padding: 30px;
    border-right: 1px solid #e1e5e9;
}

.sidebar h3 {
    margin-bottom: 20px;
    color: #333;
}

.create-project-form {
    margin-bottom: 30px;
}

.create-project-form input {
    width: 100%;
    padding: 10px;
    border: 2px solid #e1e5e9;
    border-radius: 5px;
    margin-bottom: 10px;
}

.create-project-form button {
    width: 100%;
}

.projects-list {
    max-height: 400px;
    overflow-y: auto;
}

.project-item {
    margin-bottom: 10px;
}

.project-item a {
    display: block;
    padding: 15px;
    background: white;
    border-radius: 5px;
    text-decoration: none;
    color: #333;
    border: 2px solid transparent;
    transition: all 0.3s;
}

.project-item.active a {
    border-color: #667eea;
    background: #f0f2ff;
}

.project-item a:hover {
    background: #e9ecef;
}

.project-item small {
    display: block;
    color: #666;
    font-size: 12px;
    margin-top: 5px;
}

.content {
    flex: 1;
    padding: 30px;
}

.content h2 {
    margin-bottom: 30px;
    color: #333;
}

/* Добавление ссылок */
.add-links-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 30px;
}

.add-links-section h3 {
    margin-bottom: 15px;
    color: #333;
}

.add-links-section textarea {
    width: 100%;
    padding: 15px;
    border: 2px solid #e1e5e9;
    border-radius: 5px;
    resize: vertical;
    font-family: monospace;
    margin-bottom: 15px;
}

/* Статистика */
.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-item {
    background: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    border: 2px solid #e1e5e9;
    transition: transform 0.3s;
}

.stat-item:hover {
    transform: translateY(-2px);
}

.stat-item.pending {
    border-color: #ffc107;
    background: #fff8e1;
}

.stat-item.success {
    border-color: #28a745;
    background: #e8f5e8;
}

.stat-item.failed {
    border-color: #dc3545;
    background: #ffeaea;
}

.stat-number {
    display: block;
    font-size: 32px;
    font-weight: bold;
    color: #333;
}

.stat-label {
    color: #666;
    font-size: 14px;
}

/* Управление */
.controls {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

/* Ключевые слова */
.keywords-info {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 30px;
}

.keywords-info h4 {
    margin-bottom: 10px;
    color: #333;
}

.keywords-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.keyword-tag {
    background: #667eea;
    color: white;
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 12px;
}

/* Прогресс бар */
.progress-bar {
    background: #e1e5e9;
    border-radius: 10px;
    height: 30px;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}

.progress-fill {
    background: linear-gradient(90deg, #667eea, #764ba2);
    height: 100%;
    border-radius: 10px;
    width: 0%;
    transition: width 0.3s ease;
}

.progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #333;
    font-weight: 500;
    font-size: 14px;
}

/* Таблица ссылок */
.links-table {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.links-table h3 {
    padding: 20px;
    background: #f8f9fa;
    margin: 0;
    border-bottom: 1px solid #e1e5e9;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #e1e5e9;
}

th {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
}

tr:hover {
    background: #f8f9fa;
}

.link-row.status-success {
    background: rgba(40, 167, 69, 0.1);
}

.link-row.status-failed {
    background: rgba(220, 53, 69, 0.1);
}

.status-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.status-badge.status-success {
    background: #28a745;
    color: white;
}

.status-badge.status-failed {
    background: #dc3545;
    color: white;
}

.status-badge.status-pending {
    background: #ffc107;
    color: #000;
}

/* Сообщения */
.alert {
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.alert.success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 10px;
    border-radius: 5px;
    text-align: center;
    margin: 15px 0;
}

/* Приветственное сообщение */
.welcome-message {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.welcome-message h2 {
    color: #333;
    margin-bottom: 20px;
}

/* Адаптивность */
@media (max-width: 768px) {
    .main-content {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
    }
    
    .controls {
        flex-direction: column;
    }
    
    .stats {
        grid-template-columns: 1fr;
    }
    
    table {
        font-size: 14px;
    }
    
    th, td {
        padding: 10px 8px;
    }
} 