@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600&display=swap');

:root {
    --bg-color: #eaecee;
    --text-color: #2d3436;
    --shadow-light: #ffffff;
    --shadow-dark: #a3b1c6;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

body {
    background-color: var(--bg-color);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
}

.login-container {
    background: var(--bg-color);
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 8px 8px 16px var(--shadow-dark),
                -8px -8px 16px var(--shadow-light);
    width: 90%;
    max-width: 400px;
    transition: all 0.5s ease;
}

.login-container.success {
    box-shadow: none;
    padding: 0;
}

.pin-dots {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
    transition: all 0.5s ease;
}

.login-container.success .pin-dots {
    opacity: 0;
    transform: translateY(-20px);
    pointer-events: none;
}

.dot {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--bg-color);
    box-shadow: inset 3px 3px 6px var(--shadow-dark),
                inset -3px -3px 6px var(--shadow-light);
    transition: all 0.3s ease;
}

.dot.active {
    transform: scale(1.2);
    background: var(--text-color);
    box-shadow: none;

}

.numpad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    transition: all 0.5s ease;
}

.login-container.success .numpad {
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
}

.num-btn {
    background: var(--bg-color);
    border: none;
    padding: 0;
    aspect-ratio: 1;
    border-radius: 12px;
    font-size: 1.5rem;
    color: var(--text-color);
    cursor: pointer;
    box-shadow: 4px 4px 8px var(--shadow-dark),
                -4px -4px 8px var(--shadow-light);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.num-btn:active {
    box-shadow: inset 2px 2px 4px var(--shadow-dark),
                inset -2px -2px 4px var(--shadow-light);
    transform: scale(0.95);
}

.num-btn.delete,
.num-btn.enter {
    font-size: 1.65rem;
    font-weight: 300;
}

/* Sidebar Styles */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    width: 250px;
    background: var(--bg-color);
    box-shadow: 5px 0 15px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    display: flex;
    flex-direction: column;
}

.menu-item {
    padding: 1rem;
    margin: 0.5rem 0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text-color);
    text-decoration: none;
    text-align: center;
    box-shadow: 3px 3px 6px var(--shadow-dark),
                -3px -3px 6px var(--shadow-light);
}

.menu-item:active {
    box-shadow: inset 3px 3px 6px var(--shadow-dark),
                inset -3px -3px 6px var(--shadow-light);
}

.logout {
    margin-top: auto;
    background: var(--text-color);
    color: var(--bg-color);
}

.content {
    margin-left: 250px;
    padding: 2rem;
    width: calc(100% - 250px);
    min-height: 100vh;
    opacity: 0;
    transform: translateX(-20px);
    animation: fadeIn 0.75s ease forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.content.fade-out {
    opacity: 0;
    transform: translateX(20px);
    transition: all 0.75s ease;
}

h1 {
    color: var(--text-color);
    margin-bottom: 2rem;
}

.logo-container {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
    transition: all 0.5s ease;
}

.login-container.success .logo-container {
    margin-bottom: 1rem;
}

.logo {
    width: 120px;
    height: auto;
    transition: all 0.5s ease;
}

.login-container.success .logo {
    width: 150px;
}

.loading-bar {
    width: 150px;
    height: 4px;
    background: var(--bg-color);
    border-radius: 2px;
    margin: 0 auto;
    overflow: hidden;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.login-container.success .loading-bar {
    opacity: 1;
}

.loading-bar::after {
    content: '';
    display: block;
    width: 0%;
    height: 100%;
    background: var(--text-color);
    border-radius: 2px;
    transition: width 1.5s ease;
}

.login-container.success .loading-bar::after {
    width: 100%;
}

/* Tabelle Styles */
.table-container {
    background: var(--bg-color);
    border-radius: 15px;
    padding: 1rem;
    box-shadow: 5px 5px 10px var(--shadow-dark),
                -5px -5px 10px var(--shadow-light);
    overflow-x: auto;
}

.guests-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.guests-table th,
.guests-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--shadow-dark);
}

.guests-table th:first-child,
.guests-table td:first-child {
    width: 1%;
    white-space: nowrap;
    padding-right: 2rem;
}

.name-cell {
    width: 1%;
    white-space: nowrap;
    padding-right: 2rem;
}

.additional-cell {
    width: auto;
    color: var(--text-color);
    opacity: 0.8;
}

.guests-table th {
    font-weight: 600;
    color: var(--text-color);
}

.status-checkbox {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--text-color);
}

.guests-table tr:hover {
    background: rgba(0, 0, 0, 0.02);
}

/* Formular Styles */
.form-container {
    background: var(--bg-color);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 5px 5px 10px var(--shadow-dark),
                -5px -5px 10px var(--shadow-light);
    max-width: 500px;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-color);
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 0.8rem;
    border: none;
    border-radius: 10px;
    background: var(--bg-color);
    box-shadow: inset 3px 3px 6px var(--shadow-dark),
                inset -3px -3px 6px var(--shadow-light);
    color: var(--text-color);
    font-size: 1rem;
}

.form-group input:focus {
    outline: none;
    box-shadow: inset 4px 4px 8px var(--shadow-dark),
                inset -4px -4px 8px var(--shadow-light);
}

.add-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 1rem;
    border: none;
    border-radius: 10px;
    background: var(--text-color);
    color: var(--bg-color);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    box-shadow: 5px 5px 10px var(--shadow-dark),
                -5px -5px 10px var(--shadow-light);
    transition: all 0.2s ease;
}

.add-button:hover {
    transform: translateY(-2px);
    box-shadow: 6px 6px 12px var(--shadow-dark),
                -6px -6px 12px var(--shadow-light);
}

.add-button:active {
    transform: translateY(0);
    box-shadow: inset 3px 3px 6px var(--shadow-dark),
                inset -3px -3px 6px var(--shadow-light);
}

.plus-icon {
    font-size: 1.2rem;
    font-weight: bold;
}

/* Erfolgsmeldung Styles */
.success-message {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-100%);
    background: var(--text-color);
    color: var(--bg-color);
    padding: 1rem 2rem;
    border-radius: 10px;
    font-weight: 500;
    opacity: 0;
    transition: all 0.3s ease;
    box-shadow: 5px 5px 10px var(--shadow-dark),
                -5px -5px 10px var(--shadow-light);
}

.success-message.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* Lösch-Button Styles */
.delete-cell {
    width: 1%;
    white-space: nowrap;
    padding-left: 1rem;
}

.delete-button {
    width: 30px;
    height: 30px;
    border: none;
    border-radius: 50%;
    background: var(--bg-color);
    color: var(--text-color);
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 3px 3px 6px var(--shadow-dark),
                -3px -3px 6px var(--shadow-light);
    transition: all 0.2s ease;
}

.delete-button:hover {
    background: #ff4444;
    color: white;
    transform: scale(1.1);
}

.delete-button:active {
    transform: scale(0.95);
    box-shadow: inset 2px 2px 4px var(--shadow-dark),
                inset -2px -2px 4px var(--shadow-light);
}

/* Header und Suchfeld Styles */
.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.search-container {
    position: relative;
}

.search-input {
    padding: 0.8rem 1rem;
    padding-left: 2.5rem;
    border: none;
    border-radius: 10px;
    background: var(--bg-color);
    color: var(--text-color);
    font-size: 1rem;
    width: 250px;
    box-shadow: inset 3px 3px 6px var(--shadow-dark),
                inset -3px -3px 6px var(--shadow-light);
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    box-shadow: inset 4px 4px 8px var(--shadow-dark),
                inset -4px -4px 8px var(--shadow-light);
    width: 300px;
}

.search-input::placeholder {
    color: var(--text-color);
    opacity: 0.5;
}

.search-container::before {
    content: "🔍";
    position: absolute;
    left: 0.8rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1rem;
    opacity: 0.5;
}

/* Mobile Styles */
.hamburger-menu {
    display: none;
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 1000;
    background: var(--bg-color);
    border: none;
    padding: 0.5rem;
    border-radius: 10px;
    cursor: pointer;
    box-shadow: 3px 3px 6px var(--shadow-dark),
                -3px -3px 6px var(--shadow-light);
}

.hamburger-menu span {
    display: block;
    width: 25px;
    height: 3px;
    background: var(--text-color);
    margin: 5px 0;
    transition: all 0.3s ease;
}

@media (max-width: 768px) {
    .hamburger-menu {
        display: block;
    }

    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 999;
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .content {
        margin-left: 0;
        width: 100%;
        padding-top: 4rem;
    }

    .header-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .search-container {
        width: 100%;
    }

    .search-input {
        width: 100%;
    }

    .search-input:focus {
        width: 100%;
    }

    .hamburger-menu.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .hamburger-menu.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger-menu.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -7px);
    }
}

/* Editierbare Eingabefelder */
.edit-input {
    width: 100%;
    padding: 0.5rem;
    border: none;
    background: transparent;
    color: var(--text-color);
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
}

.edit-input:focus {
    outline: none;
    background: var(--bg-color);
    box-shadow: inset 2px 2px 4px var(--shadow-dark),
                inset -2px -2px 4px var(--shadow-light);
    border-radius: 5px;
}

.name-input {
    font-weight: 500;
    width: auto;
    min-width: 100px;
}

.additional-input {
    color: var(--text-color);
    opacity: 0.8;
}

.name-cell {
    width: 1%;
    white-space: nowrap;
    padding-right: 2rem;
}

.additional-cell {
    width: auto;
}

.footer {
    position: fixed;
    bottom: 1rem;
    left: 0;
    right: 0;
    width: 100%;
    text-align: center;
    color: var(--text-color);
    opacity: 0.7;
    font-size: 0.9rem;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    z-index: 1;
}

.footer a {
    color: var(--text-color) !important;
    text-decoration: none !important;
    -webkit-text-decoration: none !important;
    font-weight: 500;
    transition: opacity 0.2s ease;
    display: inline-block;
}

.footer a:hover {
    opacity: 1;
    text-decoration: none !important;
    -webkit-text-decoration: none !important;
} 