/* Profile Container */
.profile-container-unique {
    display: flex;
    flex-direction: column;
    width: 80%;
    margin: 0 auto;
    padding: 30px;
    background-color: var(--background-color);
    color: var(--text-color);
    border-radius: 15px 15px 0 0;
    border: 2px solid var(--background-color);
    box-shadow: var(--box-shadow);
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Settings Icon */
.profile-container-unique #setting-icon-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 36px;
    color: var(--primary-color);
    cursor: pointer;
}

/* Profile Header */
.profile-header-edit {
    display: flex;
    flex-direction: row;
    gap: 1rem;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 3rem;
    width: 100%;
}

.profile-header-edit h1 {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    padding-bottom: 0.3rem;
    margin: 0;
    font-size: 1.5rem;
    height: fit-content;
}

/* Avatar Section */
.follow-avatar-container {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-direction: column;
    width: 200px;
    gap: 0.5rem;
}

.profile-avatar-edit {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 4px solid var(--primary-color);
    object-fit: cover;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.profile-avatar-edit:hover {
    transform: scale(1.05) rotate(3deg);
}

.profile-avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
    justify-content: center;
    display: flex;
    align-items: center;
}

.avatar-container-vv {
    width: 16px;
    height: 16px;
    margin-right: 0.5rem;
    border-radius: 50%;
    overflow: hidden;
}

/* Username Display */
.user-name-in-small-screen {
    display: none;
}

/* Profile Actions Container */
.profile-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

/* Follow Button */
.follow-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.5rem;
    border: 2px solid #ffa500;
    border-radius: 20px;
    background: var(--sidebar-secondary-bg-color);
    color: var(--text-color);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.follow-btn:hover {
    background: var(--primary-hover-color);
}

.follow-btn.following {
    background: var(--primary-hover-color) !important;
}

.follow-btn.following:hover {
    background: var(--error-color);
}

/* Tip Button */
.tip-btn {
    display: flex;
    align-items: center;
    gap: 0.2rem;
    padding: 0.5rem 1rem;
    border: 2px solid #ffa500;
    border-radius: 20px;
    background: var(--sidebar-secondary-bg-color);
    color: var(--text-color);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tip-btn:hover {
    background: #ffa500;
    color: #000;
}

/* Follower Stats */
.follower-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    text-wrap: nowrap;
}
.Follow-stat-value {
    font-weight: 500;
    color: var(--text-color);
    letter-spacing: 0.5px;
    cursor: pointer;
}

/* Tip Modal */
.tip-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

.tip-modal-content {
    position: relative;
    background-color: var(--sidebar-secondary-bg-color);
    margin: 10% auto;
    padding: 0;
    border: 2px solid #ffa500;
    border-radius: 15px;
    width: 90%;
    max-width: 400px;
    animation: tip-modalSlideIn 0.3s ease;
}

@keyframes tip-modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tip-modal-header {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.7rem 1rem;
    background: linear-gradient(135deg, #ff8c00, #ffa500);
    color: white;
    border-radius: 13px 13px 0 0;
    overflow: hidden;
}

.tip-modal-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), transparent);
    pointer-events: none;
}

.tip-heart-icon {
    margin-right: 8px;
    animation: pulse 2s infinite;
}

.tip-modal-header h3 {
    margin: 0;
    font-weight: 700;
}

.tip-modal-close {
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s ease;
}

.tip-modal-body {
    padding: 1rem;
}

.tip-modal-body p {
    margin: 0 0 1rem 0;
    color: var(--text-color);
    text-align: center;
}

.support-links {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.support-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    background: var(--sidebar-bg-color);
    border: 2px solid transparent;
    border-radius: 10px;
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: all 0.2s ease;
}

.support-link:hover {
    border-color: #ffa500;
    background: rgba(255, 165, 0, 0.1);
    transform: translateX(5px);
}

.support-icon {
    font-size: 20px;
    color: #ffa500;
    min-width: 20px;
}

.support-link span {
    flex: 1;
}

.support-link .fas {
    font-size: 16px;
    opacity: 0.7;
}

/* Platform-specific icon colors */
.support-link[data-platform="paypal"] .support-icon {
    color: #0070ba;
}

.support-link[data-platform="patreon"] .support-icon {
    color: #ff424d;
}

.support-link[data-platform="kofi"] .support-icon {
    color: #ff5e5b;
}

.support-link[data-platform="subscribestar"] .support-icon {
    color: #ffa500;
}

/* Profile Header Content */
.profile-header-content {
    flex-grow: 1;
    padding-left: 1.5rem;
}

/* Level System */
.level-system {
    margin: 1rem 0;
}

.level-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
    font-weight: 500;
}

.profile-progress-bar {
    height: 12px;
    background-color: var(--progress-bar-bg);
    border-radius: 6px;
    overflow: hidden;
}

.profile-progress-fill {
    height: 100%;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

/* Profile Stats Grid */
.profile-stats-grid {
    text-wrap: nowrap;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.profile-stat-item {
    display: flex;
    color: var(--text-color);
    justify-content: center;
    align-items: center;
    flex-direction: row;
    text-align: center;
    padding: 0.3rem 0.5rem;
    cursor: pointer;
    gap: 0.5rem;
    background: var(--sidebar-secondary-bg-color);
    border-radius: 8px;
    border: 1px solid var(--input-border-color);
}

.stat-value {
    font-size: 1.5em;
    color: var(--primary-color);
    font-weight: bold;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.9em;
    color: var(--text-muted-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Profile Details */
.profile-details {
    margin-top: 1.3rem;
    width: 100%;
}

.profile-details i {
    color: var(--novel-metric-icon);
    margin-right: 8px;
    font-size: 18px;
    vertical-align: middle;
}

.profile-details p {
    font-size: 1.1em;
    color: var(--text-muted-color);
    margin: 10px 0;
    line-height: 1.5;
    white-space: pre-line;
    overflow-wrap: break-word;
    word-break: break-word;
}

.profile-details strong {
    color: var(--novel-metric-icon);
    margin-right: 8px;
    font-weight: 600;
}

/* Bio Edit Form */
.bio-edit-form {
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
    padding: 1rem;
    margin-bottom: 1rem;
    background-color: var(--sidebar-secondary-bg-color);
    border-radius: 10px;
    box-shadow: var(--box-shadow);
    opacity: 0;
    display: none;
    transition: opacity 0.3s ease;
}

.edit-profile-title {
    font-size: 1.5rem;
    color: var(--primary-color);
    position: relative;
    margin-bottom: 0.5rem;
}

.edit-profile-title::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--primary-color);
}

#username-feedback {
    margin-top: 5px;
    font-size: 0.9em;
}

/* Form Groups */
.form-group-v2 label{
    display: flex;
    margin-bottom: 0.3rem;
}

.form-group-v2 .form-control,
.form-group-v2 .form-control-file {
    width: 100%;
    padding: 10px;
    background-color: var(--input-bg-color);
    border: 1px solid var(--input-border-color);
    border-radius: 8px;
    color: var(--text-color);
    transition: border-color 0.3s ease;
}

.form-group-v2 .form-control:focus,
.form-group-v2 .form-control-file:focus {
    border-color: var(--primary-color);
    outline: none;
}

/* Avatar Upload */
.avatar-upload-v2 {
    display: flex;
    align-items: flex-start;
    flex-direction: column;
    margin-bottom: 0.7rem;
}

.avatar-upload-v2 label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(to right, var(--primary-color), var(--primary-hover-color));
    border-radius: 8px;
    cursor: pointer;
    color: var(--text-dark-light-color);
    padding: 10px;
    transition: all 0.2s ease-in-out;
}

.avatar-upload-v2 label::before {
    content: '📷';
    font-size: 1.1em;
}

/* Form Actions */
.form-actions {
    display: flex;
    justify-content: space-between;
    padding: 0;
}

.form-actions .btn {
    width: 48%;
    padding: 10px 20px;
    font-size: 1em;
    border: none;
    text-align: center;
    transition: background-color 0.3s ease, transform 0.3s ease;
    border-radius: 8px;
    cursor: pointer;
}

.form-actions .btn-primary {
    background-color: var(--primary-color);
    color: var(--text-dark-light-color);
}

.form-actions .btn-secondary {
    background-color: var(--cancel-btn-bg);
    color: var(--text-color);
}

.form-actions .btn-primary:hover {
    background-color: var(--primary-hover-color);
}

.form-actions .btn-secondary:hover {
    background-color: var(--chapter-nav-button-hover);
}

/* Series/Books Section */
.series-books {
    margin-top: 1.3rem;
    width: 100%;
}

.series-books h2 {
    text-wrap: nowrap;
    padding-bottom: 10px;
    color: var(--primary-color);
    margin-bottom: 0;
    font-size: 1.3rem;
    border-bottom: 2px solid var(--primary-color);
}

.series-container {
    position: relative;
    display: flex;
    align-items: center;
}

.series-scroll-container {
    width: 100%;
    overflow-x: scroll;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.series-scroll-container::-webkit-scrollbar {
    display: none;
}

.series-grid {
    display: flex;
    gap: 1.1rem;
    padding: 1rem 0;
}

/* Series Cards */
.series-card {
    display: flex;
    flex-direction: row;
    min-width: 340px;
    min-height: 180px;
    max-width: 400px;
    max-height: 180px;
    background-color: var(--sidebar-secondary-bg-color);
    border-radius: 10px;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.novel-stat-pulse{
  position: absolute;
  top: 8px;
  left: 8px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  animation: pulse 2s infinite;
}

.completed-pulse,
.ongoing-pulse {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
}

.completed-pulse{
  background-color: #FF5722;
}

.ongoing-pulse{
  background-color: #4CAF50;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.series-card .series-picture {
    width: 130px;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.main_card_info {
    padding: 0 15px;
    overflow: hidden;
}

.main_card_info h3 {
    font-size: 1.2em;
    color: var(--primary-color);
    padding: 0.5rem 0.5rem 0.5rem 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    margin-bottom: 0;
    text-align: left;
    text-decoration: none;
}

.main_card_info a {
    text-decoration: none;
}

.user-info-vv {
    display: flex;
    justify-content: flex-start;
    align-items: center;
}

.series-author-v2 {
    font-size: 0.9rem;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    max-height: 3em;
    text-align: left;
}

/* Draft Status */
.draft-profile-holder {
    margin: 0.5rem 0;
}

.novel-draft-profile {
    background-color: var(--primary-color);
    border: 2px solid var(--primary-color);
    color: var(--text-color);
    font-size: 0.7rem;
    padding: 3px 8px;
    border-radius: 0.25rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Novel Metrics */
.novel-metrics-v2 {
    display: flex;
    justify-content: flex-start;
    gap: 0.7rem;
    padding: 0.5rem 0;
}

.novel-metric-v2 {
    display: flex;
    align-items: center;
    font-size: 0.7em;
}

.novel-metric-v2 i {
    color: var(--novel-metric-icon);
}

.novel-metric-v2 span {
    margin-left: 5px;
}

/* Description */
.description-container {
    position: relative;
}

.description-v2 {
    font-size: 0.9rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    max-height: 3em;
    line-height: 1.5;
}

.see-more {
    font-size: 0.9rem;
    color: var(--novel-metric-icon);
}

.see-more:hover {
    text-decoration: underline;
}

/* Scroll Buttons */
.scroll-btn {
    position: absolute;
    top: 50%;
    width: 40px;
    height: 40px;
    font-size: 20px;
    color: var(--text-color);
    background-color: rgba(255, 140, 0, 0.7);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translateY(-50%);
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.scroll-btn:hover {
    background-color: var(--primary-color);
    transform: translateY(-50%) scale(1.1);
}

.scroll-btn:active {
    transform: translateY(-50%) scale(0.95);
}

.scroll-left {
    left: -20px;
}

.scroll-right {
    right: -20px;
}

/* Tablet View */
@media (max-width: 992px) {
    .profile-avatar-edit {
        width: 120px;
        height: 120px;
    }
    
    .profile-header-edit {
        flex-direction: column;
        align-items: center;
        padding-bottom: 1rem;
        gap: 0;
    }
    
    .profile-container-unique #setting-icon-btn {
        right: 10px;
        top: 10px;
    }
    
    .profile-header-content {
        width: 100%;
        padding: 0;
    }
    
    .follow-avatar-container {
        width: 100%;
        border-bottom: 2px solid var(--primary-color);
        padding-bottom: 1.3rem;
    }
    
    .user-name-in-small-screen {
        display: block;
        padding: 0;
        border-bottom: none;
    }
    
    .user-name-in-big-screen {
        display: none;
    }
}

/* Mobile View */
@media (max-width: 768px) {
    .profile-container-unique {
        width: 100%;
        padding: 1.5rem;
        gap: 0.2rem;
    }

    .series-grid {
        gap: 1rem;
    }
    
    .series-books {
        margin: 0;
    }
    
    .series-books h2 {
        font-size: 1.1rem;
        padding-bottom: 5px;
    }
    
    .profile-details {
        margin: 0;
    }
    
    .follow-btn:hover {
        background: none;
    }
    
    .follow-btn.following:hover {
        background: none;
    }
    
    .scroll-btn {
        display: none;
    }

    .series-scroll-container {
        scrollbar-width: thin;
        scrollbar-color: var(--scrollbar-thumb-bg) var(--scrollbar-track-bg);
    }
    
    .series-scroll-container::-webkit-scrollbar {
        width: 8px;
        height: 8px;
        display: block;
    }
    
    .series-scroll-container::-webkit-scrollbar-track {
        background: var(--scrollbar-track-bg);
        border-radius: 10px;
    }
    
    .series-scroll-container::-webkit-scrollbar-thumb {
        background-color: var(--scrollbar-thumb-bg);
        border-radius: 10px;
        transition: background-color 0.3s ease;
    }
    
    .series-scroll-container::-webkit-scrollbar-thumb:hover {
        background-color: var(--scrollbar-thumb-hover-bg);
    }
}

/* Small Mobile View */
@media (max-width: 480px) {
    .profile-container-unique {
        padding: 1rem;
        align-items: center;
    }
    
    .profile-details p {
        font-size: 1rem;
    }

    .edit-profile-title {
        font-size: 1.2rem;
    }
    
    .profile-stats-grid {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }

    .bio-edit-form {
        padding: 0.8rem;
    }
}