/* Profile Page Styles - ReelShort User Profile Management */

/* Main Profile Container */
.profile-container {
    min-height: calc(100vh - 80px); /* Account for header height */
    background-color: #101010;
    padding: 20px 0;
}

.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 50vh;
    color: #666;
}

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

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

.dynamic-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

.content-section {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* Profile Header */
.profile-header {
    text-align: center;
    padding: 30px 20px;
    background: linear-gradient(135deg, #ff0058, #ff5e00);
    color: white;
}

.profile-header h1 {
    font-size: 2.2rem;
    font-weight: bold;
    margin-bottom: 8px;
}

.profile-header .subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Registration Verification Section */
.verification-container {
    background: white;
}

.verification-content {
    padding: 30px;
}

.email-display {
    display: flex;
    align-items: center;
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
    border-left: 4px solid #ff0058;
}

.email-icon {
    font-size: 2rem;
    color: #ff0058;
    margin-right: 15px;
}

.email-info p {
    color: #666;
    margin-bottom: 5px;
}

.email-info strong {
    color: #333;
    font-size: 1.1rem;
}

/* OTP Form */
.otp-form {
    text-align: center;
}

.otp-input-group {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-bottom: 30px;
}

.otp-digit {
    width: 50px;
    height: 60px;
    text-align: center;
    font-size: 1.5rem;
    font-weight: bold;
    border: 2px solid #ddd;
    border-radius: 8px;
    background: white;
    transition: all 0.3s ease;
    outline: none;
}

.otp-digit:focus {
    border-color: #ff0058;
    box-shadow: 0 0 0 3px rgba(255, 0, 88, 0.1);
}

.otp-digit.filled {
    border-color: #ff0058;
    background: #fff5f8;
}

.otp-digit.error {
    border-color: #dc3545;
    animation: shake 0.3s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Form Actions */
.form-actions {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
}

/* Button Styles */
.primary-btn {
    background: linear-gradient(45deg, #ff0058, #ff5e00);
    color: white;
    border: none;
    padding: 14px 30px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    min-width: 200px;
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 0, 88, 0.3);
}

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

.secondary-btn {
    background: transparent;
    color: #ff0058;
    border: 2px solid #ff0058;
    padding: 12px 25px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.secondary-btn:hover {
    background: #ff0058;
    color: white;
}

.secondary-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.danger-btn {
    background: #dc3545;
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.danger-btn:hover {
    background: #c82333;
}

/* Button Loading States */
.btn-loading {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-loading::before {
    content: '';
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.btn-countdown {
    color: #666;
    font-weight: normal;
}

.help-text {
    text-align: center;
    margin-top: 20px;
    color: #666;
    font-size: 0.9rem;
}

/* User Profile Management Section */
.profile-content {
    padding: 30px;
}

/* User Info Card */
.user-info-section {
    margin-bottom: 30px;
}

.user-card {
    display: flex;
    align-items: center;
    padding: 25px;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 12px;
    border: 1px solid #dee2e6;
}

.user-avatar-large {
    width: 80px;
    height: 80px;
    background: linear-gradient(45deg, #ff0058, #ff5e00);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: bold;
    margin-right: 20px;
    box-shadow: 0 4px 15px rgba(255, 0, 88, 0.2);
}

.user-details h2 {
    color: #333;
    margin-bottom: 5px;
    font-size: 1.5rem;
}

.user-details p {
    color: #666;
    margin-bottom: 8px;
    font-size: 1rem;
}

.user-type {
    background: #ff0058;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

/* Tab Navigation */
.tab-navigation {
    display: flex;
    border-bottom: 2px solid #f1f3f4;
    margin-bottom: 30px;
}

.tab-btn {
    background: none;
    border: none;
    padding: 15px 25px;
    font-size: 1rem;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tab-btn:hover {
    color: #ff0058;
    background: rgba(255, 0, 88, 0.05);
}

.tab-btn.active {
    color: #ff0058;
    border-bottom-color: #ff0058;
    background: rgba(255, 0, 88, 0.05);
}

/* Tab Content */
.tab-content-container {
    position: relative;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

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

/* Form Sections */
.password-section,
.oauth-section {
    margin-bottom: 30px;
}

.password-section h3,
.oauth-section h3 {
    color: #333;
    margin-bottom: 8px;
    font-size: 1.3rem;
}

.section-description {
    color: #666;
    margin-bottom: 25px;
    line-height: 1.5;
}

/* Password Form */
.password-form {
    max-width: 400px;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    color: #333;
    font-weight: 600;
    margin-bottom: 8px;
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    outline: none;
    background: white;
}

.form-group input:focus {
    border-color: #ff0058;
    box-shadow: 0 0 0 3px rgba(255, 0, 88, 0.1);
}

/* Password Strength Indicator */
.password-strength {
    margin-top: 10px;
}

.strength-indicator {
    width: 100%;
    height: 4px;
    background: #f1f3f4;
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 5px;
}

.strength-bar {
    height: 100%;
    width: 0%;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.strength-bar.weak { background: #dc3545; width: 25%; }
.strength-bar.fair { background: #ffc107; width: 50%; }
.strength-bar.good { background: #28a745; width: 75%; }
.strength-bar.strong { background: #007bff; width: 100%; }

.strength-text {
    font-size: 0.85rem;
    color: #666;
}

/* Connected Accounts */
.connected-accounts {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

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

.account-item:hover {
    background: #e9ecef;
    transform: translateY(-1px);
}

.provider-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.provider-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: bold;
    color: white;
}

.google-icon {
    background: #4285F4;
}

.facebook-icon {
    background: #1877F2;
}

.apple-icon {
    background: #000000;
    font-size: 1rem;
}

.provider-details {
    display: flex;
    flex-direction: column;
}

.provider-name {
    font-weight: 600;
    color: #333;
    margin-bottom: 2px;
}

.connection-status {
    font-size: 0.85rem;
    color: #666;
}

.connection-status.connected {
    color: #28a745;
}

.connection-status.current {
    color: #007bff;
    font-weight: 600;
}

.current-login-indicator {
    background: #e7f3ff;
    color: #0056b3;
    padding: 2px 6px;
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: 600;
    margin-left: 8px;
    display: inline-block;
}

.link-btn {
    background: #ff0058;
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.link-btn:hover {
    background: #e6004f;
}

.link-btn.guest-connect {
    background: linear-gradient(135deg, #ff0058, #ff6b9d);
    font-weight: 600;
    padding: 10px 18px;
    box-shadow: 0 2px 8px rgba(255, 0, 88, 0.3);
}

.link-btn.guest-connect:hover {
    background: linear-gradient(135deg, #e6004e, #e55a89);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 0, 88, 0.4);
}

.unlink-btn {
    background: #dc3545;
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.unlink-btn:hover {
    background: #c82333;
}

/* Error State */
.error-container {
    text-align: center;
    padding: 60px 30px;
}

.error-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.error-container h2 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.8rem;
}

.error-container p {
    color: #666;
    margin-bottom: 30px;
    font-size: 1.1rem;
}

/* Message Overlay */
.message-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.message-content {
    background: white;
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    max-width: 400px;
    margin: 20px;
    position: relative;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from { transform: scale(0.8) translateY(-20px); opacity: 0; }
    to { transform: scale(1) translateY(0); opacity: 1; }
}

.message-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.message-icon.success::before {
    content: '✅';
}

.message-icon.error::before {
    content: '❌';
}

.message-icon.warning::before {
    content: '⚠️';
}

.message-icon.info::before {
    content: 'ℹ️';
}

.message-text {
    color: #333;
    font-size: 1.1rem;
    margin-bottom: 20px;
    line-height: 1.4;
}

.message-close {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #666;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.message-close:hover {
    background: #f1f3f4;
    color: #333;
}

/* Confirmation Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    border-radius: 12px;
    padding: 30px;
    max-width: 400px;
    margin: 20px;
    animation: slideIn 0.3s ease;
}

.modal-content h3 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.modal-content p {
    color: #666;
    margin-bottom: 25px;
    line-height: 1.4;
}

.modal-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
}

/* Utility Classes */
.hidden {
    display: none !important;
}

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

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

/* API Testing Tab Styles */
.api-testing-section {
    padding: 20px;
}

.api-actions {
    display: grid;
    gap: 20px;
    margin-bottom: 30px;
}

.api-action-card {
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
    background: linear-gradient(135deg, #fafbff 0%, #f8f9fa 100%);
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    transition: all 0.3s ease;
}

.api-action-card:hover {
    border-color: #ff0058;
    box-shadow: 0 4px 12px rgba(255, 0, 88, 0.1);
    transform: translateY(-2px);
}

.api-info {
    flex: 1;
}

.api-info h4 {
    margin: 0 0 8px 0;
    color: #333;
    font-size: 1.2rem;
    font-weight: 600;
}

.api-info p {
    margin: 0 0 15px 0;
    color: #666;
    font-size: 0.9rem;
    line-height: 1.4;
}

.api-params {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 15px;
}

.form-control {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.9rem;
    background: white;
    transition: border-color 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: #ff0058;
    box-shadow: 0 0 0 2px rgba(255, 0, 88, 0.1);
}

.form-control.small {
    flex: 1;
    min-width: 120px;
}

.api-results {
    background: linear-gradient(135deg, #f8f9fa 0%, #f1f3f4 100%);
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e0e0e0;
}

.results-header h4 {
    margin: 0;
    color: #333;
    font-size: 1.1rem;
}

.clear-btn {
    background: #6c757d;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background-color 0.3s;
}

.clear-btn:hover {
    background: #5a6268;
}

.api-output-code {
    background: #2d2d2d;
    color: #f8f8f2;
    padding: 20px;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.4;
    max-height: 400px;
    overflow-y: auto;
    white-space: pre-wrap;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    border: 1px solid #3c3c3c;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* API按钮样式增强 */
.api-action-card .primary-btn {
    min-width: 130px;
    white-space: nowrap;
    font-weight: 500;
}

.api-action-card .secondary-btn {
    min-width: 130px;
    white-space: nowrap;
    background: #6c757d;
    font-weight: 500;
}

.api-action-card .secondary-btn:hover {
    background: #5a6268;
    transform: translateY(-1px);
}

/* Icon code 样式 */
.icon-code::before {
    content: '</>';
    font-family: monospace;
    font-weight: bold;
}

/* Loading状态样式 */
.api-output-code.loading {
    color: #ffd700;
    background: linear-gradient(90deg, #2d2d2d 0%, #3a3a3a 50%, #2d2d2d 100%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* 成功/错误状态样式 */
.api-output-code.success {
    border-left: 4px solid #28a745;
}

.api-output-code.error {
    border-left: 4px solid #dc3545;
}

.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }
.mb-10 { margin-bottom: 10px; }
.mb-20 { margin-bottom: 20px; }

/* Responsive Design */
@media (max-width: 768px) {
    .profile-container {
        padding: 10px 0;
    }
    
    .dynamic-content {
        padding: 0 10px;
    }
    
    .profile-header {
        padding: 25px 15px;
    }
    
    .profile-header h1 {
        font-size: 1.8rem;
    }
    
    .verification-content,
    .profile-content {
        padding: 20px;
    }
    
    .otp-input-group {
        gap: 8px;
    }
    
    .otp-digit {
        width: 40px;
        height: 50px;
        font-size: 1.3rem;
    }
    
    .user-card {
        flex-direction: column;
        text-align: center;
        padding: 20px;
    }
    
    .user-avatar-large {
        margin-right: 0;
        margin-bottom: 15px;
    }
    
    .tab-navigation {
        flex-wrap: wrap;
    }
    
    .tab-btn {
        flex: 1;
        min-width: 120px;
    }
    
    .form-actions {
        width: 100%;
    }
    
    .primary-btn,
    .secondary-btn {
        width: 100%;
    }
    
    .account-item {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .provider-info {
        justify-content: center;
    }
    
    /* API Testing 响应式 */
    .api-action-card {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .api-params {
        justify-content: center;
    }
    
    .form-control.small {
        min-width: 100px;
        max-width: 150px;
    }
    
    .results-header {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .api-output-code {
        font-size: 11px;
        max-height: 300px;
    }
    
    .modal-actions {
        flex-direction: column;
    }
    
    .modal-actions button {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .profile-header h1 {
        font-size: 1.6rem;
    }
    
    .otp-digit {
        width: 35px;
        height: 45px;
        font-size: 1.2rem;
    }
    
    .user-avatar-large {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .message-content,
    .modal-content {
        margin: 10px;
        padding: 20px;
    }
}