/* Allgemeine Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

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

/* Login Seite */
.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-container {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    width: 100%;
    max-width: 400px;
}

.login-container h1 {
    color: #333;
    margin-bottom: 30px;
    text-align: center;
}

.form-group {
    margin-bottom: 20px;
}

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

.form-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
}

.error-message {
    background-color: #fee;
    color: #c33;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 20px;
    text-align: center;
}

.login-note {
    margin-top: 20px;
    font-size: 14px;
    color: #666;
    text-align: center;
}

/* Button Styles */
.btn {
    display: inline-block;
    background: #667eea;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.3s;
}

.btn:hover {
    background: #5a67d8;
}

.btn-logout {
    background: #e53e3e;
}

.btn-logout:hover {
    background: #c53030;
}

.btn-add {
    background: #38a169;
}

.btn-add:hover {
    background: #2f855a;
}

.btn-admin {
    background: #4a5568;
}

.btn-admin:hover {
    background: #2d3748;
}

.btn-view-user {
    background: #3182ce;
}

.btn-view-user:hover {
    background: #2c5282;
}

/* Admin Bereich */
.admin-page {
    min-height: 100vh;
    background-color: #f7fafc;
}

.admin-header {
    background: white;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.admin-header h1 {
    color: #2d3748;
}

.admin-content {
    padding: 20px;
}

.add-animal-section, .animal-list-section {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.add-animal-section h2, .animal-list-section h2 {
    color: #2d3748;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.form-row input {
    flex: 1;
    min-width: 200px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
}

.drag-instruction {
    color: #666;
    margin-bottom: 20px;
    font-style: italic;
}

/* Sortierbare Liste */
.sortable-list {
    list-style: none;
}

.sortable-item {
    background: #f8f9fa;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 15px 20px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s;
    cursor: move;
}

.sortable-item:hover {
    background: #edf2f7;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.sortable-item.sortable-ghost {
    opacity: 0.4;
    background: #cbd5e0;
}

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

.drag-handle {
    color: #a0aec0;
    cursor: move;
    font-size: 18px;
}

.animal-name {
    font-weight: 600;
    color: #2d3748;
    font-size: 18px;
}

.animal-description {
    color: #718096;
    font-style: italic;
}

.animal-count {
    background: #e6fffa;
    color: #234e52;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
}

.animal-actions {
    display: flex;
    gap: 10px;
}

.btn-delete {
    color: #e53e3e;
    background: none;
    border: none;
    cursor: pointer;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: 600;
}

.btn-delete:hover {
    color: #c53030;
}

.empty-list {
    text-align: center;
    color: #a0aec0;
    padding: 40px;
    font-style: italic;
}

.admin-actions {
    text-align: center;
    margin-top: 30px;
}

/* Nutzerbereich */
.user-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.user-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.user-header {
    background: white;
    padding: 30px;
    border-radius: 15px 15px 0 0;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.user-header h1 {
    color: #2d3748;
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-actions {
    display: flex;
    gap: 15px;
}

.user-content {
    background: white;
    padding: 30px;
    border-radius: 0 0 15px 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.animal-control-section h2 {
    color: #2d3748;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.instruction {
    color: #666;
    margin-bottom: 30px;
    font-size: 16px;
}

.animal-control-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.animal-control-item {
    background: #f8f9fa;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s;
}

.animal-control-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.1);
}

.animal-control-info {
    flex: 1;
}

.animal-control-name {
    color: #2d3748;
    font-size: 22px;
    margin-bottom: 8px;
}

.animal-control-description {
    color: #718096;
    font-size: 16px;
}

.animal-control-buttons {
    display: flex;
    align-items: center;
    gap: 20px;
}

.btn-decrease, .btn-increase {
    background: #4299e1;
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.btn-decrease:hover, .btn-increase:hover {
    background: #3182ce;
    transform: scale(1.1);
}

.btn-decrease {
    background: #e53e3e;
}

.btn-decrease:hover {
    background: #c53030;
}

.animal-count-display {
    text-align: center;
    min-width: 100px;
}

.count-number {
    display: block;
    font-size: 36px;
    font-weight: bold;
    color: #2d3748;
    line-height: 1;
}

.count-label {
    color: #718096;
    font-size: 14px;
}

.connection-status {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #718096;
}

.status-connected {
    color: #38a169;
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-disconnected {
    color: #e53e3e;
    display: flex;
    align-items: center;
    gap: 8px;
}

.empty-message {
    text-align: center;
    padding: 60px 20px;
    color: #a0aec0;
}

.empty-message p {
    margin-bottom: 20px;
    font-size: 18px;
}

.user-footer {
    text-align: center;
    color: white;
    margin-top: 30px;
    padding: 20px;
}

.user-footer p {
    margin: 5px 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .admin-header, .user-header {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .form-row {
        flex-direction: column;
    }
    
    .form-row input {
        min-width: 100%;
    }
    
    .sortable-item {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .animal-actions {
        align-self: flex-end;
    }
    
    .animal-control-item {
        flex-direction: column;
        gap: 25px;
        text-align: center;
    }
    
    .animal-control-buttons {
        width: 100%;
        justify-content: center;
    }
    
    .connection-status {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .login-container, .add-animal-section, 
    .animal-list-section, .user-content {
        padding: 20px;
    }
    
    .animal-control-buttons {
        flex-direction: column;
        gap: 15px;
    }
    
    .count-number {
        font-size: 28px;
    }
}
