* {
    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 100%);
    min-height: 100vh;
    color: #e0e0e0;
    padding: 20px;
}

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

h1 {
    text-align: center;
    color: #ffd700;
    margin-bottom: 30px;
    font-size: 2rem;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

h2 {
    color: #4fc3f7;
    margin-bottom: 20px;
    font-size: 1.3rem;
    border-bottom: 2px solid #4fc3f7;
    padding-bottom: 10px;
}

.form-section {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.form-group {
    margin-bottom: 20px;
}

.form-group:last-child {
    margin-bottom: 0;
}

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

.field-header label:first-child {
    margin-bottom: 0;
}

.include-label {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #607d8b;
    font-size: 0.85rem;
    font-weight: 400;
    cursor: pointer;
    margin-bottom: 0;
}

.include-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #4fc3f7;
}

.checkbox-group.standalone {
    display: flex;
    align-items: center;
}

.checkbox-group.standalone input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-right: 8px;
}

.form-row {
    display: flex;
    gap: 20px;
}

.form-row .form-group {
    flex: 1;
}

label {
    display: block;
    margin-bottom: 8px;
    color: #b0bec5;
    font-weight: 500;
}

input[type="text"],
input[type="number"],
input[type="date"],
select,
textarea {
    width: 100%;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: #e0e0e0;
    font-size: 1rem;
    transition: all 0.3s ease;
}

input[type="text"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #4fc3f7;
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 0 15px rgba(79, 195, 247, 0.2);
}

input::placeholder,
textarea::placeholder {
    color: #607d8b;
}

select {
    cursor: pointer;
}

select option {
    background: #1a1a2e;
    color: #e0e0e0;
}

textarea {
    min-height: 80px;
    resize: vertical;
}

input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(1);
    cursor: pointer;
}

.time-input-group {
    display: flex;
    gap: 10px;
    align-items: center;
}

.time-input-group .input-with-btn {
    flex: 1;
}

.select-wrapper {
    position: relative;
    min-width: 80px;
}

.select-trigger {
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: #e0e0e0;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
}

.select-trigger:hover {
    border-color: #4fc3f7;
    background: rgba(255, 255, 255, 0.12);
}

.select-trigger:after {
    content: '▼';
    font-size: 0.7rem;
    margin-left: 8px;
    opacity: 0.6;
}

.select-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #1a1a2e;
    border: 1px solid rgba(79, 195, 247, 0.5);
    border-radius: 8px;
    margin-top: 4px;
    display: none;
    z-index: 1000;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
}

.select-dropdown.active {
    display: block;
}

.select-item {
    padding: 10px 15px;
    cursor: pointer;
    transition: background 0.2s ease;
    color: #e0e0e0;
}

.select-item:hover {
    background: rgba(79, 195, 247, 0.2);
}

.time-input-group input {
    flex: 1;
}

.time-input-group select {
    width: auto;
    min-width: 80px;
}

.checkbox-group {
    display: flex;
    align-items: center;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    margin-bottom: 0;
}

input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #4fc3f7;
}

.input-with-dropdown {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.input-with-btn {
    display: flex;
    gap: 8px;
    align-items: center;
}

.input-with-btn input,
.input-with-btn textarea {
    flex: 1;
}

.btn-clear {
    padding: 12px;
    background: rgba(255, 82, 82, 0.2);
    border: 1px solid rgba(255, 82, 82, 0.3);
    border-radius: 8px;
    color: #ff5252;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.btn-clear:hover {
    background: rgba(255, 82, 82, 0.3);
    border-color: #ff5252;
}

.textarea-wrapper {
    align-items: flex-start;
}

.textarea-clear {
    margin-top: 0;
}

.combobox-wrapper {
    position: relative;
    width: 100%;
}

.combobox-dropdown {
    background: #1a1a2e;
    border: 1px solid rgba(79, 195, 247, 0.5);
    border-radius: 8px;
    margin-top: 4px;
    max-height: 200px;
    overflow-y: auto;
    display: none;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
}

.combobox-dropdown.active {
    display: block;
}

.combobox-item {
    padding: 10px 15px;
    cursor: pointer;
    transition: background 0.2s ease;
    color: #e0e0e0;
}

.combobox-item:hover {
    background: rgba(79, 195, 247, 0.2);
}

.btn-manage {
    align-self: flex-start;
    padding: 8px 16px;
    background: transparent;
    border: 1px solid #607d8b;
    color: #607d8b;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    margin-top: 8px;
}

.btn-manage:hover {
    background: rgba(96, 125, 139, 0.2);
    border-color: #4fc3f7;
    color: #4fc3f7;
}

.output-section {
    margin-top: 40px;
}

.output-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

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

.output-header h3 {
    color: #ffd700;
    font-size: 1.1rem;
}

.btn-copy {
    padding: 10px 20px;
    background: linear-gradient(135deg, #4fc3f7 0%, #29b6f6 100%);
    border: none;
    border-radius: 8px;
    color: #1a1a2e;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-copy:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(79, 195, 247, 0.4);
}

.btn-copy:active {
    transform: translateY(0);
}

.output-content {
    background: rgba(0, 0, 0, 0.3);
    padding: 20px;
    border-radius: 8px;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.9rem;
    line-height: 1.6;
    white-space: pre-wrap;
    word-wrap: break-word;
    max-height: 300px;
    overflow-y: auto;
    color: #a5d6a7;
}

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

.modal.active {
    display: flex;
}

.modal-content {
    background: #16213e;
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-header h3 {
    color: #ffd700;
}

.btn-close {
    background: none;
    border: none;
    color: #e0e0e0;
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.3s ease;
}

.btn-close:hover {
    color: #ff5252;
}

.modal-body {
    padding: 20px;
    max-height: 60vh;
    overflow-y: auto;
}

.add-form {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.add-form input {
    flex: 1;
}

.btn-add {
    padding: 12px 20px;
    background: linear-gradient(135deg, #66bb6a 0%, #43a047 100%);
    border: none;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-add:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 187, 106, 0.4);
}

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

.items-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    margin-bottom: 10px;
    transition: background 0.3s ease;
}

.items-list li:hover {
    background: rgba(255, 255, 255, 0.1);
}

.items-list li span {
    color: #e0e0e0;
}

.items-list li .actions {
    display: flex;
    gap: 8px;
}

.btn-edit,
.btn-delete {
    padding: 5px 12px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.3s ease;
}

.btn-edit {
    background: rgba(255, 215, 0, 0.2);
    color: #ffd700;
}

.btn-edit:hover {
    background: rgba(255, 215, 0, 0.3);
}

.btn-delete {
    background: rgba(255, 82, 82, 0.2);
    color: #ff5252;
}

.btn-delete:hover {
    background: rgba(255, 82, 82, 0.3);
}

.output-content::-webkit-scrollbar,
.modal-body::-webkit-scrollbar {
    width: 8px;
}

.output-content::-webkit-scrollbar-track,
.modal-body::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.output-content::-webkit-scrollbar-thumb,
.modal-body::-webkit-scrollbar-thumb {
    background: rgba(79, 195, 247, 0.5);
    border-radius: 4px;
}

.output-content::-webkit-scrollbar-thumb:hover,
.modal-body::-webkit-scrollbar-thumb:hover {
    background: rgba(79, 195, 247, 0.7);
}

@media (max-width: 600px) {
    .form-row {
        flex-direction: column;
    }
    
    .output-header {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
    
    .btn-copy {
        width: 100%;
    }
}

.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: linear-gradient(135deg, #66bb6a 0%, #43a047 100%);
    color: white;
    padding: 15px 30px;
    border-radius: 10px;
    font-weight: 600;
    box-shadow: 0 5px 20px rgba(102, 187, 106, 0.4);
    transition: transform 0.3s ease;
    z-index: 99999;
}

.toast.active {
    transform: translateX(-50%) translateY(0);
}