/* Profile Page Styles */

.profile-section {
    padding: 80px 0;
    min-height: calc(100vh - 200px);
    background: #f8f9fa;
}

.profile-container {
    max-width: 600px;
    margin: 0 auto;
    background: #ffffff;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.profile-title {
    font-size: 32px;
    font-weight: 700;
    color: #000000;
    margin-bottom: 32px;
    text-align: center;
}

.profile-content {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.profile-info {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 24px;
    background: #f8f9fa;
    border-radius: 8px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #e0e0e0;
}

.info-item:last-child {
    border-bottom: none;
}

.info-label {
    font-size: 16px;
    font-weight: 600;
    color: #666666;
}

.info-value {
    font-size: 18px;
    font-weight: 700;
    color: #000000;
    min-width: 0;
    overflow-wrap: break-word;
    word-break: break-word;
}

#userEmail {
    text-align: right;
}

.tokens-value {
    color: #ffa500;
}

.telegram-link-section {
    padding: 24px;
    background: #fff3cd;
    border: 2px dashed #ffa500;
    border-radius: 8px;
    text-align: center;
}

.link-hint {
    margin-top: 12px;
    font-size: 14px;
    color: #666666;
}

.link-fallback {
    margin-top: 16px;
    padding: 16px;
    background: #fff3cd;
    border: 1px solid #ffa500;
    border-radius: 8px;
}

.link-fallback-text {
    font-size: 14px;
    color: #856404;
    margin: 0 0 12px 0;
    text-align: center;
}

.link-fallback-link {
    color: #ffa500;
    font-weight: 600;
    text-decoration: underline;
    transition: color 0.3s;
}

.link-fallback-link:hover {
    color: #ff8c00;
    text-decoration: none;
}

.link-fallback-url-display {
    text-align: center;
    word-break: break-all;
    margin-top: 8px;
}

.link-fallback-url-link {
    display: inline-block;
    font-size: 14px;
    color: #ffa500;
    font-weight: 600;
    text-decoration: underline;
    transition: color 0.3s;
    font-family: monospace;
    max-width: 100%;
    overflow-wrap: break-word;
    word-break: break-all;
    padding: 8px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
}

.link-fallback-url-link:hover {
    color: #ff8c00;
    text-decoration: none;
}

/* Мобильные стили */
@media (max-width: 768px) {
    .info-item {
        flex-wrap: wrap;
        align-items: flex-start;
    }

    .info-item .info-value {
        width: 100%;
        margin-top: 4px;
        text-align: left;
    }

    #userEmail {
        text-align: left;
    }

    .link-fallback-url-link {
        font-size: 12px;
        padding: 10px;
        display: block;
        width: 100%;
        text-align: center;
        word-break: break-all;
        overflow-wrap: break-word;
    }

    .link-fallback-url-display {
        margin-top: 12px;
    }
}

.telegram-linked-section {
    padding: 24px;
    background: #d4edda;
    border: 2px solid #28a745;
    border-radius: 8px;
    text-align: center;
}

.linked-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 600;
    color: #28a745;
}

.badge-icon {
    font-size: 20px;
}

.profile-links {
    display: flex;
    justify-content: center;
    gap: 16px;
    padding-top: 24px;
    border-top: 1px solid #e0e0e0;
}

.profile-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
    padding-top: 24px;
    border-top: 1px solid #e0e0e0;
}

.not-authenticated {
    text-align: center;
    padding: 40px;
}

.not-authenticated p {
    font-size: 18px;
    color: #666666;
    margin-bottom: 24px;
}

.loading-container {
    text-align: center;
    padding: 40px;
}

.loading-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #ffa500;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: #ffa500;
    color: #ffffff;
}

.btn-primary:hover {
    background: #ff8c00;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(255, 165, 0, 0.3);
}

.btn-secondary {
    background: #6c757d;
    color: #ffffff;
}

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(108, 117, 125, 0.3);
}

/* Payment History Styles */
.payment-history-section {
    margin-top: 32px;
    padding-top: 32px;
    border-top: 2px solid #e0e0e0;
}

.payment-history-title {
    font-size: 24px;
    font-weight: 700;
    color: #000000;
    margin-bottom: 24px;
}

.payment-history-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.payment-history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.payment-history-item:hover {
    background: #f0f0f0;
    border-color: #ffa500;
    transform: translateX(4px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.payment-history-item-left {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.payment-history-date {
    font-size: 14px;
    color: #666666;
}

.payment-history-provider {
    font-size: 12px;
    color: #999999;
    text-transform: uppercase;
}

.payment-history-item-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.payment-history-amount {
    font-size: 18px;
    font-weight: 700;
    color: #28a745;
}

.payment-history-tokens {
    font-size: 14px;
    color: #ffa500;
    font-weight: 600;
}

.payment-history-empty {
    text-align: center;
    padding: 40px 20px;
    color: #666666;
}

.payment-history-empty p {
    font-size: 16px;
    margin-bottom: 20px;
}

/* Responsive */
@media (max-width: 768px) {
    .payment-history-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .payment-history-item-right {
        align-items: flex-start;
        width: 100%;
    }
    
    .payment-history-title {
        font-size: 20px;
    }
}
