
.account-container {
    min-height: 80vh;
    display: flex;
    gap: 2rem;
    padding: 2rem 1rem;
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
}


.template-editor-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: var(--bg-color);
    border-radius: 20px;
    overflow: hidden;
}

.template-title-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.template-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-color);
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(58, 134, 255, 0.3);
    border-radius: 15px;
    padding: 1rem 1.5rem;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.template-title:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 30px rgba(58, 134, 255, 0.3);
}

.template-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
}

.template-author {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(58, 134, 255, 0.3);
    border-radius: 10px;
    padding: 0.5rem 1rem;
    color: var(--text-color);
}

.template-code-display {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.template-preview-section {
    background: rgba(30, 30, 30, 0.8);
    border: 1px solid rgba(58, 134, 255, 0.3);
    border-radius: 15px;
    padding: 1.5rem;
    margin-top: 1rem;
    backdrop-filter: blur(10px);
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(58, 134, 255, 0.3);
}

.preview-header h3 {
    color: var(--text-color);
    font-size: 1.2rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.preview-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.preview-code {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.preview-code label {
    color: var(--text-color);
    font-weight: 500;
}

#editCommandsList {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-height: 400px;
    overflow-y: auto;
}

.command-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.8rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(58, 134, 255, 0.2);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.command-item:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(58, 134, 255, 0.4);
}

.command-item.active {
    background: rgba(58, 134, 255, 0.2);
    border-color: var(--primary-color);
}

.command-item-info {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.command-item-name {
    font-weight: 600;
    color: var(--text-color);
}

.command-item-tag {
    font-size: 0.85rem;
    color: var(--secondary-color);
    font-family: 'Courier New', monospace;
}

.command-item-order {
    background: rgba(58, 134, 255, 0.3);
    color: var(--text-color);
    padding: 0.2rem 0.5rem;
    border-radius: 5px;
    font-size: 0.8rem;
    font-weight: 600;
}

.command-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.template-card {
    background: rgba(30, 30, 30, 0.8);
    border: 1px solid rgba(58, 134, 255, 0.3);
    border-radius: 15px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.template-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(58, 134, 255, 0.3);
    border-color: var(--primary-color);
}

.template-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg,
        rgba(58, 134, 255, 0.1),
        rgba(138, 43, 226, 0.1)
    );
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.template-card:hover::before {
    opacity: 1;
}

.template-card > * {
    position: relative;
    z-index: 2;
}


@media (max-width: 768px) {
    .template-editor-container {
        padding: 1rem;
    }

    .template-meta {
        flex-direction: column;
        align-items: stretch;
    }

    .template-preview-section {
        padding: 1rem;
    }

    .preview-header {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }

    .command-item {
        padding: 0.6rem;
    }

    .command-actions {
        flex-direction: column;
        gap: 0.3rem;
    }
}


.account-sidebar {
    width: 350px;
    background: linear-gradient(135deg, rgba(30, 30, 30, 0.95), rgba(20, 20, 20, 0.95));
    border: 1px solid rgba(58, 134, 255, 0.4);
    border-radius: 20px;
    padding: 2.5rem;
    height: fit-content;
    position: sticky;
    top: 2rem;
    backdrop-filter: blur(10px);
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.6),
        0 0 100px rgba(58, 134, 255, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.user-profile {
    text-align: center;
    margin-bottom: 2.5rem;
    padding-bottom: 2.5rem;
    border-bottom: 2px solid rgba(58, 134, 255, 0.3);
    position: relative;
}

.user-profile::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
}

.user-avatar {
    margin-bottom: 1.5rem;
    position: relative;
}

.user-avatar::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, rgba(58, 134, 255, 0.3), transparent);
    border-radius: 50%;
    z-index: 0;
}

.user-avatar i {
    font-size: 5rem;
    color: #4a90e2;
    text-shadow: 0 0 30px rgba(58, 134, 255, 0.8);
    position: relative;
    z-index: 1;
}

.user-profile h3 {
    font-family: 'Orbitron', monospace;
    color: #ffffff;
    margin-bottom: 0.5rem;
    font-size: 1.4rem;
    font-weight: 600;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.7);
}

.user-profile p {
    color: #f0f0f0;
    font-size: 0.95rem;
    margin-bottom: 1.2rem;
    font-weight: 400;
}

.user-status {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.7rem 1.2rem;
    border-radius: 25px;
    font-size: 0.85rem;
    font-weight: 600;
    font-family: 'Orbitron', monospace;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.user-status::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 2s ease;
}

.user-status:hover::before {
    left: 100%;
}

.user-status.verified {
    background: rgba(76, 175, 80, 0.35);
    color: #66bb6a;
    border: 1px solid rgba(76, 175, 80, 0.5);
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

.user-status.verified i {
    text-shadow: 0 0 10px rgba(76, 175, 80, 0.8);
}

.user-status.pending {
    background: rgba(255, 167, 38, 0.35);
    color: #ffb74d;
    border: 1px solid rgba(255, 167, 38, 0.5);
    box-shadow: 0 4px 15px rgba(255, 167, 38, 0.3);
}

.user-status.pending i {
    text-shadow: 0 0 10px rgba(255, 167, 38, 0.8);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}


.account-nav {
    margin-bottom: 2rem;
}

.account-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.account-nav li {
    position: relative;
}

.account-nav a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.2rem 1.5rem;
    color: #f0f0f0;
    text-decoration: none;
    border-radius: 15px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    font-weight: 500;
    font-size: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(5px);
}

.account-nav a::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 15px;
    background: linear-gradient(135deg,
        rgba(58, 134, 255, 0.15),
        rgba(138, 43, 226, 0.15)
    );
    opacity: 0;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: -1;
}

.account-nav a:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(58, 134, 255, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(58, 134, 255, 0.2);
}

.account-nav a:hover::before {
    opacity: 1;
}

.account-nav li.active a {
    color: #ffffff;
    background: rgba(58, 134, 255, 0.2);
    border: 1px solid rgba(58, 134, 255, 0.5);
    box-shadow: 0 8px 25px rgba(58, 134, 255, 0.25);
}

.account-nav li.active a::before {
    opacity: 1;
}

.account-nav a .count {
    background: rgba(58, 134, 255, 0.3);
    color: #ffffff;
    padding: 0.3rem 0.8rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    min-width: 24px;
    text-align: center;
}

.account-nav li.active a .count {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

.account-nav i {
    font-size: 1.2rem;
    margin-right: 0.8rem;
    color: inherit;
}

.account-nav .nav-text {
    flex-grow: 1;
    text-align: left;
    font-size: 1rem;
    font-weight: 500;
}


.account-actions {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
}

.account-actions::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(58, 134, 255, 0.5), transparent);
}

.account-actions .btn {
    width: 100%;
    padding: 1rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: rgba(244, 67, 54, 0.2);
    color: #ffffff;
    border: 1px solid rgba(244, 67, 54, 0.4);
}

.account-actions .btn:hover {
    background: rgba(244, 67, 54, 0.3);
    border-color: rgba(244, 67, 54, 0.6);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(244, 67, 54, 0.3);
}

.account-actions .btn i {
    font-size: 1.1rem;
}


.account-content {
    flex: 1;
    background: rgba(40, 40, 40, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 2.5rem;
    min-height: 600px;
    backdrop-filter: blur(10px);
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.tab-content {
    display: none;
    animation: fadeInUp 0.5s ease-out;
}

.tab-content.active {
    display: block;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tab-header {
    margin-bottom: 2.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.tab-header h2 {
    font-family: 'Orbitron', monospace;
    color: #ffffff;
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.tab-header p {
    color: #e0e0e0;
    margin-bottom: 1rem;
    font-size: 1rem;
}

.settings-sections {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.settings-card {
    background: rgba(50, 50, 50, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 15px;
    padding: 2rem;
    backdrop-filter: blur(10px);
}

.settings-card.danger {
    border-color: rgba(244, 67, 54, 0.4);
    background: rgba(244, 67, 54, 0.1);
}

.settings-card h3 {
    color: #ffffff;
    font-family: 'Orbitron', monospace;
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.settings-card.danger h3 {
    color: #ff6b6b;
}

.settings-card i {
    color: #4a90e2;
}

.settings-card.danger i {
    color: #ff6b6b;
}

.settings-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-row {
    display: flex;
    gap: 1.5rem;
}

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

.form-group label {
    color: #ffffff !important;
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.form-group input {
    padding: 1rem;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    background: rgba(60, 60, 60, 0.9);
    color: #ffffff;
    font-size: 1rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.form-group input:focus {
    outline: none;
    border-color: #4a90e2;
    background: rgba(70, 70, 70, 0.95);
    box-shadow: 0 0 0 3px rgba(58, 134, 255, 0.2);
    transform: translateY(-1px);
}

.form-group input::placeholder {
    color: #b0b0b0;
}


.password-input {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input input {
    padding-right: 50px;
    flex: 1;
}

.password-toggle {
    position: absolute;
    right: 15px;
    background: none;
    border: none;
    color: #e0e0e0;
    cursor: pointer;
    font-size: 1rem;
    padding: 0;
    transition: color 0.3s ease;
}

.password-toggle:hover {
    color: #4a90e2;
}


.info-box {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background: rgba(58, 134, 255, 0.1);
    border: 1px solid rgba(58, 134, 255, 0.3);
    border-radius: 12px;
    color: #4a90e2;
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.info-box i {
    font-size: 1.2rem;
    color: #4a90e2;
    flex-shrink: 0;
}

.info-box span {
    line-height: 1.4;
}


.btn {
    padding: 1rem 2rem;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    text-align: center;
    justify-content: center;
    min-width: 120px;
}

.btn.primary {
    background: linear-gradient(135deg, #4a90e2, #357abd);
    color: #ffffff;
    border: 1px solid #4a90e2;
    box-shadow: 0 4px 15px rgba(74, 144, 226, 0.3);
}

.btn.primary:hover {
    background: linear-gradient(135deg, #357abd, #2968a3);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(74, 144, 226, 0.4);
}

.btn.secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn.secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

.btn.danger {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: #ffffff;
    border: 1px solid #e74c3c;
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
}

.btn.danger:hover {
    background: linear-gradient(135deg, #c0392b, #a93226);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(231, 76, 60, 0.4);
}


.danger-actions {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(244, 67, 54, 0.3);
}

.settings-card.danger p {
    color: #ffcccb;
    margin-bottom: 1rem;
}


.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.content-card {
    background: rgba(50, 50, 50, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    padding: 1.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.content-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #4a90e2, #8a2be2);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.content-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(58, 134, 255, 0.25);
    border-color: #4a90e2;
    background: rgba(60, 60, 60, 0.9);
}

.content-card:hover::before {
    opacity: 1;
}

.card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.card-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: #ffffff;
}

.card-title i {
    color: #4a90e2;
    font-size: 1.5rem;
}

.card-actions {
    display: flex;
    gap: 0.5rem;
}

.card-btn {
    padding: 0.5rem;
    border: none;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    min-width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-btn:hover {
    background: var(--primary);
    color: white;
    transform: scale(1.1);
}

.card-btn.danger:hover {
    background: #ff4757;
}

.card-btn.success:hover {
    background: #2ed573;
}

.card-description {
    color: #d0d0d0;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.card-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #d0d0d0;
    font-size: 0.85rem;
}

.meta-item i {
    color: #4a90e2;
    font-size: 0.9rem;
}

.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.tag {
    background: rgba(58, 134, 255, 0.15);
    color: var(--primary);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid rgba(58, 134, 255, 0.3);
}

.card-status {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.status-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.status-badge.public {
    background: rgba(46, 213, 115, 0.15);
    color: #2ed573;
    border: 1px solid rgba(46, 213, 115, 0.3);
}

.status-badge.private {
    background: rgba(255, 193, 7, 0.15);
    color: #ffa502;
    border: 1px solid rgba(255, 193, 7, 0.3);
}

.status-badge.active {
    background: rgba(46, 213, 115, 0.15);
    color: #2ed573;
    border: 1px solid rgba(46, 213, 115, 0.3);
}

.status-badge.inactive {
    background: rgba(255, 107, 107, 0.15);
    color: #ff6b6b;
    border: 1px solid rgba(255, 107, 107, 0.3);
}

.toggle-switch {
    position: relative;
    width: 44px;
    height: 24px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.toggle-switch.active {
    background: var(--primary-color);
}

.toggle-switch::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    transition: transform 0.3s ease;
}

.toggle-switch.active::after {
    transform: translateX(20px);
}


.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-secondary);
    grid-column: 1 / -1;
}

.empty-state i {
    font-size: 4rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
    opacity: 0.6;
}

.empty-state h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.empty-state p {
    font-size: 1rem;
    margin-bottom: 2rem;
}


.content-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.content-actions .btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}


.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: linear-gradient(135deg, rgba(20, 20, 20, 0.95), rgba(30, 30, 30, 0.95));
    border: 1px solid rgba(58, 134, 255, 0.3);
    border-radius: 20px;
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal.active .modal-content {
    transform: scale(1);
}

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

.modal-header h3 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0;
    font-size: 1.5rem;
    color: var(--text-color);
}

.modal-header i {
    color: var(--primary);
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: rgba(255, 107, 107, 0.15);
    color: #ff6b6b;
}

.modal-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-actions .btn {
    flex: 1;
    max-width: 200px;
    padding: 0.8rem 1.5rem;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.modal-actions .btn.secondary {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-secondary);
}

.modal-actions .btn.secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary-color);
    color: var(--text-primary);
}


@media (max-width: 1024px) {
    .account-container {
        flex-direction: column;
        gap: 2rem;
        padding: 1.5rem 1rem;
    }

    .account-sidebar {
        width: 100%;
        position: static;
        padding: 2rem;
    }

    .user-profile {
        display: flex;
        flex-direction: row;
        gap: 1.5rem;
        align-items: center;
        text-align: left;
        padding-bottom: 2rem;
    }

    .user-avatar {
        margin-bottom: 0;
        flex-shrink: 0;
    }

    .user-avatar i {
        font-size: 4rem;
    }

    .user-info {
        flex: 1;
    }

    .account-nav ul {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 1rem;
    }

    .account-nav a {
        padding: 1rem 1.25rem;
    }

    .account-actions {
        margin-top: 2rem;
        padding-top: 2rem;
    }
}

@media (max-width: 768px) {
    .account-container {
        padding: 1rem;
    }

    .account-sidebar,
    .account-content {
        padding: 1.5rem;
    }

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

    .form-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .content-grid {
        grid-template-columns: 1fr;
    }

    .user-profile {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .account-nav ul {
        flex-direction: column;
    }

    .modal-content {
        margin: 1rem;
        padding: 1.5rem;
    }

    .modal-actions {
        flex-direction: column;
    }
}


.code-display {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.code-display input {
    flex: 1;
    font-family: 'Courier New', monospace;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(58, 134, 255, 0.3);
    color: var(--primary);
    font-weight: 600;
    letter-spacing: 1px;
}

.code-display input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(58, 134, 255, 0.2);
}


.form-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #ffffff !important;
}

.form-group label i {
    color: var(--primary);
    width: 16px;
    text-align: center;
}

.form-group small {
    display: block;
    margin-top: 0.5rem;
    color: #d0d0d0;
    font-size: 0.85rem;
    line-height: 1.4;
}


.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, rgba(20, 20, 20, 0.95), rgba(30, 30, 30, 0.95));
    border: 1px solid rgba(58, 134, 255, 0.3);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    color: var(--text-color);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    transform: translateX(400px);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 2000;
    max-width: 350px;
}

.notification.show {
    transform: translateX(0);
}

.notification.success {
    border-color: rgba(46, 213, 115, 0.5);
}

.notification.error {
    border-color: rgba(255, 107, 107, 0.5);
}

.notification.info {
    border-color: rgba(58, 134, 255, 0.5);
}

.notification .notification-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.notification .notification-icon {
    font-size: 1.2rem;
}

.notification.success .notification-icon {
    color: #2ed573;
}

.notification.error .notification-icon {
    color: #ff6b6b;
}

.notification.info .notification-icon {
    color: var(--primary);
}

.notification .notification-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 1.2rem;
    margin-left: auto;
    padding: 0.25rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.notification .notification-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-color);
}


.lorebook-card, .plugin-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.lorebook-card:hover, .plugin-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(109, 40, 217, 0.2);
    border-color: rgba(109, 40, 217, 0.3);
}

.card-badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 1px solid transparent;
}

.badge.public {
    background: rgba(46, 160, 67, 0.2);
    color: #2ea043;
    border-color: rgba(46, 160, 67, 0.3);
}

.badge.private {
    background: rgba(255, 159, 67, 0.2);
    color: #ff9f43;
    border-color: rgba(255, 159, 67, 0.3);
}

.badge.active {
    background: rgba(109, 40, 217, 0.2);
    color: var(--primary);
    border-color: rgba(109, 40, 217, 0.3);
}

.badge.inactive {
    background: rgba(108, 117, 125, 0.2);
    color: #b0b0b0;
    border-color: rgba(108, 117, 125, 0.3);
}

.badge.entries {
    background: rgba(58, 134, 255, 0.2);
    color: #3a86ff;
    border-color: rgba(58, 134, 255, 0.3);
}

.badge.badge-success {
    background: rgba(76, 175, 80, 0.2);
    color: #4CAF50;
    border: 1px solid rgba(76, 175, 80, 0.3);
}

.badge.badge-info {
    background: rgba(33, 150, 243, 0.2);
    color: #2196F3;
    border: 1px solid rgba(33, 150, 243, 0.3);
}

.badge.badge-primary {
    background: rgba(138, 43, 226, 0.2);
    color: #8a2be2;
    border: 1px solid rgba(138, 43, 226, 0.3);
}

.badge.badge-secondary {
    background: rgba(108, 117, 125, 0.2);
    color: #b0b0b0;
    border: 1px solid rgba(108, 117, 125, 0.3);
}

.badge.badge-light {
    background: rgba(248, 249, 250, 0.1);
    color: #f8f9fa;
    border: 1px solid rgba(248, 249, 250, 0.2);
}

.badge.badge-warning {
    background: rgba(255, 193, 7, 0.2);
    color: #ffc107;
    border: 1px solid rgba(255, 193, 7, 0.3);
}

.badge.coming-soon {
    background: rgba(255, 152, 0, 0.2);
    color: #ff9800;
    border: 1px solid rgba(255, 152, 0, 0.3);
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
    border-radius: 8px;
    font-weight: 500;
    animation: comingSoonGlow 2s ease-in-out infinite alternate;
}

@keyframes comingSoonGlow {
    0% {
        box-shadow: 0 0 5px rgba(255, 152, 0, 0.3);
    }
    100% {
        box-shadow: 0 0 15px rgba(255, 152, 0, 0.6);
    }
}

.badge.new {
    background: rgba(76, 175, 80, 0.2);
    color: #4caf50;
    border: 1px solid rgba(76, 175, 80, 0.3);
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
    border-radius: 8px;
    font-weight: 500;
    animation: newBadgeGlow 2s ease-in-out infinite alternate;
}

@keyframes newBadgeGlow {
    0% {
        box-shadow: 0 0 5px rgba(76, 175, 80, 0.3);
    }
    100% {
        box-shadow: 0 0 15px rgba(76, 175, 80, 0.6);
    }
}


.card-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 12px 0;
}

.card-btn.warning {
    background: rgba(255, 193, 7, 0.2);
    color: #ffc107;
    border: 1px solid rgba(255, 193, 7, 0.3);
}

.card-btn.warning:hover {
    background: rgba(255, 193, 7, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 193, 7, 0.15);
}

.card-meta {
    display: flex;
    gap: 16px;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 12px;
}

.card-meta i {
    margin-right: 6px;
    color: var(--primary);
}

.card-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.card-actions .btn {
    padding: 8px 16px;
    font-size: 0.85rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}


.filter-controls {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
    align-items: center;
    flex-wrap: wrap;
    padding: 16px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.filter-group, .search-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-group label {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    font-weight: 500;
}

.search-group {
    position: relative;
    flex: 1;
    min-width: 250px;
}

.search-group i {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.4);
    pointer-events: none;
}

.search-group input {
    padding-right: 40px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
}


.loading-state, .empty-state {
    text-align: center;
    padding: 60px 20px;
    color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.02);
    border-radius: 16px;
    border: 2px dashed rgba(255, 255, 255, 0.1);
}

.loading-state i, .empty-state i {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 16px;
    display: block;
}

.loading-state i {
    animation: spin 1s linear infinite;
}

.empty-state h3 {
    color: var(--text-color);
    font-size: 1.2rem;
    margin-bottom: 8px;
    font-weight: 600;
}

.empty-state p {
    font-size: 0.95rem;
    line-height: 1.5;
    max-width: 400px;
    margin: 0 auto;
}


.share-code-container {
    display: flex;
    gap: 10px;
    margin: 16px 0;
    padding: 16px;
    background: rgba(109, 40, 217, 0.1);
    border-radius: 12px;
    border: 1px solid rgba(109, 40, 217, 0.2);
    position: relative;
}

.share-code-container::before {
    content: '';
    position: absolute;
    top: -1px;
    left: -1px;
    right: -1px;
    bottom: -1px;
    background: linear-gradient(45deg, var(--primary), #6c5ce7);
    border-radius: 12px;
    z-index: -1;
    opacity: 0.5;
}

.share-code-container input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-color);
    font-family: 'Courier New', monospace;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    letter-spacing: 1px;
}

.share-code-container input:focus {
    outline: none;
}

.share-code-container .btn {
    padding: 8px 16px;
    font-size: 0.85rem;
    background: var(--primary);
    border: none;
}

.share-code-container .btn:hover {
    background: #8b5cf6;
    transform: translateY(-1px);
}


.import-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

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

.import-form .form-control {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-color);
    padding: 12px 16px;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    letter-spacing: 0.5px;
}

.import-form .form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(109, 40, 217, 0.1);
}


.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

@media (max-width: 768px) {
    .content-grid {
        grid-template-columns: 1fr;
    }

    .filter-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .search-group {
        min-width: unset;
    }

    .card-actions {
        flex-direction: column;
    }

    .card-actions .btn {
        justify-content: center;
    }

    .share-code-container {
        flex-direction: column;
    }
}

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


.bug-report-section {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.bug-report-form .form-group textarea {
    background: rgba(60, 60, 60, 0.9);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 1rem;
    color: #ffffff;
    font-family: inherit;
    font-size: 0.95rem;
    line-height: 1.5;
    resize: vertical;
    min-height: 100px;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.bug-report-form .form-group textarea:focus {
    outline: none;
    border-color: #4a90e2;
    box-shadow: 0 0 0 3px rgba(58, 134, 255, 0.2);
    background: rgba(70, 70, 70, 0.95);
}

.bug-report-form .form-group textarea::placeholder {
    color: #b0b0b0;
    line-height: 1.4;
}

.bug-report-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(58, 134, 255, 0.2);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.bug-report-item:hover {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(58, 134, 255, 0.3);
}

.bug-report-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.bug-report-title {
    font-family: 'Orbitron', monospace;
    font-size: 1.1rem;
    color: #4a90e2;
    font-weight: 600;
    margin: 0;
}

.bug-report-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-weight: 500;
}

.bug-report-status.pending {
    background: rgba(255, 193, 7, 0.2);
    color: #ffc107;
    border: 1px solid rgba(255, 193, 7, 0.3);
}

.bug-report-status.responded {
    background: rgba(40, 167, 69, 0.2);
    color: #28a745;
    border: 1px solid rgba(40, 167, 69, 0.3);
}

.bug-report-status.closed {
    background: rgba(108, 117, 125, 0.2);
    color: #b0b0b0;
    border: 1px solid rgba(108, 117, 125, 0.3);
}

.bug-report-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.bug-meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #d0d0d0;
    font-size: 0.85rem;
}

.bug-meta-item i {
    color: #4a90e2;
    font-size: 0.9rem;
}

.bug-meta-item strong {
    color: #ffffff;
}

.bug-report-description {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
    border-left: 3px solid var(--primary-color);
}

.bug-report-description p {
    margin: 0;
    color: var(--text-secondary);
    line-height: 1.6;
    white-space: pre-wrap;
}

.bug-report-response {
    background: rgba(40, 167, 69, 0.1);
    border: 1px solid rgba(40, 167, 69, 0.3);
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1rem;
}

.bug-response-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
    color: #28a745;
}

.bug-response-content {
    color: var(--text-secondary);
    line-height: 1.6;
    white-space: pre-wrap;
}

.bug-report-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.bug-report-actions .btn {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}


#bugReportForm input[type="datetime-local"] {
    background: rgba(60, 60, 60, 0.9);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 1rem;
    color: #ffffff;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

#bugReportForm input[type="datetime-local"]:focus {
    outline: none;
    border-color: #4a90e2;
    box-shadow: 0 0 0 3px rgba(58, 134, 255, 0.2);
    background: rgba(70, 70, 70, 0.95);
}


@media (max-width: 768px) {
    .bug-report-header {
        flex-direction: column;
        align-items: stretch;
    }

    .bug-report-meta {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .bug-report-actions {
        flex-direction: column;
    }

    .bug-report-actions .btn {
        width: 100%;
        justify-content: center;
    }
}


.modal.large .modal-content {
    width: 90%;
    max-width: 1000px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal.large .modal-form {
    max-height: calc(90vh - 120px);
    overflow-y: auto;
}


#editLorebookContent,
#editPluginContent {
    font-family: 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.4;
    resize: vertical;
    min-height: 300px;
}


:root {
    --input-bg: #f8f9fa;
    --hover-bg: #f1f3f4;
    --card-bg: #ffffff;
    --bg-color: #fafafa;
    --text-color: #333333;
    --text-secondary: #666666;
    --border-color: #e1e5e9;
    --primary-color: #7b61ff;
}

[data-theme="dark"] {
    --input-bg: #2d3748;
    --hover-bg: #4a5568;
    --card-bg: #2d3748;
    --bg-color: #1a202c;
    --text-color: #ffffff;
    --text-secondary: #a0aec0;
    --border-color: #4a5568;
    --primary-color: #9f7aea;
}


.lorebook-editor-container input,
.lorebook-editor-container select,
.lorebook-editor-container textarea,
.plugin-editor-container input,
.plugin-editor-container select,
.plugin-editor-container textarea {
    width: 100%;
    padding: 0.75rem;
    background: var(--input-bg) !important;
    border: 2px solid var(--border-color) !important;
    border-radius: 8px;
    color: var(--text-color) !important;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.lorebook-editor-container input:focus,
.lorebook-editor-container select:focus,
.lorebook-editor-container textarea:focus,
.plugin-editor-container input:focus,
.plugin-editor-container select:focus,
.plugin-editor-container textarea:focus {
    outline: none !important;
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 3px rgba(123, 97, 255, 0.1) !important;
    background: var(--input-bg) !important;
}


.lorebook-title {
    font-size: 1.5rem !important;
    font-weight: 600 !important;
    color: var(--text-color) !important;
    background: transparent !important;
    border: none !important;
    border-bottom: 2px solid var(--border-color) !important;
    border-radius: 0 !important;
    padding: 0.5rem 0 !important;
    width: 100% !important;
    margin-bottom: 1rem !important;
    transition: border-color 0.3s ease !important;
}

.lorebook-title:focus {
    outline: none !important;
    border-bottom-color: var(--primary-color) !important;
    box-shadow: none !important;
}


.meta-item input,
.meta-item select {
    background: var(--input-bg) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 6px !important;
    padding: 0.4rem 0.8rem !important;
    color: var(--text-color) !important;
    font-size: 0.9rem !important;
    min-width: 120px;
}

.meta-item input:focus,
.meta-item select:focus {
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 2px rgba(123, 97, 255, 0.1) !important;
}


.lorebook-editor-container textarea,
.plugin-editor-container textarea {
    resize: vertical;
    min-height: 100px;
    line-height: 1.5;
}

#editEntryContent {
    min-height: 200px !important;
}

#editActionPool {
    min-height: 150px !important;
}

#editAdvancedJSON {
    min-height: 300px !important;
    font-family: 'Courier New', monospace !important;
    font-size: 0.9rem !important;
}


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

.editor-form .form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #ffffff !important;
    font-weight: 500;
    font-size: 0.95rem;
}

.editor-form .form-group small {
    display: block;
    margin-top: 0.5rem;
    color: #d0d0d0;
    font-size: 0.85rem;
    line-height: 1.4;
}


.checkbox-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    user-select: none;
}

.checkbox-container input[type="checkbox"] {
    width: auto !important;
    margin: 0 !important;
    padding: 0 !important;
}

.checkmark {
    position: relative;
    height: 20px;
    width: 20px;
    background-color: var(--input-bg);
    border: 2px solid var(--border-color);
    border-radius: 4px;
    transition: all 0.3s ease;
}

.checkbox-container input:checked ~ .checkmark {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 6px;
    top: 2px;
    width: 6px;
    height: 12px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-container input:checked ~ .checkmark:after {
    display: block;
}


.editor-actions .btn,
.entry-actions .btn,
.sidebar-header .btn {
    padding: 0.6rem 1.2rem;
    border: none;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

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

.btn.primary:hover {
    background: #6c52ee;
    transform: translateY(-1px);
}

.btn.secondary {
    background: var(--border-color);
    color: var(--text-color);
}

.btn.secondary:hover {
    background: var(--hover-bg);
}

.btn.danger {
    background: #e53e3e;
    color: white;
}

.btn.danger:hover {
    background: #c53030;
}

.btn.small {
    padding: 0.4rem 0.8rem;
    font-size: 0.9rem;
}


.empty-entries {
    padding: 2rem;
    text-align: center;
    color: var(--text-secondary);
    font-style: italic;
}


.entry-preview {
    width: 100%;
}

.entry-title {
    font-weight: 500;
    color: var(--text-color);
    margin-bottom: 0.25rem;
}

.entry-meta {
    font-size: 0.8rem;
    color: var(--text-secondary);
}


.tooltip {
    position: relative;
    display: inline-block;
    margin-left: 0.5rem;
    cursor: help;
}

.tooltip .tooltip-text {
    visibility: hidden;
    width: 200px;
    background-color: rgba(0, 0, 0, 0.9);
    color: white;
    text-align: center;
    border-radius: 6px;
    padding: 0.5rem;
    position: absolute;
    z-index: 1000;
    bottom: 125%;
    left: 50%;
    margin-left: -100px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 0.8rem;
    line-height: 1.3;
}

.tooltip:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}


.modal.fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.8);
}

.modal.fullscreen .modal-content {
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    margin: 0;
    border-radius: 0;
    display: flex;
    flex-direction: column;
    background: var(--bg-color);
}

.modal.fullscreen .modal-header {
    flex-shrink: 0;
    padding: 1rem 2rem;
    border-bottom: 1px solid var(--border-color);
    background: var(--card-bg);
}


.lorebook-editor-container,
.plugin-editor-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: calc(100vh - 80px);
    overflow: hidden;
}

.editor-header {
    padding: 1rem 2rem;
    background: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.lorebook-title-container {
    flex: 1;
    min-width: 300px;
}

.lorebook-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-color);
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 0.5rem 0;
    width: 100%;
    margin-bottom: 1rem;
    transition: border-color 0.3s ease;
}

.lorebook-title:focus {
    outline: none;
    border-bottom-color: var(--primary-color);
}

.lorebook-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    align-items: center;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.meta-item label {
    color: var(--text-secondary);
    font-weight: 500;
    white-space: nowrap;
}

.meta-item input,
.meta-item select {
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 0.4rem 0.8rem;
    color: var(--text-color);
    font-size: 0.9rem;
}

.toggle-switch-container {
    display: flex;
    align-items: center;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 58px;
    height: 30px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(60, 60, 120, 0.8);
    transition: 0.4s;
    border-radius: 30px;
    border: 2px solid rgba(100, 100, 255, 0.3);
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 2px;
    bottom: 2px;
    background-color: rgba(200, 200, 255, 0.9);
    transition: 0.4s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

input:checked + .toggle-slider {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    box-shadow: 0 0 12px rgba(138, 43, 226, 0.4);
}

input:checked + .toggle-slider:before {
    transform: translateX(28px);
    background-color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.editor-container {
    flex: 1;
    display: flex;
    overflow: hidden;
}

.entries-sidebar {
    width: 300px;
    background: var(--card-bg);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.sidebar-header {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.entries-list {
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem;
}

.entry-item {
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.entry-item:hover {
    background: var(--hover-bg);
    border-color: var(--primary-color);
}

.entry-item.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.entry-editor {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
    background: var(--bg-color);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.editor-form {
    max-width: 800px;
}

.editor-form h3 {
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.editor-form p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #ffffff !important;
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-color);
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group small {
    display: block;
    margin-top: 0.5rem;
    color: #d0d0d0;
    font-size: 0.85rem;
    line-height: 1.4;
}

.form-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.form-row .form-group {
    flex: 1;
    margin-bottom: 0;
}


.toggle-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
}

.toggle-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    color: var(--light-text);
    font-size: 0.95rem;
    padding: 0.8rem 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 500;
    background-color: rgba(40, 40, 80, 0.4);
    border: 1px solid rgba(100, 100, 255, 0.2);
    width: 100%;
    min-height: 60px;
}

.toggle-container:hover {
    background-color: rgba(138, 43, 226, 0.1);
    border-color: rgba(138, 43, 226, 0.4);
}

.toggle-label {
    font-size: 1rem;
    font-weight: 600;
    flex-grow: 1;
}

.toggle-switch-container {
    display: flex;
    align-items: center;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 58px;
    height: 30px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(60, 60, 120, 0.8);
    transition: 0.4s;
    border-radius: 30px;
    border: 2px solid rgba(100, 100, 255, 0.3);
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 2px;
    bottom: 2px;
    background-color: rgba(200, 200, 255, 0.9);
    transition: 0.4s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

input:checked + .toggle-slider {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    box-shadow: 0 0 12px rgba(138, 43, 226, 0.4);
}

input:checked + .toggle-slider:before {
    transform: translateX(28px);
    background-color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}


.form-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    align-items: flex-start;
}

.form-group input[type="text"],
.form-group input[type="password"],
.form-group input[type="number"],
.form-group select {
    height: 48px;
    box-sizing: border-box;
}

.settings-row {
    margin-top: 1.5rem;
    align-items: center;
}


.content-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    backdrop-filter: blur(5px);
}

.content-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 12px;
    color: white;
    font-size: 1.5rem;
    box-shadow: 0 4px 15px rgba(58, 134, 255, 0.3);
}

.content-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.content-details strong {
    color: #ffffff;
    font-size: 1.1rem;
    font-weight: 600;
}

.content-details .code-display {
    background: rgba(0, 0, 0, 0.3);
    padding: 0.5rem 0.8rem;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    color: var(--secondary-color);
    border: 1px solid rgba(138, 43, 226, 0.3);
}

.card-btn.info {
    color: #17a2b8;
    border-color: #17a2b8;
}

.card-btn.info:hover {
    background: rgba(23, 162, 184, 0.1);
    border-color: #17a2b8;
    color: #17a2b8;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(23, 162, 184, 0.3);
}




.mobile-account-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, rgba(30, 30, 30, 0.98), rgba(20, 20, 20, 0.98));
    border-top: 1px solid rgba(58, 134, 255, 0.4);
    backdrop-filter: blur(20px);
    z-index: 1000;
    padding: 0.5rem 0;
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.4);
}

.mobile-nav-tabs {
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 0 1rem;
    max-width: 100%;
}

.mobile-nav-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.5rem 0.8rem;
    border-radius: 12px;
    color: #f0f0f0;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    min-width: 60px;
    opacity: 0.7;
}

.mobile-nav-tab i {
    font-size: 1.2rem;
    margin-bottom: 0.3rem;
    transition: all 0.3s ease;
}

.mobile-nav-tab span {
    font-size: 0.7rem;
    font-weight: 500;
    text-align: center;
    line-height: 1.2;
}

.mobile-nav-tab.active {
    color: var(--primary-color);
    opacity: 1;
    transform: translateY(-2px);
}

.mobile-nav-tab.active i {
    color: var(--primary-color);
    text-shadow: 0 0 10px rgba(58, 134, 255, 0.5);
}

.mobile-nav-tab.active::before {
    content: '';
    position: absolute;
    top: -0.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
}

.mobile-nav-tab .count {
    position: absolute;
    top: -0.2rem;
    right: -0.2rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    font-size: 0.65rem;
    padding: 0.2rem 0.4rem;
    border-radius: 10px;
    font-weight: 600;
    min-width: 18px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}


.mobile-account-header {
    display: none;
    position: sticky;
    top: 0;
    background: linear-gradient(135deg, rgba(30, 30, 30, 0.98), rgba(20, 20, 20, 0.98));
    border-bottom: 1px solid rgba(58, 134, 255, 0.4);
    backdrop-filter: blur(20px);
    z-index: 999;
    padding: 1rem;
    margin-bottom: 1rem;
}

.mobile-header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 100%;
}

.mobile-user-info {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.mobile-user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.mobile-user-details h4 {
    margin: 0;
    font-size: 1rem;
    color: #ffffff;
    font-weight: 600;
}

.mobile-user-details p {
    margin: 0;
    font-size: 0.8rem;
    color: #d0d0d0;
}

.mobile-header-actions {
    display: flex;
    gap: 0.5rem;
}

.mobile-header-btn {
    padding: 0.5rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #f0f0f0;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mobile-header-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}


.mobile-content-section {
    padding: 1.5rem 1rem 6rem 1rem;
    min-height: calc(100vh - 140px);
}

.mobile-section-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid rgba(58, 134, 255, 0.3);
}

.mobile-section-header h2 {
    font-size: 1.5rem;
    color: #ffffff;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.mobile-section-header p {
    color: #d0d0d0;
    font-size: 0.9rem;
    margin: 0;
}


.mobile-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    backdrop-filter: blur(10px);
}

.mobile-status-badge.verified {
    background: rgba(76, 175, 80, 0.3);
    color: #66bb6a;
    border: 1px solid rgba(76, 175, 80, 0.5);
}

.mobile-status-badge.pending {
    background: rgba(255, 167, 38, 0.3);
    color: #ffb74d;
    border: 1px solid rgba(255, 167, 38, 0.5);
}

.mobile-status-badge i {
    font-size: 0.9rem;
}


@media (max-width: 768px) {

    .account-sidebar {
        display: none;
    }

    .mobile-account-nav {
        display: block;
    }

    .mobile-account-header {
        display: block;
    }

    .account-container {
        flex-direction: column;
        padding: 0;
        gap: 0;
        min-height: 100vh;
    }

    .account-content {
        flex: 1;
        padding: 0;
        background: transparent;
        border: none;
        border-radius: 0;
    }

    .tab-content {
        display: none;
        padding: 0;
    }

    .tab-content.active {
        display: block;
    }

    .tab-header {
        display: none;
    }


    .form-row {
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }

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

    .form-group input,
    .form-group textarea,
    .form-group select {
        padding: 0.8rem 1rem;
        font-size: 1rem;
        border-radius: 12px;
        border: 1px solid rgba(58, 134, 255, 0.3);
        background: rgba(0, 0, 0, 0.3);
        color: #ffffff;
        transition: all 0.3s ease;
    }

    .form-group input:focus,
    .form-group textarea:focus,
    .form-group select:focus {
        border-color: var(--primary-color);
        box-shadow: 0 0 0 3px rgba(58, 134, 255, 0.2);
        transform: translateY(-1px);
    }


    .content-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 1rem;
    }

    .content-card {
        padding: 1.5rem;
        border-radius: 16px;
        margin-bottom: 1rem;
    }


    .btn {
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
        border-radius: 12px;
        width: 100%;
        margin-bottom: 1rem;
    }

    .content-actions {
        display: flex;
        flex-direction: column;
        gap: 1rem;
        margin-bottom: 2rem;
        padding: 1rem;
    }

    .content-actions .btn {
        width: 100%;
        margin-bottom: 0;
    }


    .modal-content {
        margin: 0.5rem;
        padding: 1.5rem;
        border-radius: 16px;
        max-height: 90vh;
        overflow-y: auto;
    }

    .modal-actions {
        flex-direction: column;
        gap: 1rem;
    }

    .modal-actions .btn {
        width: 100%;
        margin-bottom: 0;
    }


    .settings-card {
        margin-bottom: 1.5rem;
        padding: 1.5rem;
        border-radius: 16px;
    }

    .settings-card h3 {
        font-size: 1.2rem;
        margin-bottom: 1rem;
    }


    .password-input {
        position: relative;
    }

    .password-toggle {
        position: absolute;
        right: 0.8rem;
        top: 50%;
        transform: translateY(-50%);
        background: none;
        border: none;
        color: #d0d0d0;
        font-size: 1.1rem;
        cursor: pointer;
        padding: 0.2rem;
    }

    .password-toggle:hover {
        color: var(--primary-color);
    }


    .notification {
        top: 1rem;
        right: 1rem;
        left: 1rem;
        max-width: none;
        border-radius: 12px;
    }


    .empty-state {
        padding: 2rem 1rem;
        text-align: center;
    }

    .empty-state i {
        font-size: 3rem;
        margin-bottom: 1rem;
    }

    .empty-state h3 {
        font-size: 1.3rem;
        margin-bottom: 0.5rem;
    }

    .empty-state p {
        font-size: 0.9rem;
        margin-bottom: 1.5rem;
    }


    .user-profile {
        flex-direction: column;
        text-align: center;
        padding: 0;
        border-bottom: none;
    }

    .user-profile::after {
        display: none;
    }

    .user-avatar {
        margin-bottom: 1rem;
    }

    .user-avatar i {
        font-size: 3rem;
    }

    .user-profile h3 {
        font-size: 1.1rem;
    }

    .user-profile p {
        font-size: 0.9rem;
    }

    .user-status {
        font-size: 0.8rem;
        padding: 0.5rem 1rem;
    }


    .account-nav ul {
        display: none;
    }

    .account-actions {
        display: none;
    }
}

@media (max-width: 480px) {

    .mobile-nav-tabs {
        padding: 0 0.5rem;
    }

    .mobile-nav-tab {
        padding: 0.4rem 0.5rem;
        min-width: 50px;
    }

    .mobile-nav-tab i {
        font-size: 1.1rem;
    }

    .mobile-nav-tab span {
        font-size: 0.65rem;
    }

    .mobile-account-header {
        padding: 0.8rem;
    }

    .mobile-user-avatar {
        width: 36px;
        height: 36px;
        font-size: 1.1rem;
    }

    .mobile-user-details h4 {
        font-size: 0.9rem;
    }

    .mobile-user-details p {
        font-size: 0.75rem;
    }

    .mobile-content-section {
        padding: 1rem 0.8rem 6rem 0.8rem;
    }

    .mobile-section-header h2 {
        font-size: 1.3rem;
    }

    .mobile-section-header p {
        font-size: 0.85rem;
    }
}


@media (min-width: 769px) {

    .mobile-section-header {
        display: none;
    }
}


.password-field-visible {
    color: var(--text-color, #111) !important;
    -webkit-text-security: none !important;
}

.password-field-visible::placeholder {
    color: var(--placeholder-color, #888);
}


#templateCreatorModal {
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

#templateCreatorModal .modal-content {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d1810 100%);
    border: 2px solid #d4af37;
    box-shadow:
        0 0 30px rgba(212, 175, 55, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

#templateCreatorModal .modal-header {
    background: linear-gradient(90deg, #8b4513 0%, #d4af37 50%, #8b4513 100%);
    color: #1a1a1a;
    border-bottom: 2px solid #d4af37;
    border-radius: 14px 14px 0 0;
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 10;
}

#templateCreatorModal .modal-header h3 {
    color: #1a1a1a;
    font-weight: bold;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.template-creator-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
    color: #e8dcc6;
}

.template-creator-container .form-section {
    background: linear-gradient(135deg, rgba(139, 69, 19, 0.2) 0%, rgba(212, 175, 55, 0.1) 100%);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(212, 175, 55, 0.4);
    box-shadow:
        0 4px 15px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(212, 175, 55, 0.2);
}

.template-creator-container .form-section h4 {
    color: #d4af37;
    margin-bottom: 1rem;
    font-size: 1.2rem;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.template-creator-container .form-section h4 i {
    color: #d4af37;
}

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

.template-creator-container .form-group label {
    color: #d4af37;
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.template-creator-container .form-group input,
.template-creator-container .form-group textarea {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 8px;
    padding: 0.75rem;
    color: #e8dcc6;
    width: 100%;
    transition: all 0.3s ease;
}

.template-creator-container .form-group input:focus,
.template-creator-container .form-group textarea:focus {
    outline: none;
    border-color: #d4af37;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.2);
    background: rgba(0, 0, 0, 0.6);
}

.template-creator-container .form-group small {
    color: #8b7355;
    font-size: 0.85rem;
    margin-top: 0.25rem;
    display: block;
}

.template-creator-container .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.commands-container {
    background: rgba(0, 0, 0, 0.4);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid rgba(212, 175, 55, 0.3);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.command-inputs {
    margin-bottom: 1.5rem;
}

.command-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    padding: 0.5rem;
    background: rgba(212, 175, 55, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(212, 175, 55, 0.2);
}

.command-item:last-child {
    margin-bottom: 0;
}

.command-input {
    flex: 1;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(212, 175, 55, 0.4);
    border-radius: 6px;
    padding: 0.75rem;
    color: #e8dcc6;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.command-input:focus {
    outline: none;
    border-color: #d4af37;
    box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.3);
    background: rgba(0, 0, 0, 0.8);
}

.command-input::placeholder {
    color: #8b7355;
    font-style: italic;
}

.remove-command {
    flex-shrink: 0;
    min-width: 36px;
    height: 36px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #8b0000 0%, #dc143c 100%);
    border: 1px solid #dc143c;
    color: white;
    transition: all 0.3s ease;
}

.remove-command:hover {
    background: linear-gradient(135deg, #dc143c 0%, #ff6b6b 100%);
    transform: scale(1.05);
}

#addCommandBtn {
    background: linear-gradient(135deg, #d4af37 0%, #f4d03f 100%);
    border: 1px solid #d4af37;
    color: #1a1a1a;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

#addCommandBtn:hover {
    background: linear-gradient(135deg, #f4d03f 0%, #d4af37 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
}

.preview-container {
    background: rgba(0, 0, 0, 0.6);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid rgba(212, 175, 55, 0.3);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    color: #e8dcc6;
    white-space: pre-wrap;
    word-wrap: break-word;
    min-height: 100px;
}

.preview-container:empty::before {
    content: "Commands will be merged here...";
    color: #8b7355;
    font-style: italic;
}

.template-creator-container .modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(212, 175, 55, 0.3);
}

.template-creator-container .btn {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.template-creator-container .btn-primary {
    background: linear-gradient(135deg, #d4af37 0%, #f4d03f 100%);
    border: 1px solid #d4af37;
    color: #1a1a1a;
}

.template-creator-container .btn-primary:hover {
    background: linear-gradient(135deg, #f4d03f 0%, #d4af37 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
}

.template-creator-container .btn-secondary {
    background: rgba(139, 69, 19, 0.7);
    border: 1px solid rgba(139, 69, 19, 0.8);
    color: #e8dcc6;
}

.template-creator-container .btn-secondary:hover {
    background: rgba(139, 69, 19, 0.9);
    transform: translateY(-2px);
}

#templateCreatorModal .close-btn {
    background: rgba(139, 69, 19, 0.7);
    border: 1px solid rgba(139, 69, 19, 0.8);
    color: #e8dcc6;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.3s ease;
}

#templateCreatorModal .close-btn:hover {
    background: rgba(139, 69, 19, 0.9);
    transform: scale(1.1);
}

.template-preview {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    padding: 1rem;
    border: 1px solid rgba(139, 69, 19, 0.2);
    min-height: 120px;
}

.preview-content {
    color: #e8dcc6;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
}

.preview-content pre {
    margin: 0;
    white-space: pre-wrap;
    word-break: break-all;
    color: #d4af37;
}

.preview-content .text-muted {
    color: #8b7355;
    font-style: italic;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    padding-top: 1rem;
    border-top: 1px solid rgba(139, 69, 19, 0.2);
}


@media (max-width: 768px) {
    .template-creator-container {
        padding: 1rem;
    }

    .template-creator-container .form-section {
        padding: 1rem;
        margin-bottom: 1rem;
    }

    .command-item {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }

    .remove-command {
        align-self: flex-end;
        min-width: 32px;
        height: 32px;
    }

    .form-actions {
        flex-direction: column-reverse;
        gap: 0.5rem;
    }

    .form-actions .btn {
        width: 100%;
    }
}


.template-code-display {
    background: rgba(40, 40, 40, 0.9);
    border: 1px solid rgba(58, 134, 255, 0.3);
    border-radius: 8px;
    padding: 1rem;
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.template-code-display code {
    background: rgba(58, 134, 255, 0.1);
    color: var(--primary-color);
    padding: 0.3rem 0.8rem;
    border-radius: 5px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    font-weight: 600;
    border: 1px solid rgba(58, 134, 255, 0.2);
}


.template-code-section {
    margin: 1rem 0;
    padding: 1rem;
    background: rgba(40, 40, 40, 0.6);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.template-code-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.template-code-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #e0e0e0;
    min-width: fit-content;
}

.template-code {
    background: #4a90e2;
    color: white;
    padding: 0.375rem 0.75rem;
    border-radius: 6px;
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    font-size: 0.875rem;
    font-weight: 500;
    border: none;
    user-select: all;
    cursor: text;
    transition: all 0.2s ease;
    flex: 1;
    text-align: center;
    max-width: 200px;
}

.template-code:hover {
    background: #5a9eff;
    transform: scale(1.02);
}

.copy-btn {
    background: #28a745;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.375rem;
    min-width: fit-content;
}

.copy-btn:hover {
    background: #218838;
    transform: translateY(-1px);
}

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

.copy-btn.success {
    background: #28a745;
}

.copy-btn.success:hover {
    background: #28a745;
}


@media (max-width: 768px) {
    .template-code-container {
        flex-direction: column;
        align-items: stretch;
    }

    .template-code-display {
        flex-direction: column;
        align-items: stretch;
        gap: 0.375rem;
    }

    .template-code {
        max-width: none;
        text-align: center;
    }

    .copy-btn {
        justify-content: center;
    }
}


.drafts-section {
    margin-bottom: 2rem;
}

.drafts-section h3 {
    color: #ffffff;
    margin-bottom: 1rem;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.drafts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
}

.draft-card {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 1rem;
    color: #ffffff;
}

.draft-card .card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.draft-card .card-header h4 {
    color: #ffffff;
    margin: 0;
    font-size: 1rem;
    font-weight: 500;
}

.draft-card .draft-time {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.8rem;
    white-space: nowrap;
}

.draft-card .card-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.draft-card .btn.small {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
    border-radius: 4px;
}

.draft-card .btn.secondary {
    background: rgba(74, 144, 226, 0.8);
    color: white;
    border: 1px solid rgba(74, 144, 226, 1);
}

.draft-card .btn.secondary:hover {
    background: rgba(74, 144, 226, 1);
}

.draft-card .btn.danger {
    background: rgba(220, 53, 69, 0.8);
    color: white;
    border: 1px solid rgba(220, 53, 69, 1);
}

.draft-card .btn.danger:hover {
    background: rgba(220, 53, 69, 1);
}

@media (max-width: 768px) {
    .drafts-grid {
        grid-template-columns: 1fr;
    }

    .draft-card .card-header {
        flex-direction: column;
        gap: 0.5rem;
    }

    .draft-card .card-actions {
        justify-content: stretch;
    }

    .draft-card .btn.small {
        flex: 1;
    }
}


.checkbox-row {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.switch-label {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    cursor: pointer;
    flex: 1;
}

.switch-label input[type="checkbox"] {
    display: none;
}

.switch-slider {
    position: relative;
    width: 50px;
    height: 26px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 26px;
    transition: all 0.3s ease;
    border: 1px solid rgba(138, 43, 226, 0.2);
    flex-shrink: 0;
}

.switch-slider::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.switch-label input[type="checkbox"]:checked + .switch-slider {
    background: linear-gradient(135deg, #3a86ff, #6c5ce7);
    border-color: #3a86ff;
}

.switch-label input[type="checkbox"]:checked + .switch-slider::before {
    transform: translateX(24px);
}

.switch-text {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.switch-text strong {
    color: #ffffff;
    font-size: 1rem;
}

.switch-text small {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
    line-height: 1.4;
}.summary-code {
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    border: 1px solid rgba(58, 134, 255, 0.2);
}

.summary-code label {
    display: block;
    color: #3a86ff;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.summary-code .code-display {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.summary-code code {
    flex: 1;
    padding: 0.5rem;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(58, 134, 255, 0.3);
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    color: #fff;
}

.summary-code .copy-btn {
    padding: 0.5rem 1rem;
    background: rgba(58, 134, 255, 0.2);
    border: 1px solid #3a86ff;
    color: #3a86ff;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.summary-code .copy-btn:hover {
    background: rgba(58, 134, 255, 0.3);
    transform: translateY(-1px);
}
