/* Bio Editor Page Body Override - MAXIMUM PRIORITY - LOAD FIRST */
body.bio-editor-page {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

/* Prevent mobile zoom on input fields */
input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
textarea {
    font-size: 16px !important;
    -webkit-text-size-adjust: 100%;
    -moz-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    text-size-adjust: 100%;
    /* Ensure consistent sizing */
    box-sizing: border-box;
    /* Prevent iOS zoom */
    -webkit-appearance: none;
    appearance: none;
}

/* Ensure no JavaScript can override this */
body.bio-editor-page[style*="padding-top"] {
    padding-top: 0 !important;
}

body.bio-editor-page[style*="margin-top"] {
    margin-top: 0 !important;
}

/* Bio Editor Container */
body.bio-editor-page .bio-editor-container {
    display: flex;
    min-height: calc(100vh - 80px);
    background: var(--background-color);
    padding: 80px 20px 20px 20px !important;
    gap: 20px;
}

/* Mobile responsive override */
@media (max-width: 768px) {
    body.bio-editor-page {
        padding-top: 0 !important;
        margin-top: 0 !important;
    }

    body.bio-editor-page .bio-editor-container {
        padding-top: 70px !important;
    }
    
    /* Additional mobile zoom prevention */
    input[type="text"],
    input[type="email"],
    input[type="url"],
    input[type="password"],
    textarea {
        font-size: 16px !important;
        -webkit-text-size-adjust: 100%;
        -moz-text-size-adjust: 100%;
        -ms-text-size-adjust: 100%;
        text-size-adjust: 100%;
        /* Prevent iOS zoom */
        -webkit-appearance: none;
        border-radius: 0;
    }
    
    /* Ensure proper touch targets on mobile */
    input[type="text"],
    input[type="email"],
    input[type="url"],
    input[type="password"],
    textarea {
        min-height: 44px;
        padding: 12px 15px;
    }
}

.bio-editor-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    max-width: calc(100% - 420px);
    gap: 20px;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    font-size: 0.9rem;
}

.action-btn.primary-btn {
    background: var(--primary-color);
    color: white;
}

.action-btn.secondary-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.action-btn.preview-btn {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    backdrop-filter: blur(10px);
}

.action-btn.publish-btn {
    background: #10b981;
    color: white;
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.action-btn:disabled {
    background: #6B7280;
    color: #9CA3AF;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Link Limit Display */
.link-limit-display {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 8px;
    padding: 12px 16px;
    margin-top: 12px;
}

.link-limit-display .limit-info {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #3B82F6;
    font-weight: 500;
    font-size: 0.9rem;
}

.link-limit-display .limit-reached {
    background: #FEE2E2;
    color: #DC2626;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-left: auto;
}

.link-limit-display .upgrade-message {
    margin: 8px 0 0 0;
    color: #6B7280;
    font-size: 0.85rem;
}

/* Locked Tab Styles */
.nav-tab.locked-tab {
    opacity: 0.6;
    position: relative;
}

.nav-tab.locked-tab:hover {
    background: rgba(255, 255, 255, 0.1);
    cursor: not-allowed;
}

.nav-tab .tab-lock-icon {
    font-size: 0.8rem;
    margin-left: 4px;
    opacity: 0.7;
}

/* Navigation Tabs */
.editor-navigation {
    margin-bottom: 30px;
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--background-color);
    padding: 10px 0;
    margin: -10px 0 20px 0;
}

.nav-tabs {
    display: flex;
    background: var(--secondary-color);
    border-radius: 12px;
    padding: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    width: 100%;
}

.nav-tabs::-webkit-scrollbar {
    display: none;
}

.nav-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    font-weight: 500;
    min-width: 120px;
    justify-content: center;
    flex-shrink: 0;
}

.nav-tab:hover {
    background: rgba(var(--primary-color-rgb), 0.1);
    color: var(--primary-color);
}

.nav-tab.active {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 2px 8px rgba(var(--primary-color-rgb), 0.3);
}

.nav-tab i {
    font-size: 1.1rem;
}

/* Tab Content */
.tab-content-container {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.tab-content {
    display: none;
    flex: 1;
    background: var(--secondary-color);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) var(--secondary-color);
}

.tab-content::-webkit-scrollbar {
    width: 8px;
}

.tab-content::-webkit-scrollbar-track {
    background: var(--secondary-color);
    border-radius: 4px;
}

.tab-content::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

.tab-content::-webkit-scrollbar-thumb:hover {
    background: var(--accent-color);
}

.tab-content.active {
    display: block;
}

.tab-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tab-header h3 {
    margin: 0;
    color: var(--text-color);
    font-size: 1.5rem;
    font-weight: 700;
}

.tab-header p {
    margin: 5px 0 0 0;
    color: var(--text-muted);
    font-size: 1rem;
}

/* Category Filter Container */
.category-filter-container {
    margin-bottom: 30px;
}

.category-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 20px;
    background: var(--card-background);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.category-filter-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: var(--background-color);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-color);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    min-height: 44px;
}

.category-filter-btn:hover {
    border-color: var(--primary-color);
    background: rgba(0, 255, 247, 0.05);
    transform: translateY(-2px);
}

.category-filter-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--background-color);
    box-shadow: 0 4px 12px rgba(0, 255, 247, 0.3);
}

.category-filter-btn i {
    font-size: 1rem;
    width: 16px;
    text-align: center;
}

.category-name {
    font-weight: 600;
}

.category-count {
    background: rgba(255, 255, 255, 0.2);
    color: inherit;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 600;
    min-width: 20px;
    text-align: center;
}

.category-filter-btn.active .category-count {
    background: rgba(0, 0, 0, 0.2);
    color: var(--background-color);
}

/* Template Gallery Container */
.template-gallery-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
    margin-bottom: 30px;
}

/* Template Gallery Scroll - Horizontal */
.template-gallery-scroll {
    display: flex;
    gap: 20px;
    height: 850px; /* Increased height to properly show tall template frames */
    overflow-x: auto;
    overflow-y: hidden;
    padding: 20px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: var(--card-background);
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) transparent;
    scroll-behavior: smooth;
}

.template-gallery-scroll::-webkit-scrollbar {
    height: 8px;
}

.template-gallery-scroll::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.template-gallery-scroll::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

.template-gallery-scroll::-webkit-scrollbar-thumb:hover {
    background: var(--accent-color);
}

/* Template Gallery Item */
.template-gallery-item {
    background: var(--background-color);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 2px solid transparent;
    cursor: pointer;
    position: relative;
    flex: 0 0 350px; 
    width: 350px;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.template-gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.template-gallery-item.selected {
    border-color: var(--primary-color);
    box-shadow: 0 0 20px rgba(0, 255, 247, 0.3);
}

.template-gallery-item .phone-frame {
    width: calc(100% - 20px);
    height: 676px; /* Increased by 30% from 520px */
    background: linear-gradient(145deg, #2d3748, #1a202c);
    border-radius: 20px;
    padding: 6px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    position: relative;
    border: 1px solid #4a5568;
    margin: 10px;
    flex-shrink: 0;
}

.template-gallery-item .phone-frame::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: #4a5568;
    border-radius: 2px;
}

.template-gallery-item .phone-screen {
    width: 100%;
    height: 100%;
    background: #000;
    border-radius: 15px;
    overflow: auto;
    position: relative;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
}

.template-gallery-item .phone-screen::-webkit-scrollbar {
    width: 4px;
}

.template-gallery-item .phone-screen::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
}

.template-gallery-item .phone-screen::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
}

.template-gallery-item .phone-screen::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* Scroll hint for template previews */
.template-gallery-item .phone-frame::after {
    content: '↕ Scroll to explore';
    position: absolute;
    bottom: 5px;
    right: 5px;
    background: rgba(0, 0, 0, 0.7);
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 4px;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.template-gallery-item:hover .phone-frame::after {
    opacity: 1;
}

.template-gallery-item .template-iframe {
    width: 100%;
    height: 100%;
    border: none;
    position: absolute;
    top: 0;
    left: 0;
    pointer-events: auto;
    overflow: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
}

.template-gallery-item .template-iframe::-webkit-scrollbar {
    width: 4px;
}

.template-gallery-item .template-iframe::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
}

.template-gallery-item .template-iframe::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
}

.template-gallery-item .template-iframe::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

.template-gallery-item .template-info {
    padding: 15px;
    text-align: center;
    background: var(--card-background);
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.template-gallery-item .template-title {
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 5px;
    font-size: 1rem;
    line-height: 1.2;
}

.template-gallery-item .template-description {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 0;
    line-height: 1.3;
}

.template-gallery-item .template-label {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    z-index: 10;
}

.template-gallery-item .template-label.free {
    background-color: #10b981;
    color: white;
}

.template-gallery-item .template-label.premium {
    background-color: #f59e0b;
    color: white;
}

.template-gallery-item .template-label.owned {
    background-color: #22c55e;
    color: white;
}

#template-frame-single::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.4);
    border-radius: 3px;
}

.template-info-display {
    position: absolute;
    right: -180px;
    bottom: 120px;
    width: 170px;
    max-width: 170px;
    padding: 0;
    margin: 0;
    text-align: left;
    z-index: 10;
    background: none;
    backdrop-filter: none;
    border: none;
}

.template-info-display h3 {
    font-size: 1.2rem;
    margin-bottom: 6px;
    text-align: left;
    font-weight: 700;
    color: var(--text-color);
}

.template-info-display p {
    font-size: 0.9rem;
    margin-bottom: 0;
    text-align: left;
    line-height: 1.4;
    color: var(--text-muted);
}



/* Profile Editor */
.profile-editor {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.profile-section {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 30px;
    align-items: start;
}

.profile-image-section {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.profile-pic-container {
    position: relative;
}

.profile-pic-preview {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--primary-color);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    position: relative;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.avatar-initials {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-muted);
    background: var(--secondary-color);
    border-radius: 50%;
    z-index: 2;
    letter-spacing: 0.02em;
    text-align: center;
    padding: 0 10px;
    line-height: 1.2;
    white-space: pre-line;
}

.profile-pic-preview:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    border-color: var(--accent-color);
}

.profile-pic-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-pic-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    font-size: 0.8rem;
}

.profile-pic-preview:hover .profile-pic-overlay {
    opacity: 1;
}

.profile-pic-overlay i {
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.profile-form-section {
    flex: 1;
}

.modern-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-color);
}

.form-group input,
.form-group textarea {
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background: var(--card-background);
    color: var(--text-color);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(var(--primary-color-rgb), 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.char-counter {
    margin-top: 5px;
    font-size: 0.85rem;
    color: var(--text-muted);
    text-align: right;
}

/* Link Preview */
.link-preview {
    display: flex;
    align-items: center;
    background: var(--card-background);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 12px 16px;
    margin-top: 8px;
}

.link-prefix {
    color: var(--text-muted);
    margin-right: 2px;
    font-weight: 500;
}

.username-value {
    font-weight: 600;
    color: var(--primary-color);
    flex-grow: 1;
}

.link-actions {
    display: flex;
    gap: 8px;
}

.icon-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 20px;
}

/* Links Manager */
.links-manager {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.links-grid {
    display: grid;
    gap: 15px;
}

.links-placeholder {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
    background: var(--card-background);
    border: 2px dashed var(--border-color);
    border-radius: 12px;
}

.links-placeholder i {
    font-size: 3rem;
    margin-bottom: 15px;
    opacity: 0.5;
}

.links-placeholder h4 {
    margin: 0 0 8px 0;
    font-size: 1.2rem;
}

.links-placeholder p {
    margin: 0;
    font-size: 0.9rem;
}

.link-item {
    background: var(--card-background);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.3s ease;
}

.link-item:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.link-icon {
    font-size: 1.3rem;
    color: var(--primary-color);
    width: 24px;
    text-align: center;
}

.link-details {
    flex: 1;
}

.link-title {
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--text-color);
}

.link-url {
    font-size: 0.85rem;
    color: var(--text-muted);
    word-break: break-all;
}

.link-item .link-actions {
    display: flex;
    gap: 8px;
}

.edit-button,
.delete-button {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.edit-button:hover {
    background: var(--border-color);
    color: var(--primary-color);
}

.delete-button:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

/* Social Manager */
.social-manager {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.social-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.social-link-input {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--card-background);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 12px 16px;
    transition: all 0.3s ease;
}

.social-link-input:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(var(--primary-color-rgb), 0.1);
}

.social-link-input i {
    font-size: 1.2rem;
    color: var(--primary-color);
    width: 20px;
    text-align: center;
}

.social-link-input input {
    flex: 1;
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1rem;
}

.social-link-input input:focus {
    outline: none;
}

.social-actions {
    display: flex;
    justify-content: center;
}

/* Preview Sidebar */
.preview-sidebar {
    width: 400px;
    background: var(--secondary-color);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 20px;
    height: fit-content;
}

.preview-header {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border-color);
}

.preview-header h4 {
    margin: 0;
    color: var(--text-color);
    font-size: 1.2rem;
    font-weight: 700;
}

.preview-container {
    display: flex;
    justify-content: center;
}

.preview-frame-container {
    width: 100%;
    max-width: 375px;
    height: 667px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    background: white;
    transition: all 0.3s ease;
}

#preview-frame {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 10px;
    zoom: 0.8;
}

.preview-actions {
    margin-top: 20px;
    display: flex;
    justify-content: center;
}

.preview-actions .action-btn {
    width: 100%;
    max-width: 300px;
}

/* Message Container */
.message-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.message {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateX(400px);
    transition: transform 0.3s ease;
}

.message.show {
    transform: translateX(0);
}

.success-message {
    background: #10b981;
    color: white;
}

.error-message {
    background: #ef4444;
    color: white;
}

.message i {
    font-size: 1.1rem;
}

.message-text {
    font-weight: 500;
}

/* Design Manager */
.design-manager {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.design-section {
    background: var(--card-background);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 25px;
}

.design-section h4 {
    margin: 0 0 20px 0;
    color: var(--text-color);
    font-size: 1.2rem;
    font-weight: 600;
}

.modern-select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background: var(--card-background);
    color: var(--text-color);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modern-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(var(--primary-color-rgb), 0.1);
}

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

.modal-content {
    background: var(--card-background);
    margin: 5% auto;
    padding: 30px;
    border-radius: 15px;
    max-width: 500px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    position: relative;
    animation: modalSlideIn 0.3s ease;
}

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

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 1.5rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.3s ease;
}

.close-modal:hover {
    color: var(--text-color);
}

.link-item {
    background-color: var(--secondary-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 15px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.link-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    border-color: var(--primary-color);
}

.link-icon {
    font-size: 1.2rem;
    margin-right: 15px;
    width: 24px;
    text-align: center;
    color: var(--primary-color);
}

.link-details {
    flex-grow: 1;
}

.link-title {
    font-weight: 600;
    margin-bottom: 5px;
}

.link-url {
    font-size: 0.85rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 60%; /* Reduced from 100% to 60% as requested */
}

.link-actions {
    display: flex;
    gap: 10px;
}

.edit-button, .delete-button {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 4px;
    transition: background-color 0.2s ease, color 0.2s ease;
    box-shadow: none;
}

.edit-button:hover {
    background-color: var(--border-color);
    color: var(--text-color);
}

.delete-button:hover {
    background-color: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.add-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px;
    background-color: var(--secondary-color);
    color: var(--text-color);
    border: 2px dashed var(--border-color);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease;
    font-weight: 500;
}

.add-button:hover {
    background-color: var(--border-color);
    border-color: var(--primary-color);
}

.add-button i {
    font-size: 1rem;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 100;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    overflow: auto;
}

/* Token purchase modal should appear on top of other modals */
#token-purchase-modal {
    z-index: 200;
}

.modal-content {
    background-color: var(--card-background);
    margin: 10% auto;
    padding: 30px;
    border-radius: var(--border-radius);
    max-width: 500px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    position: relative;
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 1.5rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.2s ease;
}

.close-modal:hover {
    color: var(--text-color);
}

.form-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
}

/* Social Links Form */
.social-links-form {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.social-link-input {
    display: flex;
    align-items: center;
    gap: 10px;
    background-color: var(--secondary-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 10px 15px;
}

.social-link-input i {
    font-size: 1.2rem;
    width: 24px;
    text-align: center;
    color: var(--primary-color);
}

.social-link-input input {
    flex-grow: 1;
    background: none;
    border: none;
    color: var(--text-color);
    padding: 5px 0;
    font-size: 0.9rem;
}

.social-link-input input:focus {
    outline: none;
    box-shadow: none;
}

/* Preview Section */
.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.preview-header h3 {
    margin: 0;
}

#use-template-button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

#use-template-button:hover {
    background-color: var(--accent-color);
    transform: translateY(-2px);
}

/* Add subtle animation when template is selected */
#use-template-button.template-selected {
    animation: pulse-glow 2s infinite;
    box-shadow: 0 0 15px rgba(0, 255, 247, 0.4);
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 15px rgba(0, 255, 247, 0.4);
    }
    50% {
        box-shadow: 0 0 25px rgba(0, 255, 247, 0.6);
    }
}

.preview-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.preview-frame-container {
    width: 100%;
    max-width: 400px;
    height: 600px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    position: relative;
}

#preview-frame {
    width: 100%;
    height: 100%;
    border: none;
}

#open-preview-button {
    display: inline-block;
}

/* Placeholder Styles */
.links-placeholder {
    text-align: center;
    color: var(--text-muted);
    padding: 20px;
    border: 2px dashed var(--border-color);
    border-radius: var(--border-radius);
}

/* Drag and Drop Styles */
.link-item.dragging {
    opacity: 0.5;
    border: 2px dashed var(--primary-color);
}

.link-item .drag-handle {
    cursor: grab;
    color: var(--text-muted);
    margin-right: 10px;
}

.link-item .drag-handle:active {
    cursor: grabbing;
}

/* Templates Grid styles removed */

/* Preview Container Styles */
.preview-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.preview-frame-container {
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    background-color: var(--secondary-color);
}

.preview-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.secondary-button {
    background-color: var(--secondary-color) !important;
    color: var(--text-color) !important;
    border: 1px solid var(--border-color) !important;
}

.secondary-button:hover {
    background-color: var(--border-color) !important;
}

/* Profile Picture Upload */
.profile-image-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 20px 0 30px;
    position: relative;
}

.profile-pic-preview {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--primary-color);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    position: relative;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.avatar-initials {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-muted, #888);
    background: var(--secondary-color, #f8fafc);
    border-radius: 50%;
    z-index: 3;
    letter-spacing: 0.02em;
    text-align: center;
    padding: 0 10px;
    line-height: 1.2;
    white-space: pre-line;
}

.profile-pic-preview:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    border-color: var(--accent-color, #3b82f6);
}

.profile-pic-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Overlay effect when hovering over the profile picture */
.profile-pic-preview::after {
    content: '\f030'; /* Camera icon from Font Awesome */
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.profile-pic-preview:hover::after {
    opacity: 1;
}

/* Text hint for profile picture upload */
.profile-pic-hint {
    margin-top: 10px;
    color: var(--text-muted);
    font-size: 0.9rem;
    text-align: center;
}

/* Center text utility class */
.text-center {
    text-align: center;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .tab-content-container {
        flex-direction: column;
        max-height: none;
        min-height: auto;
    }

    .tab-content {
        max-height: 70vh;
    }

    .preview-sidebar {
        width: 100%;
        position: static;
        order: -1;
        margin-bottom: 30px;
    }

    .preview-frame-container {
        max-width: 300px;
        height: 500px;
    }
}

@media (max-width: 768px) {
    .bio-editor-container {
        padding: 70px 15px 15px 15px;
        flex-direction: column;
    }

    .bio-editor-content {
        max-width: 100%;
    }

    .tab-content-container {
        max-height: calc(100vh - 150px);
    }

    .tab-content {
        padding: 20px 15px;
        max-height: calc(100vh - 180px);
        overflow-y: auto;
    }

    .nav-tabs {
        padding: 6px;
        overflow-x: auto;
        scrollbar-width: none;
        -ms-overflow-style: none;
        justify-content: space-around;
    }

    .nav-tabs::-webkit-scrollbar {
        display: none;
    }

    .nav-tab {
        flex-direction: column;
        padding: 16px 10px;
        min-width: 90px;
        flex-shrink: 0;
        gap: 8px;
        text-align: center;
        min-height: 75px;
        justify-content: center;
    }

    .nav-tab i {
        font-size: 1.4rem;
        margin-bottom: 3px;
    }

    .nav-tab span {
        font-size: 0.8rem;
        line-height: 1.2;
        font-weight: 500;
    }

    .tab-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
        margin-bottom: 20px;
    }

    .tab-header h3 {
        font-size: 1.3rem;
    }

    .profile-section {
        grid-template-columns: 1fr;
        gap: 20px;
        text-align: center;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    /* Mobile Category Filters */
    .category-filters {
        padding: 15px;
        gap: 8px;
    }

    .category-filter-btn {
        flex-direction: column;
        padding: 8px 10px;
        font-size: 0.75rem;
        min-height: 50px;
        gap: 4px;
    }

    .category-filter-btn .category-name {
        display: block; /* Show text below icon on mobile */
        font-size: 0.7rem;
        line-height: 1;
    }

    .category-filter-btn i {
        font-size: 1.2rem;
        margin-bottom: 2px;
    }

    /* Mobile Template Gallery */
    .template-gallery-scroll {
        height: 720px; /* Increased height to properly show tall template frames */
        padding: 15px;
        gap: 15px;
    }

    .template-gallery-item {
        flex: 0 0 375px; /* Increased by 50% from 250px */
        width: 375px;
    }

    .template-gallery-item .phone-frame {
        height: 546px; /* Increased by 30% from 420px */
        margin: 8px;
    }

    .template-gallery-item .template-iframe {
        /* Keep full size and scrollable on mobile */
    }

    .template-info-display {
        position: absolute;
        right: -160px;
        bottom: 100px;
        width: 150px;
        max-width: 150px;
        padding: 0;
        margin: 0;
        text-align: left;
        z-index: 10;
        background: none;
        backdrop-filter: none;
        border: none;
    }

    .template-info-display h3 {
        font-size: 1.1rem;
        margin-bottom: 4px;
        text-align: left;
        font-weight: 700;
        color: var(--text-color);
    }

    .template-info-display p {
        font-size: 0.8rem;
        margin-bottom: 0;
        text-align: left;
        line-height: 1.3;
        color: var(--text-muted);
    }

    .template-iframe {
        width: 560px;
        height: 1120px;
    }

    #template-frame-single {
        top: 0;
        left: 0;
        transform: scale(0.5);
        overflow-y: auto;
        scrollbar-width: thin;
        -ms-overflow-style: auto;
    }

    #template-frame-single::-webkit-scrollbar {
        width: 4px;
    }

    #template-frame-single::-webkit-scrollbar-track {
        background: rgba(255, 255, 255, 0.1);
    }

    #template-frame-single::-webkit-scrollbar-thumb {
        background: rgba(255, 255, 255, 0.4);
        border-radius: 2px;
    }

    .template-control {
        width: 40px;
        height: 40px;
    }

    .social-grid {
        grid-template-columns: 1fr;
    }

    .preview-frame-container {
        max-width: 320px;
        height: 480px;
    }

    .message-container {
        left: 10px;
        right: 10px;
        top: 10px;
    }

    .message {
        transform: translateY(-100px);
    }

    .message.show {
        transform: translateY(0);
    }

    .action-btn {
        padding: 10px 16px;
        font-size: 0.9rem;
    }

    .modal-content {
        margin: 5% 10px;
        padding: 20px;
        max-width: none;
    }
}

@media (max-width: 480px) {
    .bio-editor-container {
        padding: 70px 10px 10px 10px;
        flex-direction: column;
    }

    .bio-editor-content {
        max-width: 100%;
    }

    .nav-tabs {
        padding: 5px;
        gap: 3px;
        justify-content: space-around;
    }

    .nav-tab {
        flex-direction: column;
        padding: 14px 6px;
        min-width: 75px;
        font-size: 0.8rem;
        gap: 6px;
        min-height: 70px;
        justify-content: center;
    }

    .nav-tab i {
        font-size: 1.3rem;
        margin-bottom: 3px;
    }

    .nav-tab span {
        font-size: 0.75rem;
        line-height: 1.1;
        display: block;
        font-weight: 500;
    }

    .tab-content {
        padding: 15px 10px;
        max-height: calc(100vh - 160px);
        overflow-y: auto;
    }

    .editor-navigation {
        margin-bottom: 15px;
        padding: 5px 0;
    }

    .tab-header h3 {
        font-size: 1.2rem;
    }

    .tab-header p {
        font-size: 0.9rem;
    }

    /* Small Screen Category Filters */
    .category-filters {
        padding: 12px;
        gap: 6px;
        justify-content: center;
    }

    .category-filter-btn {
        flex-direction: column;
        padding: 6px 8px;
        font-size: 0.7rem;
        min-height: 45px;
        flex: 0 0 auto;
        gap: 3px;
    }

    .category-filter-btn .category-name {
        display: block; /* Show text below icon on small screens */
        font-size: 0.65rem;
        line-height: 1;
    }

    .category-filter-btn i {
        font-size: 1.1rem;
        margin-bottom: 1px;
    }

    .category-count {
        font-size: 0.65rem;
        padding: 1px 3px;
        min-width: 14px;
    }

    .template-gallery-scroll {
        height: 650px; /* Increased height to properly show tall template frames */
        padding: 10px;
        gap: 12px;
    }

    .template-gallery-item {
        flex: 0 0 330px; /* Increased by 50% from 220px */
        width: 330px;
    }

    .template-gallery-item .phone-frame {
        height: 494px; /* Increased by 30% from 380px */
        margin: 5px;
    }

    .template-gallery-item .template-iframe {
        /* Keep full size and scrollable on small screens */
    }



    .template-iframe {
        width: 440px;
        height: 960px;
    }

    .profile-pic-preview {
        width: 100px;
        height: 100px;
    }

    .form-group input,
    .form-group textarea {
        padding: 10px 12px;
        font-size: 0.9rem;
    }

    .action-btn {
        padding: 8px 12px;
        font-size: 0.8rem;
    }

    .modal-content {
        margin: 5% 5px;
        padding: 15px;
        max-width: none;
    }

    .preview-sidebar {
        padding: 15px;
    }

    .preview-frame-container {
        max-width: 280px;
        height: 450px;
    }

    .social-link-input {
        padding: 8px 12px;
    }

    .link-item {
        padding: 15px;
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .link-actions {
        align-self: flex-end;
        width: 100%;
        justify-content: flex-end;
    }
}

/* Additional mobile improvements */
@media (max-width: 360px) {
    .nav-tab {
        flex-direction: column;
        padding: 12px 4px;
        min-width: 70px;
        gap: 5px;
        min-height: 65px;
        justify-content: center;
    }

    .nav-tab i {
        font-size: 1.2rem;
    }

    .nav-tab span {
        font-size: 0.7rem;
        line-height: 1;
        font-weight: 500;
    }

    .tab-content {
        padding: 12px 8px;
        max-height: calc(100vh - 140px);
        overflow-y: auto;
    }

    .editor-navigation {
        margin-bottom: 10px;
        padding: 3px 0;
    }

    .template-preview-container {
        height: 676px; /* Increased by 30% from 520px */
    }

    .phone-frame {
        width: 250px; 
        height: 546px;
    }

    .template-iframe {
        width: 600px; 
        height: 840px;
    }



    .template-nav-btn {
        width: 35px;
        height: 35px;
    }

    .template-control i {
        font-size: 1rem;
    }

    .profile-pic-preview {
        width: 90px;
        height: 90px;
    }

    .form-group input,
    .form-group textarea {
        padding: 8px 10px;
        font-size: 0.85rem;
    }

    .action-btn {
        padding: 6px 10px;
        font-size: 0.75rem;
    }

    .modal-content {
        margin: 2% 2px;
        padding: 12px;
    }

    .preview-frame-container {
        max-width: 280px;
        height: 546px; /* Increased by 30% from 420px */
    }

    .form-actions {
        flex-direction: column;
        gap: 8px;
    }

    .form-actions button {
        width: 100%;
    }
}

/* Template Labels */
.template-label {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.template-label.free {
    background-color: rgba(16, 185, 129, 0.2);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.4);
}

.template-label.premium {
    background-color: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.4);
}

.template-label.unlocked {
    background-color: rgba(16, 185, 129, 0.2);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.4);
}

.template-label.owned {
    background-color: rgba(34, 197, 94, 0.2);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.4);
    animation: pulse-owned 2s infinite;
}

@keyframes pulse-owned {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.template-label.premium-only {
    background-color: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.4);
    font-size: 0.7rem;
}

.template-label.premium-only-unlocked {
    background-color: rgba(147, 51, 234, 0.2);
    color: #9333ea;
    border: 1px solid rgba(147, 51, 234, 0.4);
}

.template-label i {
    font-size: 0.9rem;
}

/* Templates Carousel */
.templates-section {
    margin-bottom: 2rem;
}

.templates-carousel {
    position: relative;
    margin-top: 15px;
}



.carousel-controls {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 15px;
}

.carousel-control {
    background-color: var(--primary-color);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.carousel-control:hover {
    background-color: var(--accent-color);
    transform: scale(1.1);
}

.template-card {
    flex: 0 0 240px;
    background: #222;
    border-radius: 16px;
    box-shadow: 0 0 12px #00fff7;
    overflow: hidden;
    height: 580px;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.template-card.selected {
    transform: translateY(-10px);
    box-shadow: 0 0 20px var(--primary-color), 0 0 30px rgba(0, 255, 247, 0.5);
    border: 2px solid var(--primary-color);
}

.template-preview {
    width: 100%;
    height: 676px; /* Increased by 30% from 520px */
    border: none;
    background: #111;
}
.template-info {
    padding: 12px;
    text-align: center;
}
.template-title {
    font-weight: 700;
    color: #00fff7;
    margin-bottom: 8px;
}
.template-select-btn {
    background: #00fff7;
    color: #1a0033;
    border: none;
    border-radius: 8px;
    padding: 8px 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.template-select-btn:hover {
    background: #fff;
    color: #00fff7;
}

.template-card.selected .template-select-btn {
    background: var(--primary-color);
    color: white;
}

.template-card.selected .template-select-btn::after {
    content: " ✓";
}

.template-label {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10;
}

.template-label.free {
    background-color: #10b981;
    color: white;
}

.template-label.premium {
    background-color: #f59e0b;
    color: white;
}

.template-label.unlocked {
    background-color: #10b981;
    color: white;
}

.template-label.owned {
    background-color: #22c55e;
    color: white;
    animation: pulse-owned-simple 2s infinite;
}

@keyframes pulse-owned-simple {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

.template-label.premium-only {
    background-color: #ef4444;
    color: white;
    font-size: 0.65rem;
}

.template-label.premium-only-unlocked {
    background-color: #9333ea;
    color: white;
}

/* Premium Template Modal */
#premium-template-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
}

#premium-template-modal .modal-content {
    background-color: #222;
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #00fff7;
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    min-width: 320px;
    box-shadow: 0 0 24px #00fff7;
    color: white;
    text-align: center;
    margin: 0 auto;
}

.template-price-info {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 15px;
    margin: 15px 0;
    border: 1px solid rgba(0, 255, 247, 0.3);
    text-align: center;
}

.template-price-info p {
    margin: 8px 0;
    font-size: 1rem;
}

#premium-template-name {
    color: #00fff7;
    font-weight: bold;
}

#premium-template-price {
    font-weight: bold;
    color: #f59e0b;
}

#premium-template-modal h3 {
    color: #00fff7;
    margin-top: 0;
}

#premium-template-modal .close-modal {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

#premium-template-modal .close-modal:hover {
    color: #00fff7;
}

#premium-template-modal .form-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-top: 24px;
    flex-wrap: nowrap;
}

#use-tokens-btn {
    background-color: #00fff7;
    color: #1a0033;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 44px;
    flex: 1;
    max-width: 180px;
}

#use-tokens-btn:hover {
    background-color: #00e6e6;
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 255, 247, 0.5);
}

#buy-tokens-btn {
    background-color: #f59e0b;
    color: #1a0033;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 44px;
    flex: 1;
    max-width: 180px;
}

#buy-tokens-btn:hover {
    background-color: #f5b342;
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.5);
}

#close-premium-modal-btn {
    background-color: transparent;
    color: #fff;
    border: 1px solid #fff;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 44px;
    flex: 1;
    max-width: 180px;
}

#close-premium-modal-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Duration Notice Styles */
.duration-notice {
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, rgba(0, 255, 247, 0.1), rgba(0, 255, 247, 0.05));
    border: 1px solid rgba(0, 255, 247, 0.3);
    border-radius: 12px;
    padding: 16px;
    margin: 16px 0;
    gap: 12px;
}

.duration-icon {
    color: #00fff7;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.duration-text {
    flex: 1;
}

.duration-text strong {
    color: #00fff7;
    font-size: 1.1rem;
    display: block;
    margin-bottom: 4px;
}

.duration-text p {
    color: #ccc;
    margin: 0;
    font-size: 0.9rem;
}

.duration-highlight {
    color: #00fff7;
    font-weight: bold;
    background: rgba(0, 255, 247, 0.1);
    padding: 2px 8px;
    border-radius: 4px;
}

/* Media Tab Styles */
.media-manager {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.media-type-selector {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.media-type-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: var(--secondary-color);
    border: 2px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-weight: 500;
}

.media-type-btn:hover {
    background: rgba(var(--primary-color-rgb), 0.1);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.media-type-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    box-shadow: 0 2px 8px rgba(var(--primary-color-rgb), 0.3);
}

.media-type-btn i {
    font-size: 1.1rem;
}

.media-section {
    display: none;
}

.media-section.active {
    display: block;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.section-header h4 {
    margin: 0;
    color: var(--text-color);
    font-size: 1.2rem;
}

.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.media-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    background: var(--background-color);
    border: 2px dashed var(--border-color);
    border-radius: 12px;
    text-align: center;
    color: var(--text-secondary);
    grid-column: 1 / -1;
}

.media-placeholder i {
    font-size: 3rem;
    margin-bottom: 15px;
    opacity: 0.5;
}

.media-placeholder h4 {
    margin: 0 0 8px 0;
    font-size: 1.1rem;
}

.media-placeholder p {
    margin: 0;
    font-size: 0.9rem;
}

.media-item {
    background: var(--background-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 15px;
    transition: all 0.3s ease;
    position: relative;
}

.media-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-color);
}

.media-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.media-item-title {
    font-weight: 600;
    color: var(--text-color);
    margin: 0;
    font-size: 1rem;
}

.media-item-actions {
    display: flex;
    gap: 8px;
}

.media-item-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.media-item-btn:hover {
    color: var(--primary-color);
    background: rgba(var(--primary-color-rgb), 0.1);
}

.media-item-btn.delete:hover {
    color: #e53e3e;
    background: rgba(229, 62, 62, 0.1);
}

.youtube-embed {
    width: 100%;
    height: 180px;
    border-radius: 8px;
    margin-bottom: 10px;
}

.image-preview {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 10px;
}

.music-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--secondary-color);
    border-radius: 8px;
    margin-bottom: 10px;
}

.music-platform-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: white;
}

.music-platform-icon.spotify { background: #1db954; }
.music-platform-icon.apple-music { background: #fa243c; }
.music-platform-icon.youtube-music { background: #ff0000; }
.music-platform-icon.audiomack { background: #ff6600; }
.music-platform-icon.soundcloud { background: #ff7700; }
.music-platform-icon.bandcamp { background: #629aa0; }
.music-platform-icon.tidal { background: #000000; }
.music-platform-icon.deezer { background: #feaa2d; }
.music-platform-icon.amazon-music { background: #ff9900; }
.music-platform-icon.other { background: #666666; }

.music-info {
    flex: 1;
}

.music-title {
    font-weight: 600;
    color: var(--text-color);
    margin: 0 0 4px 0;
    font-size: 0.9rem;
}

.music-artist {
    color: var(--text-secondary);
    margin: 0;
    font-size: 0.8rem;
}

.media-actions {
    display: flex;
    justify-content: center;
    margin-top: 30px;
}

/* Image Preview in Modal */
.image-preview-container {
    margin: 15px 0;
    text-align: center;
}

.image-preview-container img {
    max-width: 100%;
    max-height: 200px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

/* Responsive Media Tab */
@media (max-width: 768px) {
    .media-type-selector {
        gap: 10px;
    }

    .media-type-btn {
        flex: 1;
        min-width: 0;
        justify-content: center;
        padding: 10px 12px;
        font-size: 0.8rem;
    }

    .media-type-btn span {
        display: none;
    }

    .section-header {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .media-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .youtube-embed,
    .image-preview {
        height: 200px;
    }
}

@media (max-width: 480px) {
    .media-type-btn {
        padding: 8px 10px;
    }

    .media-item {
        padding: 12px;
    }

    .youtube-embed,
    .image-preview {
        height: 160px;
    }

    .music-item {
        padding: 10px;
        gap: 10px;
    }

    .music-platform-icon {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
}

/* Catalog Manager Styles */
.catalog-manager {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
    min-height: 200px;
}

.products-placeholder {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
    background: var(--card-background);
    border: 2px dashed var(--border-color);
    border-radius: 12px;
}

.products-placeholder i {
    font-size: 3rem;
    margin-bottom: 15px;
    opacity: 0.5;
}

.products-placeholder h4 {
    margin: 0 0 10px 0;
    font-size: 1.2rem;
    color: var(--text-color);
}

.products-placeholder p {
    margin: 0;
    font-size: 0.9rem;
}

.product-item {
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.product-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    border-color: var(--primary-color);
}

.product-image {
    width: 100%;
    height: 120px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-item:hover .product-image {
    transform: scale(1.05);
}

.product-details {
    padding: 12px;
    flex: 1;
}

.product-title {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 8px 0;
    color: var(--text-color);
    line-height: 1.2;
}

.product-description {
    color: var(--text-muted);
    font-size: 0.8rem;
    line-height: 1.3;
    margin: 0 0 8px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-price {
    font-size: 0.9rem;
    width: 30px;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0 0 8px 0;
}

.product-category {
    font-size: 0.75rem;
    color: var(--text-muted);
    background: rgba(var(--primary-color-rgb), 0.1);
    padding: 3px 6px;
    border-radius: 3px;
    display: inline-block;
    margin-bottom: 10px;
}

.product-actions {
    display: flex;
    gap: 8px;
    padding: 0 12px 12px 12px;
}

.product-actions .edit-button,
.product-actions .delete-button {
    flex: 1;
    padding: 6px 10px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.product-actions .edit-button {
    background: var(--primary-color);
    color: white;
}

.product-actions .edit-button:hover {
    background: var(--accent-color);
    transform: translateY(-1px);
}

.product-actions .delete-button {
    background: #ef4444;
    color: white;
}

.product-actions .delete-button:hover {
    background: #dc2626;
    transform: translateY(-1px);
}

.catalog-actions {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

/* Product Preview in Modal */
.product-preview-container {
    margin-top: 15px;
    text-align: center;
}

.product-preview-container img {
    max-width: 200px;
    max-height: 150px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Price Input Container */
.price-input-container {
    display: flex;
    gap: 8px;
    align-items: center;
}

.price-input-container input {
    flex: 1;
    margin: 0;
    min-width: 0;
}

/* Price Input Wrapper - Integrated Currency Design */
.price-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background: var(--card-background);
    transition: all 0.3s ease;
}

.price-input-wrapper:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(var(--primary-color-rgb), 0.1);
}

.currency-prefix {
    padding: 8px 8px;
    border: none;
    background: transparent;
    color: var(--text-color);
    font-size: 0.9rem;
    font-weight: 500;
    outline: none;
    cursor: pointer;
    border-right: 1px solid var(--border-color);
    margin-right: 8px;
}

.price-input-with-currency {
    flex: 1;
    padding: 8px 12px 8px 0;
    border: none;
    background: transparent;
    color: var(--text-color);
    font-size: 0.9rem;
    outline: none;
    margin: 0;
}

.price-input-with-currency::placeholder {
    color: var(--text-secondary);
    opacity: 0.7;
}

/* Media-Catalog Toggle Buttons */
.media-catalog-toggle {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    padding: 4px;
    background: var(--card-background);
    border-radius: 12px;
    border: 2px solid var(--border-color);
}

.toggle-btn {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    white-space: nowrap;
}

.toggle-btn:hover {
    background: var(--hover-color);
    color: var(--text-color);
}

.toggle-btn.active {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 2px 8px rgba(var(--primary-color-rgb), 0.3);
}

.toggle-btn i {
    font-size: 1rem;
}

/* Enhanced Mobile Responsive Design */

/* Tablet and smaller desktop */
@media (max-width: 1024px) {
    .bio-editor-container {
        padding: 80px 10px 10px 10px;
        flex-direction: column;
    }

    .bio-editor-content {
        max-width: 100%;
    }

    .tab-content-container {
        gap: 15px;
    }

    .preview-sidebar {
        min-width: 280px;
        order: -1;
        margin-bottom: 20px;
    }
}

/* Mobile landscape and tablet portrait */
@media (max-width: 768px) {
    .page-header {
        padding: 10px 15px;
        flex-wrap: wrap;
        gap: 10px;
    }

    .logo-container-header img {
        height: 45px !important;
        width: auto;
        display: block;
    }

    .header-user-info {
        font-size: 0.85rem;
    }

    .nav-tabs {
        gap: 6px;
        padding: 6px;
        overflow-x: auto;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .nav-tabs::-webkit-scrollbar {
        display: none;
    }

    .nav-tab {
        min-width: 90px;
        padding: 16px 10px;
        font-size: 0.8rem;
        flex-shrink: 0;
        flex-direction: column;
        gap: 8px;
        min-height: 75px;
        justify-content: center;
    }

    .nav-tab span {
        display: block;
        font-size: 0.8rem;
        line-height: 1.1;
        text-align: center;
        font-weight: 500;
    }

    .nav-tab i {
        font-size: 1.4rem;
        margin-bottom: 3px;
    }

    /* Media-Catalog Toggle for tablets */
    .media-catalog-toggle {
        gap: 8px;
        padding: 3px;
        margin-bottom: 15px;
    }

    .toggle-btn {
        padding: 8px 12px;
        font-size: 0.75rem;
        gap: 4px;
        flex-direction: column;
        min-height: 55px;
        justify-content: center;
    }

    .toggle-btn span {
        display: block;
        font-size: 0.7rem;
        line-height: 1.1;
        text-align: center;
    }

    .toggle-btn i {
        font-size: 1.1rem;
        margin-bottom: 2px;
    }

    /* Form improvements */
    .form-group {
        margin-bottom: 15px;
    }

    .form-group label {
        font-size: 0.9rem;
        margin-bottom: 6px;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 0.9rem;
        padding: 10px 12px;
    }

    /* Products grid for tablets */
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 10px;
    }

    /* Modal improvements */
    .modal-content {
        margin: 5% auto;
        width: 90%;
        max-width: 500px;
        padding: 20px;
    }
}

/* Mobile portrait */
@media (max-width: 480px) {
    .bio-editor-container {
        padding: 70px 10px 10px 10px;
    }

    .page-header {
        padding: 8px 10px;
    }

    .logo-container-header img {
        height: 30px;
    }

    .header-user-info {
        font-size: 0.8rem;
    }

    .nav-tabs {
        gap: 4px;
        padding: 5px;
    }

    .nav-tab {
        min-width: 75px;
        padding: 14px 6px;
        font-size: 0.75rem;
        flex-direction: column;
        gap: 6px;
        min-height: 70px;
        justify-content: center;
    }

    .nav-tab span {
        display: block;
        font-size: 0.75rem;
        line-height: 1;
        text-align: center;
        font-weight: 500;
    }

    .nav-tab i {
        font-size: 1.3rem;
        margin-bottom: 3px;
    }

    /* Media-Catalog Toggle for mobile */
    .media-catalog-toggle {
        gap: 5px;
        padding: 2px;
        margin-bottom: 12px;
    }

    .toggle-btn {
        padding: 6px 8px;
        font-size: 0.7rem;
        gap: 3px;
        border-radius: 6px;
        flex-direction: column;
        min-height: 50px;
        justify-content: center;
    }

    .toggle-btn span {
        display: block;
        font-size: 0.65rem;
        line-height: 1;
        text-align: center;
    }

    .toggle-btn i {
        font-size: 1rem;
        margin-bottom: 1px;
    }

    /* Tab headers */
    .tab-header h3 {
        font-size: 1.3rem;
        margin-bottom: 8px;
    }

    .tab-header p {
        font-size: 0.85rem;
        margin-bottom: 15px;
    }

    /* Form improvements for mobile */
    .form-group {
        margin-bottom: 12px;
    }

    .form-group label {
        font-size: 0.85rem;
        margin-bottom: 5px;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 0.85rem;
        padding: 8px 10px;
    }

    /* Action buttons */
    .action-btn {
        padding: 10px 15px;
        font-size: 0.85rem;
    }

    /* Products grid for mobile */
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 8px;
    }

    /* Modal improvements for mobile */
    .modal-content {
        margin: 2% auto;
        width: 95%;
        max-width: none;
        padding: 15px;
        max-height: 90vh;
        overflow-y: auto;
    }

    .modal-content h3 {
        font-size: 1.2rem;
        margin-bottom: 15px;
    }

    /* Preview sidebar adjustments */
    .preview-sidebar {
        min-width: 250px;
    }

    .preview-frame-container {
        max-width: 260px;
        height: 400px;
    }
}

/* Very small mobile screens */
@media (max-width: 360px) {
    .bio-editor-container {
        padding: 80px 8px 8px 8px;
    }

    .page-header {
        padding: 6px 8px;
    }

    .nav-tab {
        min-width: 70px;
        padding: 12px 4px;
        flex-direction: column;
        gap: 5px;
        min-height: 65px;
        justify-content: center;
    }

    .nav-tab span {
        display: block;
        font-size: 0.7rem;
        line-height: 1;
        text-align: center;
        font-weight: 500;
    }

    .nav-tab i {
        font-size: 1.2rem;
        margin-bottom: 2px;
    }

    /* Ultra-compact toggle buttons */
    .media-catalog-toggle {
        gap: 3px;
        padding: 1px;
        margin-bottom: 10px;
    }

    .toggle-btn {
        padding: 5px 6px;
        font-size: 0.65rem;
        gap: 2px;
        border-radius: 5px;
        flex-direction: column;
        min-height: 45px;
        justify-content: center;
    }

    .toggle-btn span {
        display: block;
        font-size: 0.6rem;
        line-height: 1;
        text-align: center;
    }

    .toggle-btn i {
        font-size: 0.9rem;
        margin-bottom: 1px;
    }

    /* Compact forms */
    .form-group {
        margin-bottom: 10px;
    }

    .form-group label {
        font-size: 0.8rem;
        margin-bottom: 4px;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 0.8rem;
        padding: 6px 8px;
    }

    /* Compact action buttons */
    .action-btn {
        padding: 8px 12px;
        font-size: 0.8rem;
    }

    /* Single column products grid */
    .products-grid {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    /* Full-screen modals on tiny screens */
    .modal-content {
        margin: 0;
        width: 100%;
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
        padding: 10px;
    }

    /* Hide preview on very small screens */
    .preview-sidebar {
        display: none;
    }

    .tab-content-container {
        flex-direction: column;
    }
}

/* Landscape orientation improvements */
@media (max-height: 500px) and (orientation: landscape) {
    .modal-content {
        max-height: 95vh;
        overflow-y: auto;
    }

    .preview-frame-container {
        height: 300px;
    }

    .tab-header {
        margin-bottom: 10px;
    }

    .tab-header h3 {
        font-size: 1.1rem;
        margin-bottom: 5px;
    }

    .tab-header p {
        font-size: 0.8rem;
        margin-bottom: 10px;
    }
}

/* Touch device optimizations */
.touch-device button,
.touch-device .nav-tab,
.touch-device .toggle-btn {
    min-height: 44px !important;
    min-width: 44px !important;
}

/* Navigation scroll indicator */
.nav-scroll-indicator {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--primary-color);
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    z-index: 10;
    animation: pulse 2s infinite;
    pointer-events: none;
}

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

/* Mobile-specific improvements */
@media (max-width: 768px) {
    /* Improve tap targets */
    .link-item .link-actions button,
    .product-item .product-actions button,
    .media-item .media-actions button {
        min-width: 40px;
        min-height: 40px;
        padding: 8px;
    }

    /* Better spacing for mobile */
    .form-group {
        margin-bottom: 16px;
    }

    /* Improve readability */
    body {
        font-size: 14px;
        line-height: 1.5;
    }

    /* Better button spacing */
    .form-actions {
        gap: 12px;
        margin-top: 20px;
    }

    /* Improve modal close button */
    .close-modal {
        font-size: 1.5rem;
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* Swipe indicators for toggle sections */
.media-content-section,
.catalog-content-section {
    position: relative;
    touch-action: pan-x;
}

@media (max-width: 480px) {
    .media-content-section::before,
    .catalog-content-section::before {
        content: '← Swipe to switch →';
        position: absolute;
        top: -25px;
        left: 50%;
        transform: translateX(-50%);
        font-size: 0.7rem;
        color: var(--text-secondary);
        opacity: 0.7;
        z-index: 1;
        pointer-events: none;
    }

    .media-content-section.active::before {
        content: '← Swipe for Catalog';
    }

    .catalog-content-section.active::before {
        content: 'Swipe for Media →';
    }
}

    .product-item {
        margin-bottom: 10px;
    }

    .product-image {
        height: 100px;
    }

    .product-details {
        padding: 10px;
    }

    .product-actions {
        padding: 0 10px 10px 10px;
        gap: 6px;
    }

    .product-actions .edit-button,
    .product-actions .delete-button {
        padding: 5px 8px;
        font-size: 0.75rem;
    }

.lock-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}
.lock-message {
    background: #fff;
    color: #222;
    padding: 2rem 2.5rem;
    border-radius: 1.5rem;
    box-shadow: 0 8px 32px rgba(0,0,0,0.25);
    text-align: center;
    max-width: 350px;
}
.lock-message i {
    font-size: 2.5rem;
    color: var(--accent-primary);
    margin-bottom: 1rem;
}
.lock-message h3 {
    margin: 0.5rem 0 0.5rem 0;
    font-size: 1.5rem;
}
.lock-message p {
    margin-bottom: 1.5rem;
    color: #444;
}
.lock-message .btn {
    font-size: 1rem;
    padding: 0.75rem 2rem;
}

/* Lock Actions Container for Bio Editor */
.section-lock-message .lock-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1rem;
}

/* Trial Button Styles for Bio Editor */
.section-lock-message .btn-trial {
    background: linear-gradient(135deg, #10B981, #059669) !important;
    color: white !important;
    border: none !important;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
    text-decoration: none;
}

.section-lock-message .btn-trial:hover {
    background: linear-gradient(135deg, #059669, #047857) !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.section-lock-message .btn-trial:active {
    transform: translateY(0);
}

.section-lock-message .btn-trial:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.section-lock-message .btn-trial i {
    font-size: 1rem;
}

/* Responsive adjustments for bio editor lock actions */
@media (min-width: 480px) {
    .section-lock-message .lock-actions {
        flex-direction: row;
        justify-content: center;
        gap: 1rem;
    }

    .section-lock-message .lock-actions .btn {
        flex: 1;
        max-width: 200px;
    }
}

.section-lock-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.95);
    border: 1px solid #eee;
    border-radius: 1.5rem;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    padding: 2rem 2.5rem;
    margin: 2rem auto;
    max-width: 350px;
    text-align: center;
    z-index: 1;
}
.section-lock-message i {
    font-size: 2.5rem;
    color: var(--accent-primary);
    margin-bottom: 1rem;
}
.section-lock-message h3 {
    margin: 0.5rem 0 0.5rem 0;
    font-size: 1.5rem;
}
.section-lock-message p {
    margin-bottom: 1.5rem;
    color: #444;
}
.section-lock-message .btn {
    font-size: 1rem;
    padding: 0.75rem 2rem;
}
.lock-overlay { display: none !important; }

.editor-main-area {
    display: flex;
    gap: 30px;
    align-items: flex-start;
    width: 100%;
    /* Ensure no overflow from children */
    overflow: hidden;
}

.bioeditor-avatar-container {
    position: relative;
    display: inline-block;
    margin-bottom: 20px;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    box-shadow: 0 5px 15px rgba(0,0,0,0.12);
    background: var(--card-background, #fff);
    border: 3px solid var(--primary-color, #667eea);
    overflow: hidden;
    z-index: 1;
    cursor: pointer;
    transition: box-shadow 0.3s, border-color 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bioeditor-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    position: relative;
    z-index: 2;
}

.bioeditor-avatar-container .avatar-initials {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-muted, #888);
    background: var(--secondary-color, #f8fafc);
    border-radius: 50%;
    z-index: 3;
    letter-spacing: 0.02em;
    text-align: center;
    padding: 0 10px;
    line-height: 1.2;
    white-space: pre-line;
}

.bioeditor-avatar-container:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.18);
    border-color: var(--accent-color, #3b82f6);
}

.bioeditor-avatar-container .profile-pic-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.6);
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 0.8rem;
    z-index: 4;
}

.bioeditor-avatar-container:hover .profile-pic-overlay {
    opacity: 1;
}

.bioeditor-avatar-container .profile-pic-overlay i {
    font-size: 1.5rem;
    margin-bottom: 5px;
}

/* Processing Overlay */
.processing-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    z-index: 30;
    backdrop-filter: blur(4px);
}

.processing-overlay > div {
    text-align: center;
    color: white;
}

.processing-overlay i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: white;
    animation: spin 1s linear infinite;
}

.processing-overlay div:last-child {
    font-size: 0.75rem;
    font-weight: 500;
    opacity: 0.9;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Mobile-specific improvements for profile picture upload */
.bioeditor-avatar-container {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

/* Ensure touch events work properly on mobile */
@media (max-width: 768px) {
    .bioeditor-avatar-container {
        cursor: pointer;
        touch-action: manipulation;
    }
    
    .bioeditor-avatar-container:active {
        transform: scale(0.95);
    }
}

/* Bio Editor Specific Styles - Remove body padding and adjust container */
body.bio-editor-page {
    padding-top: 0 !important;
}

.bio-editor-container {
    padding-top: 80px !important;
}

/* Bio Editor Specific Sidebar Behavior - Hide sidebar by default on all screen sizes */
body.bio-editor-page .menu-toggle-btn {
    display: block;
}

body.bio-editor-page .dashboard-container {
    grid-template-columns: 1fr;
}

body.bio-editor-page .dashboard-sidebar {
    position: fixed;
    z-index: 100;
    height: 100%;
    overflow-y: auto;
    top: 0;
    left: 0;
    transform: translateX(-100%);
    border-radius: 0;
    width: 250px;
}

body.bio-editor-page.sidebar-active .dashboard-sidebar {
    transform: translateX(0);
}

body.bio-editor-page.sidebar-active .sidebar-overlay {
    display: block;
}

/* Mobile responsive adjustments for bio editor */
@media (max-width: 768px) {
    body.bio-editor-page {
        padding-top: 0 !important;
    }

    .bio-editor-container {
        padding-top: 70px !important;
    }

    /* Ensure modal fits on smaller screens but keeps same design */
    #premium-template-modal .modal-content {
        width: 95%;
        padding: 20px;
        margin: 10px auto;
    }
}

/* Extra small screens */
@media (max-width: 480px) {
    #premium-template-modal .modal-content {
        width: 98%;
        padding: 18px;
        margin: 5px auto;
    }
}




