/* Twitter Profile Preview Styles */
.input-group {
    margin-bottom: 15px;
}

.input-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #b9bbbe;
    font-size: 0.9rem;
}

.input-group input,
.input-group select,
.input-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #202225;
    border-radius: 4px;
    background: #40444b;
    color: #dcddde;
    font-size: 0.9rem;
    font-family: 'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
}

/* Hide number input spinners */
.input-group input[type="number"]::-webkit-outer-spin-button,
.input-group input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.input-group input[type="number"] {
    appearance: textfield;
    -moz-appearance: textfield;
}

.input-group input:focus,
.input-group select:focus,
.input-group textarea:focus {
    outline: none;
    border-color: #1da1f2;
    box-shadow: 0 0 0 2px rgba(29, 161, 242, 0.3);
}

.input-group input::placeholder,
.input-group select::placeholder,
.input-group textarea::placeholder {
    color: #72767d;
}

/* Preview section header controls */
.preview-section .header-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Twitter Profile Preview */
.twitter-profile-preview {
    background: #000000;
    border-radius: 12px;
    overflow: hidden;
    border: 4px solid #2f3336;
    min-width: 600px;
    max-width: 600px;
    margin: 0 auto;
    box-sizing: border-box;
    position: relative;
    font-family: 'Twitter', 'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

.preview-content {
    min-height: 600px;
    padding: 15px;
    background: #36393f;
    border-radius: 6px;
    border: 1px solid #202225;
    font-family: 'Twitter', 'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    line-height: 1.5;
    overflow-y: auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Twitter Header */
.twitter-header {
    width: calc(100% - 36px);
    height: 200px;
    position: relative;
    overflow: hidden;
    border-radius: 3px;
    margin: 18px;
}

.twitter-banner {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1da1f2 0%, #0d8bd9 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
}

/* Twitter banner images are now handled as background-image, so no img styling needed */

/* Website link display styling */
.website-link-display {
    color: #1da1f2;
    text-decoration: underline;
    cursor: pointer;
    transition: color 0.2s ease;
}

.website-link-display:hover {
    color: #0d8bd9;
    text-decoration: underline;
}

/* Light theme website link */
.twitter-profile-preview.light-theme .website-link-display {
    color: #1da1f2;
}

.twitter-profile-preview.light-theme .website-link-display:hover {
    color: #0d8bd9;
}

/* Profile Info Section */
.profile-info-section {
    padding: 0 18px 18px;
    position: relative;
    margin-top: -50px;
}

.profile-avatar-container {
    position: absolute;
    top: -130px;
    left: 30px;
    z-index: 10;
    transform: translateY(0);
}

.profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 4px solid #000000;
    overflow: hidden;
    background: #1da1f2;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.profile-details {
    margin-top: 120px;
    color: #ffffff;
    position: relative;
}

.profile-name {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 4px;
    color: #ffffff;
}

.profile-username {
    font-size: 0.95rem;
    color: #71767b;
    margin-bottom: 12px;
}

.profile-bio {
    font-size: 0.95rem;
    line-height: 1.4;
    margin-bottom: 12px;
    color: #ffffff;
    white-space: pre-wrap;
}

.profile-meta {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 12px;
    align-items: center;
}

.profile-location,
.profile-website,
.profile-join-date {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: #71767b;
}

.profile-website a {
    color: #1da1f2;
    text-decoration: none;
}

.profile-website a:hover {
    text-decoration: underline;
}

.profile-stats {
    display: flex;
    gap: 20px;
    margin-bottom: 16px;
}

.stat-item {
    display: flex;
    gap: 4px;
    font-size: 0.9rem;
}

.stat-number {
    font-weight: 700;
    color: #ffffff;
    font-size: 0.9rem;
}

.stat-label {
    color: #71767b;
}

.follow-button {
    background: #ffffff;
    color: #000000;
    border: none;
    border-radius: 20px;
    padding: 8px 20px;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
    position: absolute;
    top: 0;
    right: 10px;
    margin-top: -60px;
}

.follow-button:hover {
    background: #e6e6e6;
}

/* Profile Tabs */
.profile-tabs {
    display: flex;
    border-bottom: 1px solid #2f3336;
    margin: 0 18px;
}

.tab {
    padding: 16px 20px;
    font-weight: 600;
    color: #71767b;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
}

.tab:hover {
    background: #1a1a1a;
}

.tab.active {
    color: #ffffff;
    border-bottom-color: #1da1f2;
}

/* Profile Content */
.profile-content {
    padding-left: 18px;
    padding-right: 18px;
}

.tweet-item {
    display: flex;
    padding: 12px 0;
    border-bottom: 1px solid #2f3336;
    gap: 12px;
}

.tweet-avatar {
    flex-shrink: 0;
}

.tweet-avatar-img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    background: #1da1f2;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.tweet-content {
    flex: 1;
    color: #ffffff;
}

.tweet-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.tweet-name {
    font-weight: 700;
    color: #ffffff;
}

.tweet-username {
    color: #71767b;
    font-size: 0.9rem;
}

.tweet-time {
    color: #71767b;
    font-size: 0.9rem;
}

.tweet-text {
    font-size: 0.95rem;
    line-height: 1.4;
    margin-bottom: 8px;
    white-space: pre-wrap;
}

.tweet-actions {
    display: flex;
    gap: 24px;
    margin-top: 8px;
}

.tweet-action {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #71767b;
    font-size: 0.85rem;
    cursor: pointer;
    transition: color 0.2s ease;
}

.tweet-action:hover {
    color: #1da1f2;
}

.tweet-action svg {
    width: 16px;
    height: 16px;
}

/* Side by side inputs */
.side-by-side-inputs {
    display: flex;
    gap: 15px;
}

.input-half {
    flex: 1;
}

/* Tweet Settings */
.tweet-settings-container {
    background: #2f3136;
    border-radius: 8px;
    padding: 15px;
    margin-top: 8px;
}

.tweet-setting-item {
    margin-bottom: 20px;
}

.tweet-setting-item:last-child {
    margin-bottom: 0;
}

.tweet-setting-item h4 {
    color: #ffffff;
    font-size: 1rem;
    margin-bottom: 12px;
    font-weight: 600;
}

.tweet-inputs {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tweet-content-input {
    position: relative;
    display: inline-block;
    width: 100%;
}

.tweet-content-input textarea {
    min-height: 80px;
    resize: vertical;
}

.tweet-meta-inputs {
    display: flex;
    gap: 12px;
}

.tweet-meta-input {
    flex: 1;
}

.tweet-meta-input label {
    font-size: 0.8rem;
    margin-bottom: 4px;
}

.tweet-meta-input input {
    padding: 8px;
    font-size: 0.85rem;
}

/* Textarea Container */
.textarea-container {
    position: relative;
    display: inline-block;
    width: 100%;
}

/* Bio textarea - only expand downward */
#bio {
    resize: vertical;
    min-height: 60px;
    max-height: 200px;
    overflow-y: auto;
}

/* Character Counter */
.char-counter {
    position: absolute;
    bottom: 8px;
    right: 8px;
    font-size: 0.8rem;
    color: #71767b;
    background: #2f3136;
    padding: 2px 6px;
    border-radius: 4px;
    z-index: 10;
}

/* Upload Button */
.upload-button {
    background: #1da1f2;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    padding: 8px 16px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
    width: 100%;
    margin-bottom: 6px;
}

.upload-button:hover {
    background: #0d8bd9;
}

.upload-info {
    font-size: 0.8rem;
    color: #72767d;
    text-align: center;
}

/* Theme Toggle Button */
.theme-toggle-btn {
    background: #40444b;
    border: 1px solid #5865f2;
    border-radius: 6px;
    color: #ffffff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: all 0.2s ease;
    position: relative;
    width: 29px;
    height: 29px;
}

.theme-toggle-btn:hover {
    background: #5865f2;
    border-color: #4752c4;
}

.theme-toggle-btn:active {
    transform: translateY(1px);
}

.theme-icon {
    position: absolute;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.sun-icon {
    opacity: 1;
    transform: rotate(0deg);
}

.moon-icon {
    opacity: 0;
    transform: rotate(180deg);
}

.theme-toggle-btn.dark .sun-icon {
    opacity: 0;
    transform: rotate(180deg);
}

.theme-toggle-btn.dark .moon-icon {
    opacity: 1;
    transform: rotate(0deg);
}

/* Light Theme Styles */
.twitter-profile-preview.light-theme {
    background: #ffffff;
    border-color: #e1e8ed;
}

.twitter-profile-preview.light-theme .twitter-header {
    width: calc(100% - 36px);
    height: 200px;
    position: relative;
    overflow: hidden;
    border-radius: 3px;
    margin: 18px;
}

.twitter-profile-preview.light-theme .twitter-banner {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1da1f2 0%, #0d8bd9 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
}

.twitter-profile-preview.light-theme .profile-name {
    color: #000000;
}

.twitter-profile-preview.light-theme .profile-username {
    color: #536471;
}

.twitter-profile-preview.light-theme .profile-bio {
    color: #000000;
}

.twitter-profile-preview.light-theme .profile-location,
.twitter-profile-preview.light-theme .profile-website,
.twitter-profile-preview.light-theme .profile-join-date {
    color: #536471;
}

.twitter-profile-preview.light-theme .stat-number {
    color: #000000;
}

.twitter-profile-preview.light-theme .stat-label {
    color: #536471;
}

.twitter-profile-preview.light-theme .follow-button {
    background: #000000;
    color: #ffffff;
}

.twitter-profile-preview.light-theme .follow-button:hover {
    background: #333333;
}

.twitter-profile-preview.light-theme .tab {
    color: #536471;
}

.twitter-profile-preview.light-theme .tab.active {
    color: #000000;
    border-bottom-color: #1da1f2;
}

.twitter-profile-preview.light-theme .tweet-item {
    border-bottom-color: #e1e8ed;
}

.twitter-profile-preview.light-theme .tweet-name {
    color: #000000;
}

.twitter-profile-preview.light-theme .tweet-username,
.twitter-profile-preview.light-theme .tweet-time {
    color: #536471;
}

.twitter-profile-preview.light-theme .tweet-text {
    color: #000000;
}

.twitter-profile-preview.light-theme .tweet-action {
    color: #536471;
}

.twitter-profile-preview.light-theme .tweet-action:hover {
    color: #1da1f2;
}

.twitter-profile-preview.light-theme .profile-avatar {
    border-color: #ffffff;
}

.twitter-profile-preview.light-theme .watermark-container {
    background: #ffffff;
}

.twitter-profile-preview.light-theme .watermark-logo {
    filter: brightness(0) invert(0);
    opacity: 0.8;
}

.twitter-profile-preview.light-theme .watermark-text {
    color: #536471;
    opacity: 0.8;
}

/* Watermark Container */
.watermark-container {
    background: #000000;
    padding: 14px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

/* Watermark */
.watermark {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    pointer-events: none;
    text-align: center;
    width: 100%;
    max-width: 120px;
}

.watermark-logo {
    width: 40px;
    height: 20px;
    opacity: 0.7;
    filter: brightness(0) invert(1);
    transition: filter 0.3s ease;
    display: block;
    margin: 0 auto;
}

.watermark-text {
    font-size: 0.7rem;
    color: #71767b;
    opacity: 0.7;
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    text-align: center;
    white-space: nowrap;
    font-family: 'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    letter-spacing: 0.02em;
}

/* Responsive Design */
@media (max-width: 768px) {
    .twitter-profile-preview {
        min-width: 400px;
        max-width: 400px;
    }

    .side-by-side-inputs {
        flex-direction: column;
        gap: 10px;
    }

    .tweet-meta-inputs {
        flex-direction: column;
        gap: 8px;
    }

    .profile-stats {
        flex-direction: column;
        gap: 8px;
    }

    .tweet-actions {
        gap: 16px;
    }
}

@media (max-width: 480px) {
    .twitter-profile-preview {
        min-width: 320px;
        max-width: 320px;
    }

    .profile-avatar {
        width: 80px;
        height: 80px;
    }

    .profile-avatar-container {
        top: -40px;
    }

    .profile-info-section {
        margin-top: -40px;
    }
}

/* Profile Management Styles */
.profile-management {
    margin-top: 15px;
    border-top: 1px solid #202225;
    padding-top: 15px;
}

.profile-management h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #dcddde;
    margin-bottom: 15px;
}

.save-profile-section {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    align-items: center;
}

.save-profile-section input {
    flex: 1;
    padding: 10px;
    border: 1px solid #202225;
    border-radius: 4px;
    background: #40444b;
    color: #dcddde;
    font-size: 0.9rem;
    font-family: 'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

.save-profile-section input:focus {
    outline: none;
    border-color: #1da1f2;
    box-shadow: 0 0 0 2px rgba(29, 161, 242, 0.3);
}

.save-button {
    padding: 10px 16px;
    border: none;
    border-radius: 4px;
    background: #1da1f2;
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
    white-space: nowrap;
}

.save-button:hover {
    background: #0d8bd9;
}

.save-button:active {
    transform: translateY(1px);
}

.saved-profiles-section {
    margin-top: 20px;
}

.search-container {
    margin-bottom: 15px;
}

.search-input {
    width: 100%;
    padding: 10px;
    border: 1px solid #202225;
    border-radius: 4px;
    background: #40444b;
    color: #dcddde;
    font-size: 0.9rem;
    font-family: 'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

.search-input:focus {
    outline: none;
    border-color: #1da1f2;
    box-shadow: 0 0 0 2px rgba(29, 161, 242, 0.3);
}

.search-input::placeholder {
    color: #72767d;
}

.saved-profiles-list {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #202225;
    border-radius: 4px;
    background: #2f3136;
}

.no-profiles-message {
    padding: 20px;
    text-align: center;
    color: #72767d;
    font-size: 0.9rem;
}

.saved-profile-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    border-bottom: 1px solid #202225;
    transition: background-color 0.2s ease;
    cursor: pointer;
}

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

.saved-profile-item:hover {
    background: #36393f;
}

.profile-info-display {
    flex: 1;
    min-width: 0;
}

.profile-name {
    font-weight: 600;
    color: #dcddde;
    font-size: 0.95rem;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.source-badge {
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 4px;
    color: #fff;
    text-transform: uppercase;
    font-weight: 600;
}

.source-badge.local {
    background-color: #7289da;
}

.source-badge.cloud {
    background-color: #43b581;
}

.saved-profile-details {
    font-size: 0.85rem;
    color: #72767d;
    margin-top: 0;
}

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

.load-button,
.delete-button {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.load-button {
    background: #1da1f2;
    color: #ffffff;
}

.load-button:hover {
    background: #0d8bd9;
}

.delete-button {
    background: #f04747;
    color: #ffffff;
}

.delete-button:hover {
    background: #d83c3c;
}

.button-group {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.btn {
    flex: 1;
    padding: 10px 16px;
    border: none;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

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

.btn-primary:hover {
    background: #0d8bd9;
}

.btn-secondary {
    background: #5865f2;
    color: #ffffff;
}

.btn-secondary:hover {
    background: #4752c4;
}

/* Custom scrollbar for saved profiles list */
.saved-profiles-list::-webkit-scrollbar {
    width: 8px;
}

.saved-profiles-list::-webkit-scrollbar-track {
    background: #2f3136;
    border-radius: 4px;
}

.saved-profiles-list::-webkit-scrollbar-thumb {
    background: #4f545c;
    border-radius: 4px;
    border: 1px solid #2f3136;
}

.saved-profiles-list::-webkit-scrollbar-thumb:hover {
    background: #5d6269;
}