/* VexSMP Todo App Styles */

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

:root {
    --bg-color: #f0f0f0;
    --text-color: #333;
    --card-bg: white;
    --border-color: #ddd;
    --shadow: rgba(0,0,0,0.1);
    --pending-color: #ff9800;
}

body.dark-mode {
    --bg-color: #1e1e1e;
    --text-color: #e0e0e0;
    --card-bg: #2d2d2d;
    --border-color: #444;
    --shadow: rgba(0,0,0,0.3);
}

body {
    font-family: Arial, sans-serif;
    background: var(--bg-color);
    padding: 20px;
    color: var(--text-color);
    transition: background-color 0.3s, color 0.3s;
}

.container {
    max-width: 600px;
    margin: 0 auto;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    gap: 10px;
    flex-wrap: wrap;
}

h1 {
    color: var(--text-color);
}

.header-buttons {
    display: flex;
    gap: 10px;
}

.admin-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
}

.input-section {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

input {
    flex: 1;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--card-bg);
    color: var(--text-color);
}

button {
    padding: 10px 20px;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

button:hover {
    background: #45a049;
}

.todo-list {
    list-style: none;
}

.todo-item {
    background: var(--card-bg);
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 4px;
    box-shadow: 0 2px 4px var(--shadow);
}

.todo-item.pending {
    border-left: 4px solid var(--pending-color);
}

.todo-item.approved {
    border-left: 4px solid #4CAF50;
}

.delete-btn {
    background: #f44336;
    padding: 5px 10px;
    font-size: 12px;
}

.delete-btn:hover {
    background: #da190b;
}

/* Admin Panel */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.close-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
}

.request-item {
    background: var(--card-bg);
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 4px;
    border-left: 4px solid var(--pending-color);
    border: 1px solid var(--border-color);
}

.request-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.approve-btn {
    background: #4CAF50;
}

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

.reject-btn {
    background: #f44336;
}

.reject-btn:hover {
    background: #da190b;
}

.no-requests {
    text-align: center;
    color: #999;
    padding: 20px;
}

/* Waiting Screen */
.waiting-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 2000;
}

.waiting-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.waiting-content {
    background: var(--card-bg);
    padding: 40px;
    border-radius: 8px;
    text-align: center;
    max-width: 400px;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #4CAF50;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.waiting-content h2 {
    color: var(--text-color);
    margin-bottom: 10px;
}

.waiting-content p {
    color: var(--text-color);
    margin-top: 15px;
}

/* Password Modal */
.password-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 1500;
}

.password-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.password-content {
    background: var(--card-bg);
    padding: 40px;
    border-radius: 8px;
    max-width: 400px;
    width: 90%;
}

.password-content h2 {
    color: var(--text-color);
    margin-bottom: 20px;
    text-align: center;
}

.password-content input {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 16px;
    margin-bottom: 15px;
    background: var(--card-bg);
    color: var(--text-color);
}

.password-content input:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 5px rgba(76, 175, 80, 0.3);
}

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

.password-actions button {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
}

.password-submit {
    background: #4CAF50;
    color: white;
}

.password-submit:hover {
    background: #45a049;
}

.password-cancel {
    background: #ddd;
    color: #333;
}

.password-cancel:hover {
    background: #ccc;
}

.password-error {
    color: #f44336;
    text-align: center;
    margin-bottom: 10px;
    font-size: 14px;
}

/* Admin Loading Screen */
.admin-loading-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 2500;
}

.admin-loading-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.admin-loading-content {
    background: var(--card-bg);
    padding: 40px;
    border-radius: 8px;
    text-align: center;
    max-width: 400px;
}

.admin-loading-content h2 {
    color: var(--text-color);
    margin-bottom: 10px;
}

.admin-loading-content p {
    color: var(--text-color);
    margin-top: 15px;
}

.loading-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #2196F3;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 0.8s linear infinite;
    margin: 20px auto;
}

/* Admin Settings */
.admin-settings {
    background: #f9f9f9;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
    border: 1px solid var(--border-color);
}

body.dark-mode .admin-settings {
    background: #333;
}

.settings-title {
    font-weight: bold;
    margin-bottom: 10px;
    color: var(--text-color);
}

.settings-group {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.settings-group input {
    flex: 1;
    padding: 8px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--card-bg);
    color: var(--text-color);
}

.settings-group button {
    padding: 8px 15px;
    background: #2196F3;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.settings-group button:hover {
    background: #1976D2;
}

.settings-message {
    margin-top: 10px;
    font-size: 12px;
    padding: 8px;
    border-radius: 4px;
    display: none;
}

.settings-message.success {
    background: #c8e6c9;
    color: #2e7d32;
    display: block;
}

.settings-message.error {
    background: #ffcdd2;
    color: #c62828;
    display: block;
}

.divider {
    border-top: 1px solid var(--border-color);
    margin: 15px 0;
}

/* Password Toggle */
.password-wrapper {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
}

.password-wrapper input {
    width: 100%;
    padding: 8px;
    padding-right: 35px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--card-bg);
    color: var(--text-color);
}

.toggle-password-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
    color: var(--text-color);
}

.toggle-password-btn:hover {
    opacity: 0.7;
}

/* Mehr Anzeigen Button */
.show-more-btn {
    background: none;
    border: none;
    color: #2196F3;
    cursor: pointer;
    font-size: 14px;
    padding: 5px 0;
    margin-top: 5px;
    text-decoration: underline;
}

.show-more-btn:hover {
    color: #1976D2;
}

.text-content {
    word-wrap: break-word;
}

/* Toast Notifications */
.error-toast, .success-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 4px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
    z-index: 9999;
    animation: slideIn 0.3s ease-out;
    color: white;
    font-weight: 500;
}

.error-toast {
    background: #f44336;
}

.success-toast {
    background: #4CAF50;
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

/* Bulk Delete Button */
.bulk-delete-btn {
    background: #f44336;
    color: white;
    padding: 10px 15px;
    margin-bottom: 15px;
    width: 100%;
}

.bulk-delete-btn:hover {
    background: #da190b;
}

/* Collapsible Settings */
.settings-toggle {
    display: flex;
    align-items: center;
    cursor: pointer;
    margin-bottom: 10px;
}

.settings-toggle-icon {
    margin-right: 8px;
}
