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

html, body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #f8fafc;
    color: #374151;
    line-height: 1.6;
    height: 100vh;
    overflow: hidden;
}

.screen {
    display: block;
}

.container {
    max-width: 520px;
    margin: 40px auto;
    padding: 48px;
    background: white;
    border-radius: 16px;
    border: 1px solid #e5e7eb;
    position: relative;
    overflow: hidden;
}

.container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #3b82f6 0%, #10b981 100%);
}

h1 {
    text-align: center;
    margin-bottom: 12px;
    color: #1a202c;
    font-weight: 700;
    font-size: 32px;
    letter-spacing: -0.025em;
}

.app-subtitle {
    text-align: center;
    color: #6b7280;
    font-size: 16px;
    margin-bottom: 40px;
    font-weight: 400;
}

h2 {
    color: #374151;
    font-weight: 600;
    margin-bottom: 24px;
    font-size: 22px;
    text-align: center;
}

.room-section {
    text-align: center;
}

.room-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 32px;
}


.room-form input {
    padding: 18px 20px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 16px;
    background: #fafbfc;
    font-weight: 500;
    width: 100%;
    transition: all 0.2s ease;
    position: relative;
}

.room-form input:focus {
    outline: none;
    border-color: #3b82f6;
    background: white;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.room-form input::placeholder {
    color: #9ca3af;
    font-weight: 400;
}

.divider {
    margin: 32px 0;
    color: #6b7280;
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.5px;
    position: relative;
    display: flex;
    align-items: center;
    text-align: center;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e5e7eb;
}

.divider::before {
    margin-right: 16px;
}

.divider::after {
    margin-left: 16px;
}

button {
    padding: 18px 32px;
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    line-height: 1.2;
    min-height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

button:hover:not(:disabled) {
    background: #2563eb;
}

button:active:not(:disabled) {
    background: #1d4ed8;
}

button:disabled {
    background: #d1d5db;
    cursor: not-allowed;
    opacity: 0.6;
}

.input-group {
    margin-bottom: 28px;
    text-align: left;
    position: relative;
}

.input-group .icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    z-index: 1;
    font-size: 16px;
}

.input-group input {
    padding-left: 48px;
}

.error-message {
    display: block;
    color: #ef4444;
    font-size: 13px;
    margin-top: 8px;
    min-height: 20px;
    font-weight: 500;
    padding-left: 48px;
    animation: errorSlideIn 0.3s ease;
}

@keyframes errorSlideIn {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.help-text {
    display: block;
    color: #6b7280;
    font-size: 13px;
    margin-bottom: 6px;
    font-weight: 500;
    line-height: 1.4;
}

.loading-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.input-group input.error {
    border-color: #ef4444;
    background-color: #fef2f2;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.input-group input.valid {
    border-color: #10b981;
    background-color: #f0fdf4;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

#create-room-btn {
    background: #10b981;
    margin-bottom: 12px;
    font-size: 17px;
    font-weight: 700;
    border-radius: 10px;
}

#create-room-btn:hover:not(:disabled) {
    background: #059669;
}

#create-room-btn:hover:not(:disabled) {
    background: #059669;
}

.create-room {
    margin-top: 8px;
}

.create-room .help-text {
    margin-top: 12px;
    font-size: 14px;
    color: #6b7280;
    line-height: 1.5;
    text-align: center;
    transition: all 0.3s ease;
    font-weight: 500;
}



#leave-room-btn {
    background: #ef4444;
    padding: 8px;
    font-size: 12px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    min-height: 32px;
}

#leave-room-btn:hover {
    background: #dc2626;
}

.header {
    background: white;
    border-bottom: 2px solid #f3f4f6;
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}


.room-info {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
}

#current-room-code {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    background: #f1f5f9;
    color: #1e293b;
    padding: 6px 12px;
    border-radius: 6px;
    font-family: 'SF Mono', Monaco, 'Cascadia Code', monospace;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.5px;
    border: 1px solid #e2e8f0;
    margin: 0;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 80px;
    max-width: 140px;
    height: 32px;
    min-height: 32px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#current-room-code:hover {
    background: #e2e8f0 !important;
    color: #0f172a !important;
    border-color: #cbd5e1;
}

.team-members {
    display: flex;
    align-items: center;
    gap: 8px;
}


.team-boxes {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.member-box {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    font-size: 13px;
    transition: all 0.2s ease;
    cursor: default;
}

.member-box:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.member-box.current-user {
    border: 1px solid #3b82f6;
}

.member-name {
    color: #2c3e50;
    font-weight: 500;
}

.connection-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.connection-dot.connected {
    background-color: #10b981;
}

.connection-dot.disconnected {
    background-color: #ef4444;
}

.connection-status {
    display: flex;
    align-items: center;
    gap: 10px;
}

#connection-indicator {
    font-size: 12px;
    color: #e74c3c;
}

#connection-indicator.connected {
    color: #27ae60;
}

#peer-count {
    font-size: 12px;
    color: #7f8c8d;
}

.main-content {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    height: calc(100vh - 60px);
    gap: 1px;
    width: 100%;
    background: #f1f5f9;
}

.problems-panel {
    background: white;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: visible;
    min-width: 0;
    max-width: 100%;
}

.problem-detail-panel {
    background: white;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    min-width: 0;
    max-width: 100%;
}

.chat-panel {
    background: white;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    min-width: 0;
    max-width: 100%;
}

.problem-detail-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    word-wrap: break-word;
    overflow-x: hidden;
}

.problem-form {
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
}

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

.problem-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #2c3e50;
}

.problem-form select,
.problem-form input,
.problem-form textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.2s ease;
    background: white;
}

.problem-form select:focus,
.problem-form input:focus,
.problem-form textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.problem-form textarea {
    height: 80px;
    resize: vertical;
}

.problem-form button {
    background: #3b82f6;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    margin-top: 12px;
    transition: all 0.2s ease;
    font-weight: 500;
}

.problem-form button:hover {
    background: #2563eb;
}

/* Star Rating System */
.star-rating-container {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 4px 0;
}

.star-rating {
    display: flex;
    gap: 4px;
    align-items: center;
}

.difficulty-label {
    font-size: 13px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 12px;
    transition: all 0.2s ease;
    min-width: 80px;
    text-align: center;
}

.difficulty-label.difficulty-0 {
    color: #6b7280;
    background: #f3f4f6;
}

.difficulty-label.difficulty-1 {
    color: #059669;
    background: #d1fae5;
}

.difficulty-label.difficulty-2 {
    color: #0891b2;
    background: #cffafe;
}

.difficulty-label.difficulty-3 {
    color: #ea580c;
    background: #fed7aa;
}

.difficulty-label.difficulty-4 {
    color: #dc2626;
    background: #fecaca;
}

.difficulty-label.difficulty-5 {
    color: #991b1b;
    background: #fca5a5;
}

.difficulty-label.difficulty-hover {
    transform: scale(1.05);
}

.star {
    font-size: 22px;
    cursor: pointer;
    user-select: none;
    opacity: 0.25;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 4px;
}

.star.active {
    opacity: 1;
    color: #fbbf24;
    text-shadow: 0 1px 2px rgba(251, 191, 36, 0.3);
    transform: scale(1.05);
}

.star.hover {
    opacity: 0.9;
    color: #fbbf24;
    transform: scale(1.1);
    background: rgba(251, 191, 36, 0.1);
}

.star.inactive {
    opacity: 0.25;
    color: #d1d5db;
}

.star:hover:not(.active) {
    opacity: 0.6;
    background: rgba(209, 213, 219, 0.1);
    transform: scale(1.05);
}

.problem-actions {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.reset-btn {
    background: #f39c12 !important;
    color: white !important;
    border: none !important;
    padding: 8px 16px !important;
    border-radius: 4px !important;
    cursor: pointer !important;
    font-size: 14px !important;
}

.reset-btn:hover {
    background: #e67e22 !important;
}

.problem-item .problem-actions {
    margin: 0;
    padding: 0;
    border: none;
}

.reset-problem-btn {
    background: #f39c12;
    color: white;
    border: none;
    padding: 6px;
    border-radius: 3px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 26px;
    min-height: 26px;
    opacity: 0;
    visibility: hidden;
}

.problem-item:hover .reset-problem-btn {
    opacity: 1;
    visibility: visible;
}

.reset-problem-btn:hover {
    background: #e67e22;
}

.reset-problem-btn svg {
    display: block;
}

.problem-item-content {
    display: flex;
    align-items: flex-start;
    flex: 1;
    overflow: hidden;
    gap: 8px;
}

.chat-panel {
    background: white;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.panel-header {
    padding: 12px 20px !important;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8fafc;
    overflow: visible;
    min-height: 52px !important;
    height: 52px !important;
    position: relative;
    z-index: 10;
    border-top-left-radius: 0;
    border-top-right-radius: 0;
}

.panel-header h2 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Estilo general para todos los botones en panel-header */
.panel-header button {
    height: 32px !important;
    min-height: 32px !important;
    padding: 6px 12px !important;
    font-size: 12px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.problem-controls {
    display: flex;
    gap: 8px;
    align-items: center;
    height: 100%;
}

#add-problem-btn {
    background: #10b981;
    font-size: 12px;
    padding: 6px 12px !important;
    min-height: 32px !important;
    height: 32px !important;
    transition: all 0.2s ease;
}

#add-problem-btn:hover {
    background: #059669;
}

/* Dropdown styles */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-btn {
    background: #95a5a6;
    color: white;
    border: none;
    padding: 6px 8px !important;
    font-size: 12px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 32px !important;
    min-height: 32px !important;
}

.dropdown-btn:hover {
    background: #7f8c8d;
}

.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    background-color: white;
    min-width: 160px;
    z-index: 9999;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.dropdown-content.show {
    display: block;
}

.dropdown-content a {
    color: #333;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    font-size: 14px;
}

.dropdown-content a:hover {
    background-color: #f8f9fa;
}

.dropdown-content a:first-child {
    border-top-left-radius: 4px;
    border-top-right-radius: 4px;
}

.dropdown-content a:last-child {
    border-bottom-left-radius: 4px;
    border-bottom-right-radius: 4px;
}

.problems-list {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
    height: 0;
    min-height: 0;
}

.problem-item {
    display: flex;
    align-items: flex-start;
    padding: 14px;
    margin-bottom: 8px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    cursor: pointer;
    background: white;
    justify-content: space-between;
    min-height: 65px;
    max-height: 65px;
    transition: all 0.2s ease;
    position: relative;
}

.problem-item:hover {
    border-color: #3b82f6;
    background: #f8fafc;
}

.problem-item.selected {
    border-color: #3b82f6;
    background: #eff6ff;
}

.problem-letter {
    font-weight: bold;
    font-size: 18px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f1f5f9;
    border-radius: 6px;
    color: #1e293b;
    border: 1px solid #e2e8f0;
    flex-shrink: 0;
}

.problem-info {
    flex: 1;
    margin-left: 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    overflow: hidden;
    justify-content: flex-start;
}

.problem-status {
    font-size: 12px;
    font-weight: 500;
}

.problem-assignee {
    font-size: 11px;
    color: #7f8c8d;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.problem-status-line {
    display: flex;
    align-items: center;
    gap: 8px;
}

.difficulty-badge {
    background: #fbbf24;
    color: white;
    font-size: 9px;
    font-weight: 700;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.problem-tags {

    display: flex;
    flex-wrap: wrap;
    align-items: end;
    justify-content: end;
    width: 50%;
}

.problem-tag {
    background: #f1f5f9;
    color: #475569;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    margin: 0 2px;
    border-radius: 4px;
    white-space: nowrap;
    border: 1px solid #e2e8f0;
}

.status-not-read { color: #64748b; }
.status-reading { color: #f59e0b; }
.status-understood { color: #3b82f6; }
.status-in-progress { color: #f97316; }
.status-solved { color: #10b981; }
.status-discarded { color: #ef4444; }

.problem-status {
    font-weight: 600;
    position: relative;
}

.problem-status::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 6px;
    background-color: currentColor;
}

.messages {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    height: 0;
    min-height: 0;
}

.message {
    margin-bottom: 12px;
    max-width: 85%;
    word-wrap: break-word;
    font-size: 14px;
    position: relative;
    animation: messageSlideIn 0.3s ease;
}

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

.message.consecutive {
    margin-top: -9px;
}

.message-username {
    background: white;
    color: #374151;
    font-size: 11px;
    font-weight: 500;
    border-radius: 4px;
    width: fit-content;
    position: relative;
    z-index: 1;

    padding: 0 0.5em;
    margin-left: 1em;
    transform: translateY(50%);
}

.message-content {
    padding: 10px 14px;
    border-radius: 12px;
}

.message.sent .message-content {
    background: #3b82f6;
    color: white;
    margin-left: auto;
    text-align: right;
}

.message.sent {
    margin-left: auto;
    text-align: right;
}

.message.received .message-content {
    background: white;
    border: 1px solid #e2e8f0;
    color: #374151;
}

.message-time {
    font-size: 10px;
    opacity: 0.7;
    margin-top: 4px;
}

.input-section {
    display: flex;
    gap: 12px;
    padding: 16px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    flex-shrink: 0;
    align-items: center;
}

.input-section input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    height: 44px;
    box-sizing: border-box;
    background: white;
    transition: all 0.2s ease;
}

.input-section input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    background: white;
}

/* Botón Send pequeño con icono de avioncito */
#send-btn {
    background: #3b82f6 !important;
    border: none !important;
    border-radius: 50% !important;
    width: 44px !important;
    height: 44px !important;
    min-height: 44px !important;
    padding: 0 !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 16px !important;
    color: white !important;
    transition: all 0.2s ease !important;
}

#send-btn svg {
    transform: scaleX(-1);
}

#send-btn:hover {
    background: #2563eb !important;
    transform: scale(1.02) !important;
}

#send-btn:hover svg {
    transform: scaleX(-1) scale(1.05);
}

#send-btn:active {
    transform: scale(0.95) !important;
}

#send-btn:active svg {
    transform: scaleX(-1) scale(0.95);
}


@media (max-width: 900px) {
    .main-content {
        grid-template-columns: 1fr;
        grid-template-rows: 80vh 80vh 80vh;
        height: auto;
        gap: 1px;
    }
    
    .problems-panel, .problem-detail-panel {
        border-right: none;
        border-bottom: 1px solid #eee;
        overflow-y: auto;
    }
    
    .chat-panel {
        border-bottom: none;
    }
    
    .header {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        padding: 8px 15px;
    }
    
    .room-info {
        text-align: center;
    }
    
    .team-members {
        align-items: center;
    }
    
    .team-boxes {
        justify-content: center;
    }
    
    .connection-status {
        justify-content: center;
    }
}

@media (max-width: 600px) {
    .container {
        margin: 10px;
        padding: 15px;
    }
    
    .main-content {
        grid-template-rows: 75vh 75vh 75vh;
    }
    
    .header {
        padding: 6px 10px;
        gap: 6px;
    }
    
    .problem-item {
        padding: 6px 10px;
    }
    
    .problem-letter {
        font-size: 14px;
        width: 25px;
    }
    
    .member-box {
        font-size: 12px;
        padding: 4px 8px;
    }
    
    .connection-dot {
        width: 6px;
        height: 6px;
    }
}

/* Kick notification overlay */
.kick-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(5px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.kick-alert {
    background: white;
    padding: 40px;
    border-radius: 16px;
    text-align: center;
    border: 1px solid #e5e7eb;
    max-width: 400px;
    width: 90%;
}

.kick-alert h2 {
    color: #e74c3c;
    margin-bottom: 20px;
    font-size: 24px;
}

.kick-alert p {
    color: #555;
    margin-bottom: 30px;
    font-size: 16px;
    line-height: 1.5;
}

.kick-alert button {
    background: #3498db;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
}

.kick-alert button:hover {
    background: #2980b9;
}

/* Blur main content when kicked */
.main-screen.kicked {
    filter: blur(5px);
    pointer-events: none;
}

/* Entry error styling */
.entry-error {
    background: #ffe6e6;
    border: 1px solid #e74c3c;
    color: #c0392b;
    padding: 12px;
    border-radius: 4px;
    margin-top: 10px;
    font-size: 14px;
    text-align: center;
}

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

.modal-content {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    border: 1px solid #e5e7eb;
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    color: #2c3e50;
}

.close-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #95a5a6;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.modal-body {
    padding: 20px;
}

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

.setting-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #2c3e50;
}

.code-display {
    background: #f8f9fa;
    border: 1px solid #ddd;
    padding: 12px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 16px;
    font-weight: bold;
    color: #2c3e50;
    text-align: center;
}


#close-settings-btn-2 {
    background: #3498db;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    width: 100%;
}

#close-settings-btn-2:hover {
    background: #2980b9;
}

/* Tags System */
.tags-container {
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    padding: 8px;
    background: #fafbfc;
    min-height: 44px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    position: relative;
    transition: all 0.2s ease;
}

.tags-container:focus-within {
    border-color: #3b82f6;
    background: white;
}

.tags-display {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    flex: 1;
}

.tag {
    background: #3b82f6;
    color: white;
    padding: 5px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: default;
    transition: all 0.2s ease;
}

.tag:hover {
    background: #2563eb;
}

.tag-remove {
    cursor: pointer;
    font-weight: bold;
    font-size: 14px;
    padding: 1px 4px;
    border-radius: 50%;
    line-height: 1;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tag-remove:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.1);
}

.tag-input {
    border: none;
    outline: none;
    background: transparent;
    flex: 1;
    min-width: 120px;
    padding: 6px 4px;
    font-size: 14px;
    font-weight: 500;
}

.tag-input::placeholder {
    color: #9ca3af;
    font-weight: 400;
}

/* Tag Suggestions */
.tag-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    margin-top: 2px;
}

.tag-suggestion {
    padding: 8px 12px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    color: #374151;
    border-bottom: 1px solid #f3f4f6;
    transition: all 0.15s ease;
}

.tag-suggestion:last-child {
    border-bottom: none;
}

.tag-suggestion:hover {
    background: #f8fafc;
    color: #1e293b;
}

/* Common Tags Section */
.common-tags {
    margin-top: 12px;
}

.common-tags-label {
    display: block;
    font-size: 12px;
    color: #6b7280;
    font-weight: 500;
    margin-bottom: 8px;
}

.common-tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.common-tag-btn {
    background: #f1f5f9 !important;
    color: #475569 !important;
    border: 1px solid #e2e8f0 !important;
    padding: 4px 10px !important;
    border-radius: 12px !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    min-height: auto !important;
    height: auto !important;
    width: auto !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.common-tag-btn:hover {
    background: #3b82f6 !important;
    color: white !important;
    border-color: #3b82f6 !important;
    transform: none !important;
}

/* Tags Section Outside Form */
.tags-section {
    margin-top: 20px;
    padding: 16px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.tags-section-header {
    margin-bottom: 10px;
}

.tags-section-header label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #1e293b;
    font-size: 14px;
}