/* Feedback Widget */
.feedback-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.feedback-form-container {
    display: none;
    position: absolute;
    bottom: 70px;
    right: 0;
    width: 380px;
    background: linear-gradient(135deg, rgba(20, 20, 20, 0.98), rgba(30, 30, 30, 0.98));
    border: 2px solid var(--secondary-color);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6), 0 0 20px rgba(212, 175, 55, 0.1);
    backdrop-filter: blur(15px);
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.feedback-form-container.show {
    display: block;
    animation: slideUp 0.3s ease-out;
}

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

.feedback-form-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.feedback-form-header h3 {
    color: var(--secondary-color);
    font-size: 1.2rem;
    margin: 0;
    font-weight: 600;
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
}

.feedback-close-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: color 0.3s;
}

.feedback-close-btn:hover {
    color: var(--text-primary);
}

.feedback-form textarea {
    width: 100%;
    height: 180px;
    min-height: 180px;
    max-height: 180px;
    background: rgba(30, 30, 30, 0.95);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    color: var(--text-primary);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 0.95rem;
    line-height: 1.5;
    resize: none;
    overflow-y: auto;
    overflow-x: hidden;
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
    word-wrap: break-word;
    user-select: text;
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
}

.feedback-form textarea:focus {
    outline: none;
    border-color: var(--secondary-color);
    background: rgba(35, 35, 35, 0.95);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2), 0 0 0 3px rgba(212, 175, 55, 0.1);
}

.feedback-form textarea::placeholder {
    color: var(--text-secondary);
    opacity: 0.7;
}

.feedback-form textarea::-webkit-scrollbar {
    width: 8px;
}

.feedback-form textarea::-webkit-scrollbar-track {
    background: rgba(20, 20, 20, 0.5);
    border-radius: 4px;
}

.feedback-form textarea::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
    transition: background 0.3s;
}

.feedback-form textarea::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

.feedback-word-count {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    text-align: right;
}

.feedback-word-count.warning {
    color: #ff6b6b;
}

.feedback-submit-btn {
    width: 100%;
    background: linear-gradient(135deg, var(--secondary-color), #c89f3f);
    color: var(--bg-primary);
    border: none;
    border-radius: 8px;
    padding: 0.875rem;
    font-weight: bold;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.2);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.feedback-submit-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #c89f3f, #b8903a);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(212, 175, 55, 0.4);
}

.feedback-submit-btn:active:not(:disabled) {
    transform: translateY(0);
}

.feedback-submit-btn:disabled {
    background: linear-gradient(135deg, var(--border-color), #333);
    cursor: not-allowed;
    transform: none;
    opacity: 0.6;
}

.feedback-toggle-btn {
    width: 60px;
    height: 60px;
    background: var(--secondary-color);
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    color: var(--dark-bg);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: all 0.3s;
    user-select: none;
    -webkit-user-drag: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.feedback-toggle-btn i {
    display: block;
}

.feedback-toggle-btn:hover {
    background: #c89f3f;
    transform: scale(1.1);
}

.feedback-toggle-btn:active {
    transform: scale(0.95);
}

.feedback-message {
    padding: 0.75rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    display: none;
}

.feedback-message.show {
    display: block;
}

.feedback-message.success {
    background: rgba(76, 175, 80, 0.2);
    border: 1px solid #4caf50;
    color: #4caf50;
}

.feedback-message.error {
    background: rgba(244, 67, 54, 0.2);
    border: 1px solid #f44336;
    color: #f44336;
}

/* Responsive */
@media (max-width: 768px) {
    .feedback-form-container {
        width: calc(100vw - 40px);
        right: 10px;
    }

    .feedback-form textarea {
        height: 160px;
        min-height: 160px;
        max-height: 160px;
    }

    .feedback-widget {
        right: 10px;
        bottom: 10px;
    }

    .feedback-toggle-btn {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }
}
