/* Основные стили */
body { 
    font-family: 'Segoe UI', Arial, sans-serif; 
    background: #f8f9fa; 
    margin: 0;
    padding: 0;
    color: #333;
    line-height: 1.6;
}

.container { 
    max-width: 1200px; 
    margin: 20px auto; 
    background: #fff; 
    padding: 30px; 
    border-radius: 12px; 
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

h1 { 
    margin: 0 0 25px 0;
    color: #333;
    font-size: 2em;
    font-weight: 600;
}

h2 {
    margin: 0 0 20px 0;
    color: #333;
    font-size: 1.5em;
    font-weight: 600;
}

h3 {
    margin: 0 0 15px 0;
    color: #555;
    font-size: 1.2em;
    font-weight: 600;
}

/* Кнопки */
.btn { 
    padding: 12px 24px; 
    border: none; 
    border-radius: 8px; 
    cursor: pointer; 
    text-decoration: none; 
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn:hover { 
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.btn-primary { 
    background: #4CAF50; 
    color: white; 
}

.btn-primary:hover { 
    background: #45a049;
}

.btn-success { 
    background: #4CAF50; 
    color: white; 
}

.btn-success:hover { 
    background: #45a049;
}

.btn-warning { 
    background: #ff9800; 
    color: white; 
}

.btn-warning:hover { 
    background: #f57c00;
}

.btn-danger { 
    background: #f44336; 
    color: white; 
}

.btn-danger:hover { 
    background: #d32f2f;
}

.btn-secondary { 
    background: #757575; 
    color: white; 
}

.btn-secondary:hover { 
    background: #616161;
}

.btn.small {
    padding: 8px 16px;
    font-size: 13px;
}

/* Формы */
.form-section {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 10px;
    border: 1px solid #e9ecef;
    margin-bottom: 30px;
}

.add-form {
    display: flex;
    gap: 15px;
    align-items: flex-end;
}

.add-form.compact {
    align-items: center;
}

.form-group {
    flex: 1;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #555;
}

.text-input, .select-input, .file-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.text-input:focus, .select-input:focus, .file-input:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

.color-input-group {
    display: flex;
    gap: 10px;
    align-items: center;
}

.color-picker {
    width: 60px;
    height: 45px;
    border: 1px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
}

.color-text {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    font-family: monospace;
}

.form-help {
    font-size: 12px;
    color: #666;
    margin-top: 8px;
    font-style: italic;
}

/* Заголовок страницы */
.page-header {
    padding: 20px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 10px;
    margin-bottom: 30px;
}

.page-header h1 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 15px;
}

.line-color-badge {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.back-section {
    margin-bottom: 20px;
}

/* Карточки линий */
.lines-container {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.line-card {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.line-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.line-header {
    padding: 20px;
    background: #f8f9fa;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e9ecef;
}

.line-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.line-name {
    margin: 0;
    color: #333;
}

.line-color-badge {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.stations-section {
    padding: 20px;
}

.stations-list {
    margin: 20px 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.station-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    transition: background-color 0.2s ease;
}

.station-item:hover {
    background: #f8f9fa;
}

.station-link {
    color: #1976d2;
    text-decoration: none;
    font-weight: 500;
    flex: 1;
    transition: color 0.2s ease;
}

.station-link:hover {
    color: #1565c0;
    text-decoration: underline;
}

/* Состояния */
.empty-state {
    text-align: center;
    padding: 60px 40px;
    color: #666;
    font-style: italic;
    background: white;
    border-radius: 10px;
    border: 2px dashed #ddd;
}

.empty-state.small {
    padding: 30px 20px;
    font-size: 14px;
}

/* Адаптивность */
@media (max-width: 768px) {
    .container {
        margin: 10px;
        padding: 20px;
    }
    
    .lines-container {
        gap: 20px;
    }
    
    .add-form {
        flex-direction: column;
        align-items: stretch;
    }
    
    .line-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .station-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .page-header h1 {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .color-input-group {
        flex-direction: column;
        align-items: stretch;
    }
    
    .color-picker {
        width: 100%;
        height: 50px;
    }
}

@media (max-width: 480px) {
    .btn {
        padding: 10px 16px;
        font-size: 13px;
    }
    
    .form-section {
        padding: 20px;
    }
}

.user-panel {
    background: #333;
    color: white;
    padding: 10px 0;
    margin-bottom: 20px;
}

.user-info {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 15px;
    font-size: 14px;
}

.user-info a {
    text-decoration: none;
}

.user-info {
    color: black;
}

.user-panel {
    background: #333;
    color: white;
    padding: 10px 0;
    margin-bottom: 20px;
}

.user-info {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 15px;
    font-size: 14px;
}

.user-info a {
    text-decoration: none;
}

.gallery-section {
    margin-bottom: 30px;
}

.gallery-card {
    background: white;
    border: 2px solid #6c757d;
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.gallery-title {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 1.4em;
}

.gallery-description {
    color: #666;
    margin-bottom: 20px;
    font-size: 14px;
}