/* src/public/css/main.css */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 2rem 1rem;
}

.container {
    max-width: 800px;
    width: 100%;
}

.header {
    text-align: center;
    margin-bottom: 2rem;
    color: white;
}

    .header h1 {
        font-size: 2.5rem;
        margin-bottom: 0.5rem;
    }

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

.card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.card h2, .card h3 {
    margin-top: 0;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #f0f0f0;
    color: #333;
    font-weight: 600;
}

.card h2 {
    font-size: 1.5rem;
    color: #667eea;
}

.card h3 {
    font-size: 1.3rem;
    color: #555;
}

/* Card that appears directly below navigation tabs - squared top corners */
.card.tab-connected {
    border-radius: 0 0 12px 12px;
    margin-top: 0;
}

/* Group Title Section */
.group-title-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e9ecef;
}

.group-title-content {
    margin-bottom: 1rem;
}

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

.group-page-description {
    margin: 0.5rem 0 0 0;
    color: #666;
    font-size: 1rem;
    line-height: 1.4;
    font-style: italic;
    background: #f8f9fa;
    padding: 0.75rem;
    border-radius: 6px;
    border-left: 3px solid #667eea;
}

.group-page-title {
    margin: 0 0 1rem 0;
    color: #333;
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
}

#backToGroupsBtn {
    font-size: 0.9rem;
    padding: 0.6rem 1.2rem;
    white-space: nowrap;
}

/* Group Management Styles */
.group-info-section {
    margin-bottom: 2rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.group-info-section h2,
.group-info-section h3 {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 1rem;
}

.group-stats {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.stat-label {
    font-weight: 600;
    color: #666;
}

.stat-value {
    color: #333;
}

.role-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
}

.role-badge.owner {
    background: #28a745;
    color: white;
    border: 2px solid #20c947;
    box-shadow: 0 0 0 2px rgba(40, 167, 69, 0.2);
}

.role-badge.contributor {
    background: #fd7e14;
    color: white;
    border: 2px solid #ff8c1a;
    box-shadow: 0 0 0 2px rgba(253, 126, 20, 0.2);
}

.role-badge.watcher {
    background: #6c757d;
    color: white;
    border: 2px solid #868e96;
    box-shadow: 0 0 0 2px rgba(108, 117, 125, 0.2);
}

/* Group Actions Section */
.group-actions-section {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 2px solid #e9ecef;
}

.group-actions-buttons {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 1rem;
}

/* Group Visibility Section */
.group-visibility-section {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.visibility-controls {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.visibility-label {
    font-weight: 600;
    color: #333;
    font-size: 1rem;
    margin: 0;
}

.visibility-toggle {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .toggle-slider {
    background-color: #667eea;
}

input:checked + .toggle-slider:before {
    transform: translateX(26px);
}

.visibility-status {
    font-weight: 600;
    color: #333;
    font-size: 1rem;
}

.visibility-description {
    margin: 0;
    color: #666;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Action buttons container */
.action-buttons-row {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Public Groups Discovery Styles */
.public-groups-search {
    margin-top: 1.5rem;
}

.search-input-container {
    display: flex;
    gap: 0.5rem;
    align-items: stretch;
}

.search-input-container input {
    flex: 1;
    margin-bottom: 0;
}

.search-input-container button {
    white-space: nowrap;
    margin-bottom: 0;
}

.public-group-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    margin-bottom: 0.75rem;
    background: #fff;
    transition: all 0.2s ease;
}

.public-group-item:hover {
    background: #f8f9fa;
    border-color: #667eea;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.15);
}

.public-group-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.public-group-name {
    font-weight: 600;
    color: #333;
    font-size: 1.1rem;
    margin: 0;
}

.public-group-stats {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.public-group-stat {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.9rem;
    color: #666;
}

.public-group-description {
    font-size: 0.9rem;
    color: #555;
    margin: 0.5rem 0;
    line-height: 1.4;
    background: #f8f9fa;
    padding: 0.5rem;
    border-radius: 4px;
    border-left: 3px solid #667eea;
    max-height: 60px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.public-group-owner {
    font-size: 0.85rem;
    color: #667eea;
    font-style: italic;
}

.public-group-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.btn-join-group {
    background: #28a745;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.btn-join-group:hover {
    background: #218838;
    transform: translateY(-1px);
}

.btn-view-public {
    background: #667eea;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.btn-view-public:hover {
    background: #5a6fd8;
    transform: translateY(-1px);
}

.btn-go-to-group {
    background: #fd7e14;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.btn-go-to-group:hover {
    background: #e8690b;
    transform: translateY(-1px);
}

.already-member {
    background: #6c757d;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: default;
    font-weight: 600;
    font-size: 0.9rem;
}

.search-empty-state,
.top-groups-empty-state {
    text-align: center;
    padding: 2rem;
    color: #666;
    font-style: italic;
}

.search-loading,
.top-groups-loading {
    text-align: center;
    padding: 1rem;
    color: #667eea;
}

@media (max-width: 768px) {
    .public-group-item {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .public-group-actions {
        justify-content: stretch;
    }
    
    .public-group-actions button {
        flex: 1;
    }
    
    .search-input-container {
        flex-direction: column;
    }
}

/* Group Modal Recent Content */
.group-modal-content {
    margin-top: 1.5rem;
    border-top: 1px solid #e0e0e0;
    padding-top: 1rem;
}

.group-modal-content h5 {
    margin: 0 0 1rem 0;
    color: #333;
    font-size: 1rem;
    font-weight: 600;
}

.recent-content-posters {
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
}

.recent-content-item {
    position: relative;
    flex-shrink: 0;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.recent-content-item:hover {
    transform: scale(1.05);
}

.recent-content-poster {
    width: 60px;
    height: 90px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #ddd;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.recent-content-type {
    position: absolute;
    bottom: 2px;
    left: 2px;
    right: 2px;
    background: rgba(0,0,0,0.8);
    color: white;
    font-size: 0.7rem;
    text-align: center;
    padding: 2px 4px;
    border-radius: 2px;
    text-transform: capitalize;
}

.recent-content-type.movie {
    background: rgba(220, 53, 69, 0.9);
}

.recent-content-type.series {
    background: rgba(0, 123, 255, 0.9);
}

/* Group Modal Description */
.group-modal-description {
    margin: 1rem 0;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 4px solid #667eea;
}

.group-modal-description p {
    margin: 0.5rem 0 0 0;
    color: #555;
    line-height: 1.5;
    font-style: italic;
}

/* Group Details Section */
.group-details-section {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.group-details-display {
    margin-top: 1rem;
}

.detail-item {
    display: flex;
    margin-bottom: 0.75rem;
    align-items: flex-start;
}

.detail-label {
    font-weight: 600;
    color: #333;
    min-width: 100px;
    margin-right: 1rem;
}

.detail-value {
    color: #666;
    flex: 1;
    word-break: break-word;
}

.group-details-edit {
    margin-top: 1rem;
}

.form-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.char-count {
    display: block;
    margin-top: 0.25rem;
    color: #666;
    font-size: 0.85rem;
}

.char-count.warning {
    color: #fd7e14;
}

.char-count.danger {
    color: #dc3545;
}

@media (max-width: 768px) {
    .detail-item {
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .detail-label {
        min-width: auto;
        margin-right: 0;
    }
    
    .form-actions {
        flex-direction: column;
    }
}

.btn-warning {
    background: #ffc107;
    color: #212529;
}

.btn-warning:hover {
    background: #e0a800;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

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

/* Members Section */
.members-section {
    margin-top: 2rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #e9ecef;
}

.section-header h3 {
    margin: 0;
    font-size: 1.25rem;
    color: #333;
    font-weight: 600;
    border-bottom: none;
    padding-bottom: 0;
}

.section-actions {
    display: flex;
    gap: 0.5rem;
}

.members-list {
    max-height: 400px;
    overflow-y: auto;
}

.member-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    background: #fff;
    transition: background-color 0.2s;
}

.member-item:hover {
    background: #f8f9fa;
}

.member-info {
    flex: 1;
}

.member-name {
    font-weight: 600;
    color: #333;
    margin-bottom: 0.25rem;
}

.member-email {
    color: #666;
    font-size: 0.9rem;
}

.member-details {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-top: 0.5rem;
}

.member-role {
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.member-joined {
    color: #666;
    font-size: 0.85rem;
}

/* Expandable Members */
.members-summary {
    margin-top: 0.5rem;
}

.members-count-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    margin-bottom: 0.5rem;
}

.member-count {
    font-weight: 600;
    color: #333;
    font-size: 1rem;
}

.expand-members-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    border: 1px solid #6c757d;
    background: #fff;
    color: #6c757d;
}

    .expand-members-btn:hover {
        background: #6c757d;
        color: #fff;
        transform: translateY(-1px);
    }

    .expand-members-btn.expanded {
        background: #667eea;
        color: #fff;
        border-color: #667eea;
    }

        .expand-members-btn.expanded:hover {
            background: #5a6fd8;
            border-color: #5a6fd8;
        }

.expand-icon {
    transition: transform 0.2s ease;
    font-size: 0.8rem;
}

.members-expanded-list {
    animation: slideDown 0.3s ease-out;
    overflow: hidden;
}

    .members-expanded-list .member-item:first-child {
        margin-top: 0.5rem;
    }

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        max-height: 1000px;
        transform: translateY(0);
    }
}

.member-actions {
    display: flex;
    gap: 0.5rem;
}

/* Mobile member actions dropdown */
.member-actions-mobile {
    position: relative;
    display: none;
}

.member-actions-toggle {
    background: #6c757d;
    color: white;
    border: none;
    padding: 0.4rem 0.6rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.2s ease;
}

.member-actions-toggle:hover {
    background: #5a6268;
}

.member-actions-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    min-width: 150px;
    display: none;
    overflow: hidden;
}

.member-actions-dropdown.show {
    display: block;
    animation: dropdownSlideIn 0.2s ease-out;
}

.member-action-item {
    display: block;
    width: 100%;
    padding: 0.75rem 1rem;
    border: none;
    background: white;
    text-align: left;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.2s ease;
    border-bottom: 1px solid #f0f0f0;
}

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

.member-action-item:hover {
    background: #f8f9fa;
}

.member-action-item.edit {
    color: #007bff;
}

.member-action-item.remove {
    color: #dc3545;
}

.member-action-item.transfer {
    color: #fd7e14;
}

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

/* Mobile responsive member actions */
@media (max-width: 768px) {
    .member-actions {
        display: none;
    }
    
    .member-actions-mobile {
        display: block;
    }
    
    .member-item {
        padding: 0.75rem;
    }
    
    .member-info {
        min-width: 0;
        flex: 1;
    }
    
    .member-info h5 {
        font-size: 0.9rem;
        margin-bottom: 0.25rem;
    }
    
    .member-info p {
        font-size: 0.8rem;
        margin: 0;
    }
}

.btn-small {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-edit {
    background: #007bff;
    color: white;
}

.btn-edit:hover {
    background: #0056b3;
}

.btn-remove {
    background: #dc3545;
    color: white;
}

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

.btn-transfer {
    background: #fd7e14;
    color: white;
}

.btn-transfer:hover {
    background: #e8650b;
}

/* Invite Panel */
.invite-panel {
    margin-top: 2rem;
    padding: 1.5rem;
    border: 2px solid #667eea;
    border-radius: 12px;
    background: #f8f9ff;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.panel-header h4 {
    color: #667eea;
    margin: 0;
}

.btn-close {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: #666;
    padding: 0.25rem;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.btn-close:hover {
    background: #e9ecef;
}

.invite-form {
    display: flex;
    gap: 1rem;
    align-items: end;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.invite-form .form-group {
    min-width: 120px;
}

.invite-result {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.invite-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.invite-link-container {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin: 0.5rem 0;
}

.invite-link {
    flex: 1;
    padding: 0.5rem;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.9rem;
    word-break: break-all;
}

.btn-copy-invite {
    padding: 0.5rem 1rem;
    background: #28a745;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    white-space: nowrap;
}

.btn-copy-invite:hover {
    background: #218838;
}

/* Active Invites */
.active-invites-section {
    border-top: 1px solid #dee2e6;
    padding-top: 1rem;
}

.active-invites-section h5 {
    margin-bottom: 1rem;
    color: #667eea;
}

.invite-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    margin-bottom: 0.5rem;
    background: #fff;
}

.invite-info {
    flex: 1;
}

.invite-code {
    font-family: monospace;
    font-weight: 600;
    color: #667eea;
}

.invite-details {
    font-size: 0.85rem;
    color: #666;
    margin-top: 0.25rem;
}

.invite-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-revoke {
    background: #dc3545;
    color: white;
    border: none;
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
}

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

/* Button Styles */
.btn-primary {
    background: #667eea;
    color: white;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
    margin-top: 1rem;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.2s;
}

.btn-primary:hover {
    background: #5a6fd8;
}

.btn-secondary {
    background: #6c757d;
    color: white;
    border: none;
    padding: 0.6rem 1.2rem;
    margin-top: 5px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.2s;
}

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

/* Invite Flow Styles */
.invite-info-section {
    margin-bottom: 2rem;
}

.invite-details {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
    border-left: 4px solid #28a745;
}

.invite-details p {
    margin: 0.5rem 0;
    color: #333;
}

.invite-error-section {
    margin-bottom: 2rem;
}

/* Authentication Styles */
.auth-tabs {
    display: flex;
    background: white;
    border-radius: 12px 12px 0 0;
    overflow: hidden;
    margin-bottom: 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.auth-tab {
    flex: 1;
    padding: 1rem 2rem;
    background: #f8f9fa;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    color: #666;
    transition: all 0.3s ease;
}

.auth-tab.active {
    background: white;
    color: #667eea;
    box-shadow: 0 2px 0 #667eea;
}

.auth-tab:hover:not(.active) {
    background: #e9ecef;
    color: #495057;
}

.auth-tab-content {
    display: none;
}

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

.auth-tab-content .card {
    border-radius: 0 0 12px 12px;
    margin-top: 0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

/* Dashboard Tabs */
.dashboard-tabs {
    display: flex;
    background: white;
    border-radius: 12px 12px 0 0;
    overflow: hidden;
    margin-bottom: 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.dashboard-tab {
    flex: 1;
    padding: 1rem 2rem;
    background: #f8f9fa;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    color: #6c757d;
}

.dashboard-tab.active {
    background: white;
    color: #667eea;
    box-shadow: 0 2px 0 #667eea;
}

.dashboard-tab:hover:not(.active) {
    background: #e9ecef;
    color: #495057;
}

.dashboard-tab-content {
    display: none;
}

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

/* Stremio Catalog Management Styles */
.addon-url-section {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.addon-url-section h4 {
    margin-top: 0;
    margin-bottom: 1rem;
    color: #333;
    font-size: 1.1rem;
    font-weight: 600;
}

.addon-url-container {
    margin: 1rem 0;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.addon-url-display {
    flex: 1;
}

.addon-url-display input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-family: monospace;
    font-size: 0.9rem;
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.addon-url-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-width: 200px;
}

.addon-url-buttons button {
    width: 100%;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.addon-url-buttons .btn-secondary {
    background: #6c757d;
    color: white;
}

.addon-url-buttons .btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-1px);
}

.addon-url-buttons .btn-primary {
    background: #667eea;
    color: white;
}

.addon-url-buttons .btn-primary:hover {
    background: #5a6fd8;
    transform: translateY(-1px);
}

.addon-url-section small {
    color: #6c757d;
    font-style: italic;
}

/* Content Management Sections */
.content-management-subsection {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid #e0e0e0;
}

.content-management-subsection h3 {
    margin-bottom: 1.5rem;
    color: #555;
    font-size: 1.2rem;
    font-weight: 600;
}

/* Form sections spacing */
.form-section {
    margin-bottom: 2.5rem;
}

.form-section:last-child {
    margin-bottom: 0;
}

/* Batch upload section */
.batch-upload-section {
    margin-top: 1.5rem;
}

/* Upload method content spacing */
.upload-method-content {
    padding-top: 1.5rem;
}

/* Current content section */
.content-list-section {
    margin-top: 2.5rem;
    padding-top: 1.5rem;
}

.content-list-section h3 {
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #e0e0e0;
}

.catalog-settings-section {
    margin-bottom: 2rem;
}

.catalog-settings-section h4 {
    margin-top: 0;
    margin-bottom: 1.25rem;
    color: #333;
    font-size: 1.15rem;
    font-weight: 600;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e0e0e0;
}

.catalog-settings-section h5 {
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    color: #555;
    font-size: 1rem;
    font-weight: 600;
}

.global-options {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 1.2rem;
    height: 1.2rem;
    cursor: pointer;
}

.group-selection-section {
    margin-bottom: 1.5rem;
}

.group-selection-list {
    margin-top: 1rem;
}

.group-selection-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 1rem;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    cursor: grab;
    transition: all 0.2s ease;
}

.group-selection-item:hover {
    background: #f8f9fa;
    border-color: #667eea;
}

.group-selection-item.sortable-chosen {
    background: #e3f2fd;
    border-color: #667eea;
    cursor: grabbing;
    opacity: 0.8;
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    z-index: 1000;
    position: relative;
}

.group-selection-item.sortable-ghost {
    opacity: 0.5;
}

.group-selection-item.disabled {
    opacity: 0.5;
    background: #f8f9fa;
    border-color: #e9ecef;
}

.group-selection-item.disabled .group-item-name {
    color: #6c757d;
}

.group-selection-item.disabled .group-item-settings {
    opacity: 0.6;
}

.group-item-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
}

.group-item-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.group-item-settings {
    margin-top: 0.5rem;
    padding-left: 1.7rem;
}

.group-setting-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #666;
    cursor: pointer;
}

.group-setting-desc {
    font-size: 0.85rem;
    color: #666;
}

.group-item-checkbox {
    width: 1.2rem;
    height: 1.2rem;
    cursor: pointer;
}

.group-item-name {
    font-weight: 500;
    color: #333;
    flex: 1;
}

.group-catalog-dropdown {
    padding: 0.25rem 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    font-size: 0.9rem;
    cursor: pointer;
    min-width: 140px;
    margin-right: 1rem;
}

.group-catalog-dropdown:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
}

.group-item-drag-handle {
    color: #999;
    cursor: grab;
    font-size: 1.2rem;
    padding: 0.5rem;
    margin: -0.5rem;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.group-item-drag-handle:hover {
    color: #667eea;
}

.group-item-drag-handle:active {
    color: #5a67d8;
}

.settings-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.settings-result {
    padding: 0.5rem;
    border-radius: 4px;
    font-size: 0.9rem;
}

.settings-result.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.settings-result.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.form-group small {
    display: block;
    color: #666;
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

/* Dashboard Styles */
.dashboard-section {
    display: none;
}

.user-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    border-radius: 12px;
    padding: 1.5rem 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.user-info h2 {
    color: #333;
    margin-bottom: 0.5rem;
    font-size: 1.75rem;
    font-weight: 600;
}

.user-info p {
    color: #666;
    margin: 0;
    font-size: 1rem;
}

/* Claim Groups Styles */
.claim-groups-section {
    margin-top: 2rem;
}

.unclaimed-group-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 1rem;
    background: #f8f9fa;
}

.unclaimed-group-info h4 {
    margin: 0 0 0.25rem 0;
    color: #333;
}

.unclaimed-group-info p {
    margin: 0;
    color: #666;
    font-size: 0.9rem;
}

.claim-group-form {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.claim-group-form input {
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
}

.claim-group-form button {
    padding: 0.5rem 1rem;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
}

.claim-group-form button:hover {
    background: #5a6fd8;
}

/* Expandable User Groups List */
.expandable-group-item {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 1rem;
    background: #f8f9fa;
    transition: all 0.3s ease;
    overflow: hidden;
}

.expandable-group-item:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transform: translateY(-1px);
}

.expandable-group-item.expanded {
    background: white;
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
}

.group-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.group-header:hover {
    background: rgba(102, 126, 234, 0.05);
}

.group-header-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.group-name-compact {
    margin: 0;
    color: #333;
    font-size: 1.1rem;
    font-weight: 600;
}

.group-expand-arrow {
    color: #667eea;
    font-size: 1.2rem;
    transition: transform 0.2s ease;
}

.expandable-group-item.expanded .group-expand-arrow {
    transform: rotate(90deg);
}

.arrow-icon {
    display: inline-block;
    transition: transform 0.2s ease;
}

.group-expanded-content {
    padding: 0 1rem 1rem 1rem;
    border-top: 1px solid #e9ecef;
    background: white;
    overflow: hidden;
}

.group-expanded-header {
    margin-bottom: 1.5rem;
}

.group-name-large {
    margin: 1rem 0;
    color: #333;
    font-size: 1.4rem;
    font-weight: 700;
}

.group-description {
    margin: 0 0 1rem 0;
    color: #666;
    font-size: 0.95rem;
    line-height: 1.4;
    font-style: italic;
    background: #f8f9fa;
    padding: 0.75rem;
    border-radius: 6px;
    border-left: 3px solid #667eea;
}

.group-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.group-stats-grid .stat-item {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0.75rem 0.5rem;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e9ecef;
    overflow: hidden;
    min-width: 0;
    min-height: 80px;
}

.group-stats-grid .stat-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 0.5rem;
    word-break: break-word;
    line-height: 1.2;
}

.group-stats-grid .stat-label {
    font-size: 0.8rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: auto;
}

.recent-content-section {
    margin-bottom: 1.5rem;
}

.recent-content-section h5 {
    margin: 0 0 1rem 0;
    color: #333;
    font-size: 1.1rem;
    font-weight: 600;
}

.recent-content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.recent-content-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: #f8f9fa;
    padding: 0.75rem;
    border-radius: 6px;
    border: 1px solid #e9ecef;
    min-width: 0;
    overflow: hidden;
}

.recent-poster {
    width: 40px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}

.recent-content-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 0;
    flex: 1;
    overflow: hidden;
}

.recent-title {
    font-weight: 600;
    color: #333;
    font-size: 0.9rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.recent-added-by {
    font-size: 0.8rem;
    color: #666;
    font-style: italic;
}

.group-actions-expanded {
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: flex-end;
    padding-top: 1rem;
    border-top: 1px solid #e9ecef;
    flex-wrap: wrap;
}

/* Legacy styles for backward compatibility */
.user-group-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 1rem;
    background: #f8f9fa;
    transition: all 0.2s ease;
}

.user-group-item:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transform: translateY(-1px);
}

.user-group-info h4 {
    margin: 0 0 0.25rem 0;
    color: #333;
}

.user-group-info p {
    margin: 0;
    color: #666;
    font-size: 0.9rem;
}

.user-group-role {
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
}

.user-group-role.owner {
    background: #28a745;
    color: white;
    border: 2px solid #20c947;
    box-shadow: 0 0 0 2px rgba(40, 167, 69, 0.2);
}

.user-group-role.contributor {
    background: #fd7e14;
    color: white;
    border: 2px solid #ff8c1a;
    box-shadow: 0 0 0 2px rgba(253, 126, 20, 0.2);
}

.user-group-role.watcher {
    background: #6c757d;
    color: white;
    border: 2px solid #868e96;
    box-shadow: 0 0 0 2px rgba(108, 117, 125, 0.2);
}

.user-group-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-view-group {
    padding: 0.5rem 1rem;
    background: #667eea;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.9rem;
    transition: background 0.2s ease;
}

.btn-view-group:hover {
    background: #5a6fd8;
    color: white;
    text-decoration: none;
}

.btn-delete-group {
    padding: 0.5rem 1rem;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.btn-delete-group:hover {
    background: #c82333;
}

.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #555;
}

input[type="text"], input[type="password"], input[type="url"], input[type="email"] {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

input:focus {
    outline: none;
    border-color: #667eea;
}

button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

    button:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    }

    button:disabled {
        background: #ccc;
        cursor: not-allowed;
        transform: none;
    }

.result {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 8px;
    background: #f0fdf4;
    border-left: 4px solid #28a745;
}

.error {
    border-left-color: #dc3545;
    background: #f8d7da;
    color: #721c24;
}

.addon-url {
    font-family: monospace;
    background: #e9ecef;
    padding: 0.5rem;
    border-radius: 4px;
    word-break: break-all;
    margin: 0.5rem 0;
    flex: 1;
    min-width: 300px;
}

@media (max-width: 768px) {
    .addon-url {
        min-width: unset;
    }
    
    .group-stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }
    
    .recent-content-grid {
        grid-template-columns: 1fr;
    }
    
    .group-actions-expanded {
        justify-content: center;
    }
    
    .group-header-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .group-name-compact {
        font-size: 1rem;
    }
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    border-radius: 12px;
    min-width: 400px;
    max-width: 90vw;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem 1rem 2rem;
    border-bottom: 1px solid #e0e0e0;
}

.modal-header h3 {
    margin: 0;
    color: #333;
}

.btn-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
    padding: 0.25rem;
    line-height: 1;
    border-radius: 4px;
}

.btn-close:hover {
    background: #f0f0f0;
    transform: none;
    box-shadow: none;
}

.modal-body {
    padding: 1.5rem 2rem;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    padding: 1rem 2rem 1.5rem 2rem;
    border-top: 1px solid #e0e0e0;
}

.role-select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    background: white;
}

.role-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Group Privacy Indicators */
.group-badges {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.group-privacy-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.group-privacy-badge.public {
    background: #e3f2fd;
    color: #1565c0;
    border: 1px solid #90caf9;
}

.group-privacy-badge.private {
    background: #fce4ec;
    color: #c2185b;
    border: 1px solid #f48fb1;
}

.group-privacy-indicator {
    font-size: 1rem !important;
    font-weight: 600 !important;
}

.group-privacy-indicator.public {
    color: #1565c0 !important;
}

.group-privacy-indicator.private {
    color: #c2185b !important;
}

/* Responsive adjustments for group badges */
@media (max-width: 768px) {
    .group-badges {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .group-privacy-badge {
        font-size: 0.75rem;
        padding: 0.2rem 0.6rem;
    }
}

@media (max-width: 480px) {
    .modal-content {
        min-width: unset;
        margin: 1rem;
    }
    
    .modal-header,
    .modal-body,
    .modal-footer {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* Collapsible Section Styles */
.collapsible-section {
    margin-bottom: 1rem;
}

.collapsible-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    padding: 0.5rem 0;
    border-radius: 8px;
    transition: background-color 0.2s ease;
}

.collapsible-header:hover {
    background-color: rgba(102, 126, 234, 0.05);
    padding: 0.5rem 1rem;
    margin: 0 -1rem;
}

.collapsible-header h2,
.collapsible-header h3 {
    margin: 0;
    border-bottom: none;
    padding-bottom: 0;
}

.collapse-icon {
    font-size: 1.2rem;
    color: #667eea;
    transition: transform 0.3s ease;
    user-select: none;
    font-weight: bold;
}

.collapse-icon.expanded {
    transform: rotate(180deg);
}

.collapsible-content {
    transition: all 0.3s ease;
    overflow: hidden;
}

.collapsible-content.show {
    display: block;
    animation: slideDown 0.3s ease-out;
}

.collapsible-content.hide {
    animation: slideUp 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        max-height: 2000px;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 1;
        max-height: 2000px;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        max-height: 0;
        transform: translateY(-10px);
    }
}

/* Mobile responsive adjustments for collapsible sections */
@media (max-width: 768px) {
    .collapsible-header:hover {
        padding: 0.5rem;
        margin: 0 -0.5rem;
    }
    
    .collapse-icon {
        font-size: 1rem;
    }
}

/* Trakt Integration Styles */
.trakt-auth-section {
    margin-bottom: 2rem;
}

.trakt-auth-card {
    background: #f8f9fa;
    border: 2px solid #667eea;
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
}

.trakt-auth-header h4 {
    margin: 0 0 0.5rem 0;
    color: #667eea;
    font-size: 1.2rem;
}

.trakt-auth-header p {
    margin: 0 0 1rem 0;
    color: #666;
}

.trakt-auth-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.trakt-list-section {
    margin-bottom: 2rem;
}

.trakt-list-section h5 {
    margin: 0 0 1rem;
    color: #333;
    font-size: 1.1rem;
    font-weight: 600;
}

.trakt-lists-container {
    display: grid;
    gap: 1rem;
    max-height: 400px;
    overflow-y: auto;
}

.trakt-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.trakt-list-item:hover {
    border-color: #667eea;
    background: #f8f9fa;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.15);
}

.trakt-list-item.selected {
    border-color: #667eea;
    background: #e3f2fd;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
}

.trakt-list-info {
    flex: 1;
    text-align: left;
}

.trakt-list-name {
    font-weight: 600;
    color: #333;
    margin: 0 0 0.25rem 0;
    font-size: 1rem;
}

.trakt-list-description {
    color: #666;
    font-size: 0.9rem;
    margin: 0 0 0.5rem 0;
    line-height: 1.4;
}

.trakt-list-stats {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.trakt-list-stat {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.85rem;
    color: #666;
}

.trakt-list-type-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    white-space: nowrap;
}

.trakt-list-type-badge.watchlist {
    background: #e3f2fd;
    color: #1565c0;
}

.trakt-list-type-badge.favorites {
    background: #fff3e0;
    color: #e65100;
}

.trakt-list-type-badge.collection {
    background: #e8f5e8;
    color: #2e7d32;
}

.trakt-list-type-badge.custom {
    background: #f3e5f5;
    color: #7b1fa2;
}

.trakt-import-options {
    margin-bottom: 2rem;
}

.trakt-import-options h5 {
    margin: 0 0 1rem 0;
    color: #333;
    font-size: 1.1rem;
    font-weight: 600;
}

.selected-list-info {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 1rem;
    margin-top: 0.5rem;
}

.selected-list-name {
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
}

.selected-list-details {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Loading states */
.trakt-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    color: #667eea;
    font-style: italic;
}

.trakt-loading::before {
    content: "⏳";
    margin-right: 0.5rem;
}

/* Error states */
.trakt-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-radius: 6px;
    padding: 1rem;
    margin: 1rem 0;
}

.trakt-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    border-radius: 6px;
    padding: 1rem;
    margin: 1rem 0;
}

/* Trakt Import Methods */
.trakt-import-methods {
    margin: 1.5rem 0;
}


.trakt-method-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 0.5rem;
}

.trakt-tab-btn {
    padding: 0.5rem 1rem;
    border: none;
    background: #f8f9fa;
    color: #6c757d;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.trakt-tab-btn:hover {
    background: #e9ecef;
    color: #495057;
}

.trakt-tab-btn.active {
    background: #007bff;
    color: white;
}

.trakt-method-content {
    margin-top: 1rem;
}

/* Search Lists */
.trakt-search-results {
    margin-top: 1rem;
    max-height: 400px;
    overflow-y: auto;
}

.search-result-item {
    padding: 1rem;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.search-result-item:hover {
    background: #f8f9fa;
    border-color: #007bff;
}

.search-result-item.selected {
    background: #e3f2fd;
    border-color: #007bff;
}

.search-result-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
}

.search-result-name {
    font-weight: 600;
    color: #495057;
    margin: 0;
}

.search-result-username {
    font-size: 0.85rem;
    color: #6c757d;
    margin: 0;
}

.search-result-description {
    color: #6c757d;
    font-size: 0.9rem;
    margin: 0.5rem 0;
}

.search-result-stats {
    display: flex;
    gap: 1rem;
    font-size: 0.8rem;
    color: #6c757d;
}

.search-result-stat {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* URL Import */
.trakt-url-results {
    margin-top: 1rem;
}

.url-import-preview {
    padding: 1rem;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    background: #f8f9fa;
    margin-top: 1rem;
}

.url-import-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
}

.url-import-name {
    font-weight: 600;
    color: #495057;
    margin: 0;
}

.url-import-username {
    font-size: 0.85rem;
    color: #6c757d;
    margin: 0;
}

.url-import-description {
    color: #6c757d;
    font-size: 0.9rem;
    margin: 0.5rem 0;
}

.url-import-stats {
    display: flex;
    gap: 1rem;
    font-size: 0.8rem;
    color: #6c757d;
    margin-bottom: 1rem;
}

.url-import-actions {
    display: flex;
    gap: 0.5rem;
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .trakt-auth-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .trakt-list-item {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
        text-align: left;
    }
    
    .trakt-list-stats {
        justify-content: space-between;
    }
    
    .trakt-lists-container {
        max-height: 300px;
    }

    .trakt-method-tabs {
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .search-result-header {
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .url-import-header {
        flex-direction: column;
        gap: 0.25rem;
    }
}

/* Stream Video Settings Styles */
.global-stream-settings {
    margin: 1rem 0;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.global-setting-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-weight: 500;
}

.global-setting-label input[type="checkbox"] {
    margin: 0;
    transform: scale(1.1);
}

.global-setting-desc {
    color: #495057;
}

.tooltip-icon {
    color: #6c757d;
    cursor: help;
    font-size: 1rem;
    font-weight: bold;
    position: relative;
    display: inline-block;
}

.tooltip-icon:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.75rem;
    background: #333;
    color: white;
    border-radius: 6px;
    font-size: 0.85rem;
    white-space: pre-wrap;
    width: 300px;
    text-align: left;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    font-weight: normal;
}

.tooltip-icon:hover::before {
    content: '';
    position: absolute;
    bottom: 115%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #333;
    z-index: 1000;
}

.setting-note {
    display: block;
    margin-top: 0.5rem;
    color: #6c757d;
    font-style: italic;
    font-size: 0.9rem;
}

/* Stream video responsive styles */
@media (max-width: 768px) {
    .global-setting-label {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
    
    .tooltip-icon:hover::after {
        width: 250px;
        font-size: 0.8rem;
    }
}

/* Account Management Styles */
.account-section {
    display: none;
}

.account-btn {
    background: #667eea !important;
    border: 1px solid #667eea !important;
    color: white !important;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.2s;
    margin-right: 0.5rem;
}

.account-btn:hover {
    background: #5a6fd8 !important;  
    border-color: #5a6fd8 !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.user-actions {
    display: flex;
    align-items: center;
}

.account-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.stat-label {
    font-weight: 600;
    color: #495057;
}

.stat-value {
    font-weight: 700;
    color: #212529;
}

.form-result {
    margin-top: 1rem;
    display: none;
}

.message {
    padding: 0.75rem 1rem;
    border-radius: 6px;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.message.info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Account responsive styles */
@media (max-width: 768px) {
    .account-stats {
        grid-template-columns: 1fr;
    }
    
    .user-actions {
        flex-direction: column;
        gap: 0.5rem;
        align-items: stretch;
    }
    
    .account-btn,
    .logout-btn {
        width: 100%;
        text-align: center;
    }
    
    .stat-item {
        flex-direction: column;
        text-align: center;
        gap: 0.25rem;
    }
}
