

.header-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* Role Creation */
.role-creation {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* Role Settings Section */
.role-settings-section {
    padding: 20px 0;
}

/* Icon Upload Area */
.setting-group .icon-upload-area {
    width: 64px;
    height: 64px;
    border: 2px dashed #40444b;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #36393f;
    position: relative;
    flex-shrink: 0;
    margin-top: 4px;
}

.setting-group .icon-upload-area:hover {
    border-color: #5865f2;
    background: #40444b;
}

.setting-group .icon-upload-area .no-icon-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #8e9297;
    padding: 0;
    border: none;
    background: none;
    border-radius: 0;
    transition: none;
    min-height: auto;
    width: auto;
}

.setting-group .icon-upload-area .no-icon-placeholder svg {
    color: #8e9297;
}

.setting-group .icon-upload-area .no-icon-placeholder span {
    display: none;
}

.setting-group .icon-upload-area .image-preview {
    margin: 0;
    width: 100%;
    height: 100%;
}

.setting-group .icon-upload-area .preview-container {
    width: 100%;
    height: 100%;
    margin: 0;
}

.setting-group .icon-upload-area .preview-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px;
}



/* Divider */
.divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, #40444b, transparent);
    margin: 10px 0;
    opacity: 0.6;
}

/* Image Preview */
.image-preview {
    margin-top: 20px;
    text-align: center;
}

.preview-container {
    position: relative;
    display: block;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid #40444b;
    margin: 0 auto;
    width: fit-content;
}

.preview-container img {
    width: 64px;
    height: 64px;
    object-fit: cover;
    display: block;
    margin: 0 auto;
}

.settings-row {
    display: grid;
    grid-template-columns: auto 2fr 1fr;
    gap: 15px;
    align-items: start;
}

/* Role Settings (legacy) */
.role-settings {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.cancel-edit-button {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #ed4245;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    padding: 10px 16px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-left: 10px;
}

.cancel-edit-button:hover {
    background: #c5393b;
    transform: translateY(-1px);
}

.cancel-edit-button:active {
    transform: translateY(0);
}

.cancel-edit-button svg {
    width: 16px;
    height: 16px;
}

/* Roles List */
.roles-list {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.role-item {
    background: #40444b;
    border: 1px solid #202225;
    border-radius: 6px;
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.2s ease;
}

.role-item:hover {
    background: #484c52;
    border-color: #5865f2;
}

.role-item-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    flex-shrink: 0;
    border: 2px solid #202225;
}

.role-item-icon.no-icon {
    background: #2f3136;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #8e9297;
    font-size: 0.8rem;
}

.role-item-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.role-item-name {
    color: #ffffff;
    font-weight: 500;
    font-size: 0.9rem;
}

.role-item-color {
    color: #b9bbbe;
    font-size: 0.8rem;
    font-family: 'Courier New', monospace;
}

.role-item-actions {
    display: flex;
    gap: 8px;
}

.role-action-button {
    background: none;
    border: none;
    color: #b9bbbe;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.role-action-button:hover {
    background: #40444b;
    color: #ffffff;
}

.role-action-button.edit:hover {
    background: #5865f2;
    color: #ffffff;
}

.role-action-button.delete:hover {
    background: #ed4245;
    color: #ffffff;
}

.role-action-button svg {
    width: 14px;
    height: 14px;
}

/* No Roles Message */
.no-roles-message {
    text-align: center;
    padding: 20px;
    color: #8e9297;
    font-style: italic;
}

.no-roles-message p {
    margin: 0;
    font-size: 0.9rem;
}

.setting-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    height: 100%;
}

.setting-group label {
    color: #b9bbbe;
    font-weight: 500;
    font-size: 0.9rem;
    margin-bottom: 4px;
}

.setting-group input[type="text"] {
    background: #40444b;
    border: 1px solid #202225;
    border-radius: 4px;
    padding: 12px 16px;
    color: #dcddde;
    font-size: 1rem;
    transition: all 0.2s ease;
    height: 44px;
    box-sizing: border-box;
}

.setting-group input[type="text"]:focus {
    outline: none;
    border-color: #5865f2;
    box-shadow: 0 0 0 2px rgba(88, 101, 242, 0.2);
}

.setting-group input[type="text"]::placeholder {
    color: #8e9297;
}

.char-counter {
    text-align: right;
    color: #8e9297;
    font-size: 0.8rem;
    font-weight: 500;
    margin-top: 4px;
}

/* Color Picker */
.color-picker-container {
    display: flex;
    align-items: center;
    gap: 12px;
    height: 44px;
}

.color-picker-container input[type="color"] {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    background: none;
}

.color-picker-container input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
}

.color-picker-container input[type="color"]::-webkit-color-swatch {
    border: 2px solid #40444b;
    border-radius: 4px;
}

.color-preview {
    color: #ffffff;
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
    font-weight: 500;
    background: #2f3136;
    padding: 2px 6px;
    border-radius: 3px;
    border: 1px solid #202225;
}


.preview-content {
    min-height: 400px;
    padding: 15px;
}

/* Discord Chat */
.discord-chat {
    background: #36393f;
    border-radius: 8px;
    border: 1px solid #40444b;
    overflow: hidden;
    max-width: 500px;
    margin: 0 auto;
}

.chat-header {
    background: #2f3136;
    padding: 12px 16px;
    border-bottom: 1px solid #40444b;
}

.channel-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.channel-name {
    color: #ffffff;
    font-weight: 600;
    font-size: 1rem;
}

.channel-topic {
    color: #8e9297;
    font-size: 0.8rem;
}

.chat-messages {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.message {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.message-avatar {
    flex-shrink: 0;
}

.message-avatar img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.message-content {
    flex: 1;
    min-width: 0;
}

.message-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.username {
    color: #ffffff;
    font-weight: 500;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-direction: row;
    line-height: 1;
}

.role-icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    flex-shrink: 0;
    display: inline-block;
    order: 1;
    margin-left: 4px;
    vertical-align: middle;
    align-self: center;
}

.role-name {
    color: #5865f2;
    font-weight: 500;
    order: -1;
    line-height: 1;
    display: flex;
    align-items: center;
}

.timestamp {
    color: #8e9297;
    font-size: 0.75rem;
    font-weight: 400;
}

.message-text {
    color: #dcddde;
    font-size: 0.9rem;
    line-height: 1.4;
    word-wrap: break-word;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .editor-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .container {
        padding: 15px;
    }
    
    .input-section {
        gap: 15px;
    }
    
    .input-container {
        padding: 15px;
    }
    
    .role-creation {
        gap: 0;
    }
    
    .role-settings-section {
        padding: 15px 0;
    }
    
    .icon-upload-section {
        padding: 15px 0;
    }
    
    
    .settings-row {
        grid-template-columns: auto 1fr;
        gap: 12px;
    }
    
    .preview-section {
        padding: 20px;
    }
}

@media (max-width: 768px) {
    .nav-container {
        padding: 0 15px;
        height: 60px;
    }
    
    .nav-brand h1 {
        font-size: 1.5rem;
    }
    
    .nav-menu {
        gap: 15px;
    }
    
    .nav-link {
        padding: 8px 15px;
        font-size: 0.9rem;
    }
    
    .header-actions {
        gap: 6px;
    }
    
    .add-role-button, .cancel-edit-button {
        padding: 8px 12px;
        font-size: 0.85rem;
    }
    
    .container {
        padding: 10px;
    }
    
    .input-section {
        gap: 12px;
    }
    
    .input-container {
        padding: 12px;
    }
    
    .role-creation {
        gap: 0;
    }
    
    .role-settings-section {
        padding: 12px 0;
    }
    
    .icon-upload-section {
        padding: 12px 0;
    }
    
    
    .settings-row {
        grid-template-columns: auto 1fr;
        gap: 10px;
    }
    
    .preview-section {
        padding: 15px;
    }
    
    
    
    .upload-content h3 {
        font-size: 1.1rem;
    }
    
    .preview-container img {
        width: 100px;
        height: 100px;
    }
    
    .discord-chat {
        max-width: 100%;
    }
    
    .help-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .nav-container {
        flex-direction: column;
        height: auto;
        padding: 10px 15px;
        gap: 10px;
    }
    
    .nav-menu {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }
    
    .nav-link {
        padding: 6px 12px;
        font-size: 0.85rem;
    }
    
    .header-actions {
        gap: 4px;
    }
    
    .add-role-button, .cancel-edit-button {
        padding: 6px 10px;
        font-size: 0.8rem;
    }
    
    .container {
        padding: 8px;
    }
    
    .input-section {
        gap: 10px;
    }
    
    .input-container {
        padding: 10px;
    }
    
    .role-creation {
        gap: 0;
    }
    
    .role-settings-section {
        padding: 10px 0;
    }
    
    .icon-upload-section {
        padding: 10px 0;
    }
    
    
    .settings-row {
        grid-template-columns: auto 1fr;
        gap: 8px;
    }
    
    .preview-section {
        padding: 12px;
    }
    
    
    
    .upload-content svg {
        width: 36px;
        height: 36px;
    }
    
    .upload-content h3 {
        font-size: 1rem;
    }
    
    .upload-content p {
        font-size: 0.85rem;
    }
    
    .preview-container img {
        width: 48px;
        height: 48px;
    }
    
    .setting-group input[type="text"] {
        padding: 10px 12px;
        font-size: 0.9rem;
    }
    
    .color-picker-container input[type="color"] {
        width: 32px;
        height: 32px;
    }
    
    .message-avatar img {
        width: 32px;
        height: 32px;
    }
    
    .username {
        font-size: 0.85rem;
    }
    
    .message-text {
        font-size: 0.85rem;
    }
    
    .role-icon {
        width: 18px;
        height: 18px;
    }
    
    .add-role-button {
        padding: 8px 12px;
        font-size: 0.85rem;
    }
    
    .role-item {
        padding: 10px;
        gap: 10px;
    }
    
    .role-item-icon {
        width: 28px;
        height: 28px;
    }
    
    .role-item-name {
        font-size: 0.85rem;
    }
    
    .role-item-color {
        font-size: 0.75rem;
    }
}
