* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    min-height: 100vh;
    color: #fff;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.header {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

h1 {
    font-size: 2.5rem;
    background: linear-gradient(90deg, #00d4ff, #7b2cbf);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.button-grid {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.menu-btn {
    padding: 30px 50px;
    border: none;
    border-radius: 16px;
    cursor: pointer;
    font-size: 1.2rem;
    font-weight: 600;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    min-width: 200px;
}

.menu-btn .icon {
    font-size: 2.5rem;
}

.menu-btn-add {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: #fff;
}

.menu-btn-add:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(46, 204, 113, 0.4);
}

.menu-btn-list {
    background: linear-gradient(135deg, #00d4ff, #7b2cbf);
    color: #fff;
}

.menu-btn-list:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 212, 255, 0.4);
}

.menu-btn-ujsag {
    background: linear-gradient(135deg, #e67e22, #f39c12);
    color: #fff;
}

.menu-btn-ujsag:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(243, 156, 18, 0.4);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    margin-bottom: 5px;
    font-size: 0.9rem;
    color: #aaa;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #00d4ff;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.checkbox-group {
    flex-direction: row;
    align-items: center;
    gap: 10px;
}

.checkbox-group input {
    width: 20px;
    height: 20px;
}

.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-primary {
    background: linear-gradient(90deg, #00d4ff, #7b2cbf);
    color: #fff;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 212, 255, 0.4);
}

.btn-danger {
    background: #e74c3c;
    color: #fff;
    padding: 8px 15px;
    font-size: 0.85rem;
}

.btn-danger:hover {
    background: #c0392b;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
}

.search-bar {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    align-items: flex-end;
    margin-bottom: 20px;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

th {
    background: rgba(0, 212, 255, 0.2);
    font-weight: 600;
    color: #00d4ff;
}

tr:hover {
    background: rgba(255, 255, 255, 0.05);
}

.status-badge {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.status-free {
    background: #27ae60;
}

.status-fest {
    background: #e67e22;
}

.aktivitat-yes {
    color: #2ecc71;
}

.aktivitat-no {
    color: #e74c3c;
}

.message {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: center;
}

.message-success {
    background: rgba(39, 174, 96, 0.3);
    border: 1px solid #27ae60;
}

.no-data {
    text-align: center;
    padding: 40px;
    color: #aaa;
}

.table-wrapper {
    overflow-x: auto;
}

/* Modal stílusok */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 20px;
    padding: 30px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.3s ease;
}

.modal.modal-large {
    max-width: 1100px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.modal-header h2 {
    color: #00d4ff;
    font-size: 1.5rem;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    color: #aaa;
    font-size: 2rem;
    cursor: pointer;
    transition: color 0.3s;
    line-height: 1;
}

.modal-close:hover {
    color: #e74c3c;
}

.modal-footer {
    display: flex;
    gap: 15px;
    margin-top: 25px;
    justify-content: flex-end;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    table {
        font-size: 0.85rem;
    }

    th,
    td {
        padding: 10px;
    }

    .modal {
        padding: 20px;
        margin: 10px;
    }

    .menu-btn {
        padding: 20px 30px;
        min-width: 150px;
    }
}

/* Admin Layout & Sidebar Styles */
.admin-layout {
    display: flex;
    gap: 30px;
    margin-top: 20px;
    min-height: 60vh;
}

.admin-sidebar {
    width: 250px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    text-decoration: none;
    color: #aaa;
    border-radius: 10px;
    transition: all 0.3s;
    font-weight: 500;
}

.sidebar-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.sidebar-link.active {
    background: linear-gradient(90deg, #00d4ff, #7b2cbf);
    color: #fff;
    box-shadow: 0 4px 15px rgba(0, 212, 255, 0.3);
}

.admin-content {
    flex: 1;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 16px;
    padding: 30px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.admin-header {
    margin-bottom: 25px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 15px;
}

.admin-header h2 {
    color: #00d4ff;
    font-size: 1.8rem;
}

@media (max-width: 768px) {
    .admin-layout {
        flex-direction: column;
    }
    .admin-sidebar {
        width: 100%;
    }
}

/* Login Page Styles */
.login-container {
    max-width: 400px;
    margin: 100px auto;
    padding: 40px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
}
.login-header {
    text-align: center;
    margin-bottom: 40px;
}
.login-header h2 {
    color: #00d4ff;
    margin-bottom: 10px;
}
.login-header p {
    color: #aaa;
}
.error-msg {
    background: rgba(220, 38, 38, 0.2);
    color: #fca5a5;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 25px;
    text-align: center;
    font-size: 0.95rem;
    border: 1px solid rgba(220, 38, 38, 0.3);
}


/* --- Dark Mode Fixing --- */
body {
    color-scheme: dark !important;
}

select option {
    background-color: #1a1a2e !important;
    color: white !important;
}
