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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 20px 30px;
    margin-bottom: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 100;
}

.logo {
    font-size: 28px;
    font-weight: 700;
    color: #667eea;
}

.auth-section {
    display: flex;
    align-items: center;
    gap: 15px;
    position: relative;
    z-index: 200;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #555;
}

.validity-info {
    position: absolute;
    top: -10px;
    right: -10px;
    background: #28a745;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

/* User Menu Dropdown */
.user-menu-container {
    position: relative;
}

.user-info-dropdown {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #555;
    cursor: pointer;
    padding: 10px 15px;
    border-radius: 8px;
    transition: background-color 0.2s ease;
    user-select: none;
}

.user-info-dropdown:hover {
    background-color: #f8f9fa;
}

.dropdown-arrow {
    font-size: 10px;
    margin-left: 5px;
    transition: transform 0.2s ease;
}

.user-info-dropdown.active .dropdown-arrow {
    transform: rotate(180deg);
}

.user-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 5px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 200px;
    z-index: 10000;
    overflow: hidden;
}

.dropdown-item {
    padding: 12px 20px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    color: #333;
    font-size: 14px;
}

.dropdown-item:hover {
    background-color: #f8f9fa;
}

.dropdown-divider {
    height: 1px;
    background-color: #dee2e6;
    margin: 5px 0;
}

/* Language Icon Selector */
.language-icon-selector {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    user-select: none;
    margin-right: 15px;
}

.language-icon-selector:hover {
    background-color: rgba(102, 126, 234, 0.1);
}

#languageIcon {
    font-size: 20px;
}

#currentLanguageCode {
    color: #667eea;
    font-weight: 600;
    font-size: 12px;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

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

.btn-primary:hover {
    background: #5a6fd8;
    transform: translateY(-2px);
}

.btn-secondary {
    background: #f8f9fa;
    color: #6c757d;
    border: 1px solid #dee2e6;
}

.btn-secondary:hover {
    background: #e9ecef;
    transform: translateY(-2px);
}

.main-content {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 40px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.welcome-section {
    text-align: center;
    margin-bottom: 40px;
}

.welcome-title {
    font-size: 36px;
    font-weight: 700;
    color: #333;
    margin-bottom: 15px;
}

.welcome-subtitle {
    font-size: 18px;
    color: #666;
    margin-bottom: 30px;
}

.login-prompt {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    border: 2px dashed #dee2e6;
}

.login-prompt h3 {
    color: #495057;
    margin-bottom: 15px;
}

.login-prompt p {
    color: #6c757d;
    margin-bottom: 20px;
}

.dashboard {
    display: none;
}

.dashboard.active {
    display: block;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.dashboard-title {
    font-size: 24px;
    font-weight: 600;
    color: #333;
}

.nav-buttons {
    display: flex;
    gap: 15px;
}

.nav-btn {
    padding: 12px 20px;
    border: 2px solid #667eea;
    background: transparent;
    color: #667eea;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.nav-btn.active {
    background: #667eea;
    color: white;
}

.nav-btn:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
}

.lists-container {
    min-height: 200px;
}

.lists-container-simple {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.list-item {
    padding: 12px 16px;
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    color: #667eea;
    transition: all 0.3s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.list-item span {
    flex: 1;
    cursor: pointer;
}

.lists-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.lists-table th {
    background: #f8f9fa;
    padding: 15px 20px;
    text-align: left;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #e9ecef;
}

.lists-table td {
    padding: 15px 20px;
    border-bottom: 1px solid #e9ecef;
    vertical-align: middle;
}

.lists-table tr:hover {
    background: #f8f9fa;
}

.lists-table tr:last-child td {
    border-bottom: none;
}

.list-name {
    font-size: 16px;
    font-weight: 500;
    color: #667eea;
    cursor: pointer;
    transition: color 0.3s ease;
    padding: 8px 0;
    display: block;
}

.list-name:hover {
    color: #5a6fd8;
    text-decoration: underline;
}

.list-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.urls-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.urls-table th {
    background: #f8f9fa;
    padding: 12px 20px;
    text-align: left;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #e9ecef;
}

.urls-table td {
    padding: 12px 20px;
    border-bottom: 1px solid #e9ecef;
    vertical-align: middle;
}

.urls-table tr:hover {
    background: #f8f9fa;
}

.urls-table tr:last-child td {
    border-bottom: none;
}

.url-link {
    color: #667eea;
    text-decoration: none;
    font-size: 14px;
    cursor: pointer;
    font-weight: 500;
    transition: color 0.3s ease;
    display: block;
    padding: 4px 0;
}

.url-link:hover {
    text-decoration: underline;
    color: #5a6fd8;
}

.btn-small {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 4px;
}

.back-arrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    margin-bottom: 20px;
    cursor: pointer;
    transition: color 0.3s ease;
}

.back-arrow:hover {
    color: #5a6fd8;
}

.back-arrow::before {
    content: '←';
    font-size: 18px;
    font-weight: bold;
}

.edit-view {
    display: none;
}

.edit-view.active {
    display: block;
}

.add-url-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #e9ecef;
}

.add-url-form {
    display: flex;
    gap: 10px;
    align-items: end;
}

.add-url-form .form-group {
    margin-bottom: 0;
}

.add-url-form .form-label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #333;
    font-size: 14px;
}

.video-player-container {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
}

.video-player-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.video-player-header h4 {
    margin: 0;
    color: #333;
    font-size: 18px;
    font-weight: 600;
}

.video-player-url {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
    word-break: break-all;
}

.video-player-inline {
    width: 100%;
    height: 500px;
    border: none;
    border-radius: 8px;
}

/* Minimize YouTube branding */
#videoPlayer {
    position: relative;
}

.share-btn {
    background: #28a745;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.share-btn:hover {
    background: #218838;
}

.share-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.share-modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.share-modal-content {
    background: white;
    border-radius: 12px;
    padding: 24px;
    width: 400px;
    max-width: 90%;
    position: relative;
}

.share-close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 24px;
    font-weight: bold;
    color: #666;
    cursor: pointer;
    background: none;
    border: none;
}

.share-close-btn:hover {
    color: #333;
}

.share-form {
    margin-top: 20px;
}

.share-form .form-group {
    margin-bottom: 20px;
}

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

.share-form .form-input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    box-sizing: border-box;
}

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

.add-user-form {
    display: flex;
    gap: 10px;
    align-items: end;
}

.add-user-form .form-input {
    flex: 1;
    margin-bottom: 0;
}

.shared-users-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.shared-users-table th,
.shared-users-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

.shared-users-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
}

.shared-users-table tr:last-child td {
    border-bottom: none;
}

.remove-user-btn {
    background: #dc3545;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.share-management-container {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
}

.share-management-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.share-management-header h4 {
    margin: 0;
    color: #333;
    font-size: 18px;
    font-weight: 600;
}

.add-user-section {
    background: white;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    border: 1px solid #e9ecef;
}

.add-user-section h5 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 16px;
    font-weight: 500;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #6c757d;
}

.empty-state-icon {
    font-size: 48px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state h3 {
    margin-bottom: 10px;
    color: #495057;
}

.loading {
    text-align: center;
    padding: 40px;
    color: #6c757d;
}

.error {
    background: #f8d7da;
    color: #721c24;
    padding: 15px;
    border-radius: 8px;
    margin: 20px 0;
    border: 1px solid #f5c6cb;
}

.success {
    background: #d4edda;
    color: #155724;
    padding: 15px;
    border-radius: 8px;
    margin: 20px 0;
    border: 1px solid #c3e6cb;
}

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

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Login Modal Styles */
.login-tabs {
    display: flex;
    margin-bottom: 20px;
    border-bottom: 1px solid #ddd;
}

.tab-btn {
    flex: 1;
    padding: 10px 15px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    color: #666;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}

.tab-btn.active {
    color: #007bff;
    border-bottom-color: #007bff;
}

.tab-btn:hover {
    color: #007bff;
}

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

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

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    max-width: 400px;
    width: 90%;
    position: relative;
}

.modal-header {
    margin-bottom: 20px;
}

.modal-title {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.modal-subtitle {
    color: #666;
    font-size: 14px;
}

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

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

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

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

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

.btn-cancel {
    background: #f8f9fa;
    color: #6c757d;
    border: 1px solid #dee2e6;
}

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

.close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #6c757d;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn:hover {
    color: #333;
}

@media (max-width: 768px) {
    .header {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }

    .nav-buttons {
        flex-direction: column;
        width: 100%;
    }

    .nav-btn {
        width: 100%;
    }

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

    .modal-content {
        margin: 20px;
        padding: 20px;
    }
}

