/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 24px;
    background: var(--gradient-primary);
    color: var(--button-text-color);
    border: none;
    border-radius: var(--radius-md);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-glow);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.2), transparent);
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 32px rgba(255, 107, 107, 0.4);
}

.btn:hover::before {
    opacity: 1;
}

.btn:active {
    transform: scale(0.97);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-md) var(--space-xl);
    background: var(--surface-color);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-secondary:hover {
    background: var(--surface-elevated);
    border-color: var(--border-light);
    transform: translateY(-1px);
}

.btn-secondary:active {
    transform: scale(0.97);
}

.btn-ghost {
    background: transparent;
    color: var(--primary-color);
    padding: var(--space-md) var(--space-xl);
    border: none;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-ghost:hover {
    background: var(--primary-soft);
}

.btn-sm {
    padding: var(--space-sm) 14px;
    font-size: 13px;
    white-space: nowrap;
    border-radius: var(--radius-sm);
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 24px;
    background: var(--button-color);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Form Elements */
.form-group {
    margin-bottom: var(--space-md);
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: var(--space-xs);
}

.form-input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--surface-color);
    color: var(--text-color);
    font-size: 15px;
    transition: border-color var(--transition-fast);
}

.form-input:focus {
    outline: none;
    border-color: var(--button-color);
}

.form-input::placeholder {
    color: var(--text-muted);
}

/* FAB */
.fab {
    position: fixed;
    bottom: var(--space-xl);
    right: var(--space-xl);
    width: 56px;
    height: 56px;
    border-radius: var(--radius-full);
    background: var(--gradient-primary);
    color: white;
    border: none;
    font-size: 28px;
    cursor: pointer;
    box-shadow: var(--shadow-glow);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    z-index: 50;
}

.fab:hover {
    transform: scale(1.1) rotate(90deg);
    box-shadow: 0 6px 32px rgba(255, 107, 107, 0.5);
}

.fab:active {
    transform: scale(0.95);
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 100;
    align-items: flex-end;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.modal.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: var(--surface-color);
    width: 100%;
    max-width: 600px;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    padding: 20px;
    padding-top: var(--space-md);
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    animation: slideUp 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-content.modal-fullscreen {
    max-height: 95vh;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.modal.modal-fullscreen .modal-content {
    max-height: 95vh;
    height: 95vh;
}

.modal.modal-fullscreen .modal-content::before {
    display: none;
}

.modal-fullscreen-content {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.modal-fullscreen-content .modal-body {
    flex: 1;
    overflow-y: auto;
}

.modal-back {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    padding: 0;
    margin-left: -8px;
    border-radius: 50%;
    transition: background 0.15s ease;
}

.modal-back:hover {
    background: var(--surface-elevated);
}

.modal-back:active {
    transform: scale(0.95);
}

.modal-content::before {
    content: '';
    display: block;
    width: 36px;
    height: 4px;
    background: var(--border-light);
    border-radius: 2px;
    margin: 0 auto var(--space-lg);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-lg);
}

.modal-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-color);
}

/* Post donate section */
.post-donate-section {
    background: rgba(59, 56, 41, 0.5);
    border: 1px solid rgba(251, 191, 36, 0.2);
    border-radius: var(--radius-lg);
    padding: var(--space-md);
    margin-bottom: var(--space-md);
}

.donate-section-title {
    font-size: 13px;
    font-weight: 500;
    color: var(--spark-color);
    margin-bottom: var(--space-sm);
    display: flex;
    align-items: center;
    gap: 6px;
}

.donate-section-title::before {
    content: '✨';
}

.donate-buttons {
    display: flex;
    gap: var(--space-sm);
}

.donate-quick-btn {
    flex: 1;
    padding: 10px 12px;
    background: rgba(59, 56, 41, 0.8);
    border: 1px solid rgba(251, 191, 36, 0.3);
    border-radius: var(--radius-md);
    color: var(--spark-color);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.donate-quick-btn:hover {
    background: rgba(251, 191, 36, 0.2);
    border-color: var(--spark-color);
}

.donate-quick-btn:active {
    transform: scale(0.95);
}

.donate-quick-btn.donate-custom {
    flex: 0.5;
    font-size: 16px;
}

.modal-close {
    background: var(--surface-elevated);
    border: 1px solid var(--border-color);
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    font-size: 18px;
    cursor: pointer;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.modal-close:hover {
    background: var(--border-color);
    border-color: var(--border-light);
    transform: rotate(90deg);
    color: var(--text-color);
}

/* Forms */
textarea, input[type="text"], input[type="number"] {
    width: 100%;
    min-height: 120px;
    padding: 14px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 16px;
    font-family: inherit;
    resize: none;
    margin-bottom: var(--space-md);
    background: var(--bg-color);
    color: var(--text-color);
    transition: all var(--transition-fast);
}

input[type="text"], input[type="number"] {
    min-height: auto;
}

textarea:focus, input[type="text"]:focus, input[type="number"]:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-soft);
}

textarea::placeholder, input::placeholder {
    color: var(--text-muted);
}

/* Tags */
.tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--surface-elevated);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
    cursor: pointer;
    border: 1px solid var(--border-color);
}

.tag i,
.tag svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.tag:hover {
    background: var(--border-color);
    border-color: var(--border-light);
    transform: translateY(-1px);
}

.tag.active {
    background: rgba(255, 107, 107, 0.12);
    color: var(--primary-color);
    border-color: rgba(255, 107, 107, 0.3);
    font-weight: 600;
}

.tag.active i,
.tag.active svg {
    color: var(--primary-color);
    stroke: var(--primary-color);
}

/* Edit Profile Avatar */
.edit-profile-avatar {
    position: relative;
    display: inline-block;
    margin-bottom: var(--space-lg);
}

.edit-profile-avatar .avatar-img {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-full);
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 28px;
    font-weight: 700;
    overflow: hidden;
}

.edit-profile-avatar .avatar-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.edit-profile-avatar .avatar-edit-badge {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 26px;
    height: 26px;
    background: var(--spark-color);
    border-radius: var(--radius-full);
    border: 3px solid var(--bg-color);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.edit-profile-avatar .avatar-edit-badge svg,
.edit-profile-avatar .avatar-edit-badge i {
    width: 11px;
    height: 11px;
    color: var(--bg-color);
    stroke: var(--bg-color);
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    width: 40px;
    height: 22px;
    background: var(--surface-elevated);
    border-radius: 11px;
    padding: 2px;
    cursor: pointer;
    transition: background var(--transition-fast);
}

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

.toggle-switch::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    background: white;
    border-radius: var(--radius-full);
    transition: transform var(--transition-fast);
}

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

/* Q&A Settings Row */
.qa-settings-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background: var(--surface-color);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-lg);
}

.qa-settings-row .qa-icon {
    width: 14px;
    height: 14px;
    color: var(--text-secondary);
}

.qa-settings-row .qa-info {
    flex: 1;
}

.qa-settings-row .qa-title {
    font-size: 12px;
    font-weight: 600;
}

.qa-settings-row .qa-hint {
    font-size: 10px;
    color: var(--text-muted);
}

/* Button variants per design guide */
.btn-spark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 18px;
    background: rgba(251, 191, 36, 0.12);
    color: var(--spark-color);
    border: none;
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-spark:hover {
    background: rgba(251, 191, 36, 0.2);
}

.btn-heat {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 10px 18px;
    background: rgba(255, 107, 107, 0.12);
    color: var(--primary-color);
    border: none;
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-heat:hover {
    background: rgba(255, 107, 107, 0.2);
}

.btn-donate-solid {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 10px 18px;
    background: var(--spark-color);
    color: var(--bg-color);
    border: none;
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-donate-solid:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

/* Spark icon button (circle) */
.spark-icon-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(251, 191, 36, 0.1);
    border: none;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.spark-icon-btn:hover {
    background: rgba(251, 191, 36, 0.2);
    transform: scale(1.05);
}

.spark-icon-btn svg {
    width: 16px;
    height: 16px;
}

/* Toast */
.toast {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--surface-elevated);
    color: var(--text-color);
    padding: var(--space-md) var(--space-xl);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    z-index: 200;
    animation: fadeInUp 0.3s ease;
    border: 1px solid var(--border-color);
}

/* Question amount buttons */
.question-amount-btn {
    flex: 1;
    padding: var(--space-md) var(--space-sm);
    font-size: 13px;
    transition: all var(--transition-fast);
    border-radius: var(--radius-md);
}

.question-amount-btn.active {
    background: var(--gradient-primary);
    color: var(--button-text-color);
    box-shadow: var(--shadow-glow);
    border-color: transparent;
}

/* Ask Question Modal */
.ask-question-body {
    padding: 16px;
}

.ask-question-recipient {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.ask-question-recipient .recipient-avatar {
    width: 44px;
    height: 44px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: white;
    overflow: hidden;
    flex-shrink: 0;
}

.ask-question-recipient .recipient-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ask-question-recipient .recipient-info {
    flex: 1;
}

.ask-question-recipient .recipient-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-color);
}

.ask-question-recipient .recipient-hint {
    font-size: 11px;
    color: var(--text-muted);
}

.ask-question-textarea-wrapper {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    margin-bottom: 8px;
}

.ask-question-textarea-wrapper textarea {
    width: 100%;
    min-height: 100px;
    padding: 14px;
    border: none;
    background: transparent;
    color: var(--text-color);
    font-size: 14px;
    line-height: 1.6;
    resize: vertical;
}

.ask-question-textarea-wrapper textarea:focus {
    outline: none;
}

.ask-question-char-count {
    text-align: right;
    font-size: 10px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.ask-question-anonymous-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background: var(--surface-color);
    border-radius: 12px;
    margin-bottom: 16px;
    color: var(--text-muted);
}

.ask-question-anonymous-row .anonymous-info {
    flex: 1;
}

.ask-question-anonymous-row .anonymous-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-color);
}

.ask-question-anonymous-row .anonymous-hint {
    font-size: 10px;
    color: var(--text-muted);
}

.ask-question-price-section {
    margin-bottom: 20px;
}

.ask-question-price-section .price-label {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.ask-question-price-section .price-buttons {
    display: flex;
    gap: 6px;
}

.ask-question-price-section .price-btn {
    flex: 1;
    text-align: center;
    padding: 12px 4px;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.ask-question-price-section .price-btn:hover {
    border-color: var(--border-light);
}

.ask-question-price-section .price-btn.active {
    background: rgba(251, 191, 36, 0.08);
    border: 1.5px solid var(--spark-color);
    color: var(--spark-color);
}

.ask-question-price-section .price-btn.active svg path {
    fill: var(--spark-color);
}

.ask-question-price-section .price-btn svg path {
    fill: var(--text-muted);
}

.ask-question-hint {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 10px 12px;
    background: rgba(251, 191, 36, 0.04);
    border-radius: 10px;
    margin-bottom: 20px;
    color: var(--text-muted);
}

.ask-question-hint svg {
    flex-shrink: 0;
    margin-top: 1px;
}

.ask-question-hint span {
    font-size: 11px;
    line-height: 1.5;
}

.ask-question-submit {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.ask-question-submit #askQuestionPriceLabel:not(:empty)::before {
    content: "за ";
}

.ask-question-submit #askQuestionPriceLabel:not(:empty)::after {
    content: " ✦";
}
