:root {
    --primary-color: #6c5ce7;
    --primary-light: #a29bfe;
    --secondary-color: #2d3436;
    --text-color: #333;
    --light-text: #666;
    --bg-color: #f5f6fa;
    --white: #ffffff;
    --border-color: #dfe6e9;
    --success-color: #00b894;
    --error-color: #d63031;
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --border-radius: 8px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.app-container {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
}

.content-container {
    background-color: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background-color: var(--primary-color);
    color: var(--white);
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 10px;
}

.category-filter select {
    padding: 8px 12px;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    background-color: var(--white);
    cursor: pointer;
    min-width: 150px;
}

main {
    padding: 20px;
}

.bonuses-section h2 {
    margin-bottom: 10px;
    color: var(--secondary-color);
}

.instructions {
    color: var(--light-text);
    margin-bottom: 20px;
    line-height: 1.5;
}

.user-info {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
}

.form-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.form-group label {
    font-weight: 500;
}

.required {
    color: var(--error-color);
}

input[type="text"],
input[type="email"],
input[type="password"],
textarea,
select {
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 1rem;
}

.bonuses-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.bonus-card {
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 20px;
    background-color: var(--white);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    position: relative;
}

.bonus-card h3 {
    margin-bottom: 10px;
    color: var(--secondary-color);
}

.bonus-card p {
    color: var(--light-text);
    margin-bottom: 15px;
    line-height: 1.4;
}

.bonus-card .category-tag {
    display: inline-block;
    background-color: var(--primary-light);
    color: var(--white);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    margin-bottom: 10px;
}

.bonus-action {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 15px;
}

.checkbox-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.custom-checkbox {
    width: 20px;
    height: 20px;
    border: 2px solid var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.custom-checkbox.checked {
    background-color: var(--primary-color);
    color: var(--white);
}

.custom-checkbox i {
    font-size: 0.8rem;
    display: none;
}

.custom-checkbox.checked i {
    display: block;
}

.register-btn {
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 8px 12px;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 0.9rem;
    text-decoration: none;
    display: inline-block;
}

.no-bonuses-message {
    text-align: center;
    color: var(--light-text);
    padding: 30px;
    display: none;
}

.action-button {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 12px 24px;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background-color 0.3s;
}

.btn-primary:hover {
    background-color: var(--primary-light);
}

/* Loading Spinner */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--white);
    animation: spin 1s ease-in-out infinite;
    margin-right: 8px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.btn-primary.loading {
    pointer-events: none;
    opacity: 0.8;
}

footer {
    padding: 15px 20px;
    background-color: var(--bg-color);
    text-align: right;
}

.admin-link a {
    color: var(--light-text);
    text-decoration: none;
    font-size: 0.9rem;
}

.admin-link a:hover {
    text-decoration: underline;
}

.footer-divider {
    margin: 0 10px;
    color: var(--light-text);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: var(--white);
    padding: 30px;
    border-radius: var(--border-radius);
    max-width: 500px;
    width: 100%;
    position: relative;
}

.close {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Admin Styles */
.admin-container {
    padding: 20px;
}

/* Database Management Styles */
.database-actions {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.action-card {
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 20px;
    background-color: var(--white);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.action-card h3 {
    margin-bottom: 10px;
    color: var(--secondary-color);
}

.action-card p {
    color: var(--light-text);
    margin-bottom: 15px;
    line-height: 1.4;
}

.action-card .form-group {
    margin-bottom: 15px;
}

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

.admin-tabs {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.admin-tab {
    padding: 10px 20px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
}

.admin-tab.active {
    border-bottom: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.admin-content {
    background-color: var(--white);
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--box-shadow);
}

.admin-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-width: 600px;
}

.admin-form .form-group {
    margin-bottom: 0;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.admin-table th, .admin-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.admin-table th {
    background-color: var(--bg-color);
}

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

.btn-edit, .btn-delete {
    padding: 6px 12px;
    border-radius: var(--border-radius);
    cursor: pointer;
    border: none;
}

.btn-edit {
    background-color: var(--primary-light);
    color: var(--white);
}

.btn-delete {
    background-color: var(--error-color);
    color: var(--white);
}

/* Responsive Styles */
@media (max-width: 768px) {
    .user-info {
        flex-direction: column;
    }
    
    .bonuses-list {
        grid-template-columns: 1fr;
    }
    
    header {
        flex-direction: column;
        gap: 15px;
    }
}
