/* Grundlegende Stile für die gesamte Seite */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
    color: #333;
    display: flex;           /* Basisaufteilung fixieren */
    flex-direction: column;                       /* *** */
    height: 100vh;                                /* *** */
    flex-wrap: nowrap;                            /* *** */
}

/**********************/
/* Header-Stile */
/**********************/
header {
    background-color: #4CAF50;
    color: white;
    font-size: 1.2em;
}

header .header-container {
    max-width: 800px;
    margin: auto;
    padding: 20px 5%;
    display: flex;
    gap: 10px;
    justify-content: space-between;
}

/* Titel-Stile */


/* Menü-Stile */
header .menu-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

header a {
    display: flex;
    align-items: center;
    text-decoration: none;
}

/* Button-Stile */
header a button {
    background-color: white;
    text-decoration: none;
    color: #4CAF50;
    border: none;
    padding: 10px 20px;
    font-size: 1em;
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.3s, color 0.3s;
    margin: 0;
}

header button:hover {
    background-color: #45a049;
    color: white;
}

header button:hover a {
    color: white;
}

/**********************/
/* Main-Bereich-Stile */
/**********************/
main {
    flex-grow: 1;
    padding: 30px 0;
    overflow: auto;
}

main .main-limit {
    padding: 0 5%;
    max-width: 1200px;
    margin: auto;
}

/* Überschriften */
main h1 {
    color: #2E7D32;
    font-size: 2.2em;
    margin-bottom: 10px;
    font-weight: 600;
}

main h2 {
    color: #388E3C;
    font-size: 1.8em;
    margin: 25px 0 15px 0;
    border-bottom: 2px solid #4CAF50;
    padding-bottom: 8px;
}

main h3 {
    color: #43A047;
    font-size: 1.4em;
    margin: 20px 0 10px 0;
}

main h4 {
    color: #66BB6A;
    font-size: 1.2em;
    margin: 15px 0 8px 0;
}

/* Allgemeine Absätze */
main p {
    margin-bottom: 15px;
    font-size: 1.05em;
}

.subtitle {
    color: #666;
    font-size: 1.2em;
    margin-bottom: 25px;
    font-style: italic;
}

/* Navigation Buttons - Neue Stile */
.main-navigation .nav-buttons {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin: 25px 0;
}

.btn-primary, .btn-secondary, .btn-warning, 
.btn-add, .btn-edit, .btn-delete, .btn-reset,
.btn-submit, .btn-cancel, .back-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 28px;
    font-size: 1em;
    font-weight: 500;
    text-decoration: none;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    min-width: 180px;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(to right, #4CAF50, #2E7D32);
    color: white;
}

.btn-secondary {
    background: linear-gradient(to right, #2196F3, #1976D2);
    color: white;
}

.btn-warning {
    background: linear-gradient(to right, #FF9800, #F57C00);
    color: white;
}

.btn-add {
    background: linear-gradient(to right, #4CAF50, #388E3C);
    color: white;
}

.btn-edit {
    background: linear-gradient(to right, #2196F3, #1976D2);
    color: white;
    padding: 8px 16px;
    font-size: 0.9em;
    min-width: auto;
}

.btn-delete {
    background: linear-gradient(to right, #F44336, #D32F2F);
    color: white;
    padding: 8px 16px;
    font-size: 0.9em;
    min-width: auto;
}

.btn-reset {
    background: linear-gradient(to right, #FF9800, #F57C00);
    color: white;
}

.btn-submit {
    background: linear-gradient(to right, #4CAF50, #2E7D32);
    color: white;
}

.btn-cancel {
    background: linear-gradient(to right, #757575, #616161);
    color: white;
}

.back-link {
    background: #f0f0f0;
    color: #555;
    padding: 10px 20px;
    font-size: 0.95em;
    min-width: auto;
    margin-bottom: 20px;
    display: inline-block;
}

/* Hover-Effekte für Buttons */
.btn-primary:hover, .btn-add:hover, .btn-submit:hover {
    background: linear-gradient(to right, #45a049, #1B5E20);
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.btn-secondary:hover, .btn-edit:hover {
    background: linear-gradient(to right, #1E88E5, #1565C0);
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.btn-warning:hover, .btn-reset:hover {
    background: linear-gradient(to right, #FB8C00, #EF6C00);
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.btn-delete:hover {
    background: linear-gradient(to right, #E53935, #C62828);
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.btn-cancel:hover {
    background: linear-gradient(to right, #616161, #424242);
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.back-link:hover {
    background: #e0e0e0;
    transform: translateY(-2px);
}

/* CRUD Visualisierung */
.crud-items {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.crud-item {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease;
    border-left: 5px solid #4CAF50;
}

.crud-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
}

.crud-icon {
    font-size: 2em;
    margin-bottom: 10px;
}

.crud-text strong {
    color: #2E7D32;
    font-size: 1.1em;
}

/* Features Section */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin: 20px 0;
}

.feature-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.feature-card h4 {
    color: #2E7D32;
    margin-top: 0;
}

/* Tabellen-Stile */
.user-table {
    border-collapse: collapse;
    min-width: 600px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.user-table th {
    background: #4CAF50;
    color: white;
    padding: 12px 8px;
    text-align: left;
}

.user-table td {
    padding: 2px 2px 2px 8px;
    border-bottom: 1px solid #e0e0e0;
    vertical-align: middle;
}

.user-table tr:hover {
    background-color: #f9f9f9;
}

.user-table tr:last-child td {
    border-bottom: none;
}

.id-cell {
    font-weight: bold;
    color: #666;
    font-family: monospace;
}

.action-cell {
    text-align: center;
    white-space: nowrap;
}

.no-data {
    text-align: center;
    padding: 40px !important;
    color: #666;
    font-style: italic;
}

/* Formular-Stile */
main form {
    background: white;
    padding: 30px;
    margin: 20px 0;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

main form div {
    margin: 20px 0;
}

main form label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-weight: 500;
}

main form input[type="text"],
main form input[type="password"],
main form input[type="email"] {
    width: 100%;
    padding: 14px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1em;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

main form input[type="text"]:focus,
main form input[type="password"]:focus,
main form input[type="email"]:focus {
    border-color: #4CAF50;
    outline: none;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

.form-buttons {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

/* Intro Sections */
.intro-section, .security-note {
    background: white;
    border-radius: 12px;
    padding: 25px;
    margin: 20px 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.security-note {
    border-left: 5px solid #FF9800;
    background: #FFF9C4;
}

/* Table Actions */
.table-actions {
    display: flex;
    gap: 15px;
    margin: 20px 0;
}

.table-stats {
    background: white;
    padding: 5px 10px;
    border-radius: 8px;
    margin-top: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    display: inline-block;
}

/**********************/
/* Footer-Stile       */
/**********************/
footer {
    background: linear-gradient(to right, #263238, #37474F);
    color: white;
    text-align: center;
    padding: 20px;
}

/* ************************************/
/* Adaptive Stile                     */
/* ************************************/
@media screen and (max-width: 768px) {
    header .header-container {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    header .menue-container {
        justify-content: center;
    }
    
    .main-navigation .nav-buttons {
        flex-direction: column;
    }
    
    .btn-primary, .btn-secondary, .btn-warning,
    .btn-add, .btn-reset {
        width: 100%;
        min-width: auto;
    }
    
    .crud-items, .features-grid {
        grid-template-columns: 1fr;
    }
    
    .form-buttons {
        flex-direction: column;
    }
    
    main h1 {
        font-size: 1.8em;
    }
    
    main h2 {
        font-size: 1.5em;
    }
}

@media screen and (max-width: 480px) {
    header h1 {
        font-size: 1.5em;
    }
    
    header a button {
        padding: 8px 15px;
        font-size: 0.85em;
    }
    
    .btn-primary, .btn-secondary, .btn-warning,
    .btn-add, .btn-reset {
        padding: 12px 20px;
        font-size: 0.95em;
    }
    
    main form {
        padding: 20px;
    }
}