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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #f5f5f5;
    padding-top:20px;
    color: #333;
    min-height: 100vh;
}

/* App wrapper - sticky footer layout */
#app {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.app-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background-color: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    flex: 1; /* Grow to fill available space, pushing footer to bottom */
}

@media (min-width: 769px) {
    .container {
        min-width: 800px;
        width: calc(100% - 40px); /* 20px breathing room on each side */
    }
}

/* Header with user status */
.app-header-wrapper {
    margin-bottom: 30px;
}

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

/* Navigation */
.main-nav {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 0;
    border-top: 1px solid #e0e0e0;
    border-bottom: 1px solid #e0e0e0;
}

.nav-link {
    color: #2196F3;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    padding: 5px 10px;
    border-radius: 4px;
    transition: all 0.2s;
}

.nav-link:hover {
    background-color: #e3f2fd;
    color: #1976D2;
}

.nav-link.router-link-active {
    background-color: #2196F3;
    color: white;
}

.nav-separator {
    color: #ccc;
    font-size: 12px;
}

h1 {
    margin: 0;
    color: #ff0000;
    font-size: 2em;
}

.user-status {
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: #e3f2fd;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
}

.user-icon {
    font-size: 18px;
}

.user-text {
    color: #1976D2;
    font-weight: 600;
}

.logout-btn {
    background-color: #f44336;
    color: white;
    border: none;
    padding: 4px 12px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: background-color 0.2s;
}

.logout-btn:hover {
    background-color: #d32f2f;
}

h2 {
    margin-top: 20px;
    margin-bottom: 15px;
    color: #444;
    font-size: 1.3em;
}

.input-section {
    margin-bottom: 20px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.input-section label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.input-section input[type="text"] {
    width: calc(100% - 120px);
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.input-section button {
    width: 110px;
    padding: 10px;
    margin-left: 10px;
    background-color: #ff0000;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
}

.input-section button:hover {
    background-color: #cc0000;
}

.player-container{
    text-align: center;
}
#player-container {
    margin: 20px 0;
    display: flex;
    justify-content: center;
}

#player {
    max-width: 100%;
}

.timeline-container {
    margin: 20px 0;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 8px;
}

.timeline-slider {
    position: relative;
    height: 50px;
    margin-bottom: 10px;
    cursor: pointer;
    user-select: none;
}

.timeline-track {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    height: 8px;
    background-color: #ddd;
    border-radius: 4px;
    transition: height 0.2s, background-color 0.2s;
}

.timeline-slider:hover .timeline-track {
    height: 10px;
    background-color: #ccc;
}

.timeline-range {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    height: 8px;
    background-color: #4CAF50;
    border-radius: 4px;
    z-index: 1;
    transition: height 0.2s;
}

.timeline-slider:hover .timeline-range {
    height: 10px;
}

.timeline-current-time {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 0;
    z-index: 3;
    pointer-events: none;
}

.current-time-line {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: #ff0000;
    box-shadow: 0 0 4px rgba(255, 0, 0, 0.5);
}

.current-time-line::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background-color: #ff0000;
    border: 2px solid white;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.timeline-handle {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    background-color: #2196F3;
    border: 3px solid white;
    border-radius: 50%;
    cursor: grab;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: transform 0.1s, box-shadow 0.1s;
}

.timeline-handle:hover {
    transform: translate(-50%, -50%) scale(1.2);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.timeline-handle:active {
    cursor: grabbing;
}

.timeline-handle-start {
    background-color: #FF9800;
    cursor: pointer;
}

.timeline-handle-start:hover {
    background-color: #F57C00;
}

.timeline-handle-end {
    background-color: #9C27B0;
}

.handle-label {
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    pointer-events: none;
}

.timeline-handle-end .handle-label {
    top: auto;
    bottom: -30px;
}

.timeline-labels {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #666;
    margin-top: 5px;
}

.zoom-link {
    color: #2196F3;
    cursor: pointer;
    font-weight: 600;
    transition: color 0.2s;
}

.zoom-link:hover {
    color: #0b7dda;
    text-decoration: underline;
}

.zoom-view {
    padding: 20px 0;
}

.zoom-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #2196F3;
}

.zoom-header h3 {
    margin: 0;
    color: #2196F3;
    font-size: 1.2em;
}

.zoom-close {
    color: #f44336;
    font-weight: 600;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
}

.zoom-close:hover {
    color: #da190b;
}

.zoom-slider-group {
    margin-bottom: 30px;
}

.zoom-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-size: 14px;
}

.zoom-label-title {
    font-weight: 600;
    color: #333;
}

.zoom-time-value {
    font-weight: 700;
    color: #FF9800;
    font-size: 16px;
    font-family: 'Courier New', monospace;
}

.zoom-time-clickable {
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background-color 0.2s, color 0.2s;
}

.zoom-time-clickable:hover {
    background-color: #FF9800;
    color: white;
}

.zoom-slider-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
}

.zoom-slider-container {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 8px 0;
}

.zoom-slider {
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: linear-gradient(to right, #ddd 0%, #FF9800 50%, #ddd 100%);
    outline: none;
    cursor: grab;
}

.zoom-slider:active {
    cursor: grabbing;
}

.zoom-current-marker {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 3px;
    height: 20px;
    background-color: #ff0000;
    pointer-events: none;
    z-index: 10;
    box-shadow: 0 0 4px rgba(255, 0, 0, 0.6);
}

.zoom-current-marker::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background-color: #ff0000;
    border: 2px solid white;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.zoom-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #FF9800;
    cursor: grab;
    border: 3px solid white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s, box-shadow 0.2s;
}

.zoom-slider::-webkit-slider-thumb:active {
    cursor: grabbing;
}

.zoom-slider::-moz-range-thumb {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #FF9800;
    cursor: grab;
    border: 3px solid white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s, box-shadow 0.2s;
}

.zoom-slider::-moz-range-thumb:active {
    cursor: grabbing;
}

.zoom-slider-start::-webkit-slider-thumb:hover {
    transform: scale(1.15);
    box-shadow: 0 3px 12px rgba(255, 152, 0, 0.6);
}

.zoom-slider-start::-moz-range-thumb:hover {
    transform: scale(1.15);
    box-shadow: 0 3px 12px rgba(255, 152, 0, 0.6);
}

.zoom-limit {
    font-size: 11px;
    color: #999;
    font-family: 'Courier New', monospace;
    min-width: 55px;
    text-align: center;
}

.playback-control {
    margin-top: 20px;
    display: flex;
    justify-content: center;
}

.play-button,
.stop-button {
    padding: 16px 48px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 18px;
    font-weight: 600;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 10px;
}

.play-button {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
}

.play-button:hover {
    background: linear-gradient(135deg, #45a049 0%, #3d8b40 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(76, 175, 80, 0.4);
}

.play-button:active {
    transform: translateY(0);
}

.stop-button {
    background: linear-gradient(135deg, #f44336 0%, #da190b 100%);
    color: white;
}

.stop-button:hover {
    background: linear-gradient(135deg, #da190b 0%, #c41709 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(244, 67, 54, 0.4);
}

.stop-button:active {
    transform: translateY(0);
}

.button-icon {
    font-size: 20px;
    line-height: 1;
}

.controls-section {
    
    padding-top: 20px;
}

.control-group {
    margin-bottom: 15px;
}

.control-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.control-group input[type="number"] {
    width: 200px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.control-group input[type="number"]:disabled {
    background-color: #f5f5f5;
    color: #999;
}

.control-group input[type="radio"] {
    margin-right: 5px;
}

.precision-section {
    margin: 20px 0;
    padding: 15px;
    background-color: #fff3e0;
    border-radius: 4px;
    border-left: 4px solid #FF9800;
}

.precision-section h3 {
    margin: 0 0 15px 0;
    font-size: 1.1em;
    color: #E65100;
}

.precision-section .control-group {
    margin-bottom: 0;
}

.lookahead-value,
.playback-rate-value {
    font-weight: 600;
    color: #FF9800;
    margin-left: 10px;
}

.preset-buttons {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.preset-btn {
    padding: 6px 12px;
    background-color: #fff;
    color: #FF9800;
    border: 2px solid #FF9800;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s;
}

.preset-btn:hover {
    background-color: #FF9800;
    color: white;
}

.precision-section .control-group {
    margin-bottom: 20px;
}

.precision-section .control-group:last-child {
    margin-bottom: 0;
}

input[type="range"] {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #ddd;
    outline: none;
    margin: 10px 0;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #FF9800;
    cursor: pointer;
}

input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #FF9800;
    cursor: pointer;
    border: none;
}

.help-text {
    font-size: 12px;
    color: #666;
    font-style: italic;
    margin: 5px 0 0 0;
}

.info-section {
    margin-top: 20px;
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 4px;
    border-left: 4px solid #2196F3;
}

.info-section p {
    margin: 5px 0;
    font-size: 14px;
}

.info-section span {
    font-weight: 600;
    color: #2196F3;
}

/* View Mode Header */
.view-mode-header {
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
}

.edit-mode-button {
    padding: 12px 36px;
    background: linear-gradient(135deg, #FF9800 0%, #F57C00 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(255, 152, 0, 0.3);
}

.edit-mode-button:hover {
    background: linear-gradient(135deg, #F57C00 0%, #E65100 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255, 152, 0, 0.4);
}

.edit-mode-button:active {
    transform: translateY(0);
}

/* View Mode Actions (Share & Create New Loop) */
.view-actions {
    margin-top: 15px;
    display: flex;
    gap: 15px;
    justify-content: center;
    align-items: center;
}

.view-actions .btn-share {
    padding: 12px 36px;
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.view-actions .btn-share:hover {
    background: linear-gradient(135deg, #45a049 0%, #3d8b40 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(76, 175, 80, 0.4);
}

.view-actions .btn-share:active {
    transform: translateY(0);
}

.view-actions .btn-share.copied {
    background: linear-gradient(135deg, #66BB6A 0%, #4CAF50 100%);
}

.view-actions .btn-favorite {
    padding: 12px 36px;
    background: linear-gradient(135deg, #E0E0E0 0%, #BDBDBD 100%);
    color: #616161;
    border: 2px solid #9E9E9E;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.view-actions .btn-favorite:hover {
    background: linear-gradient(135deg, #FFD54F 0%, #FFC107 100%);
    border-color: #FFA000;
    color: #F57F17;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255, 193, 7, 0.4);
}

.view-actions .btn-favorite.is-favorite {
    background: linear-gradient(135deg, #FFD54F 0%, #FFC107 100%);
    border-color: #FFA000;
    color: #F57F17;
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.3);
}

.view-actions .btn-favorite.is-favorite:hover {
    background: linear-gradient(135deg, #FFB300 0%, #FF8F00 100%);
    border-color: #FF6F00;
    color: #E65100;
}

.view-actions .btn-favorite:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Save Loop Button */
.save-control {
    margin-top: 15px;
    display: flex;
    justify-content: center;
}

.save-button {
    padding: 12px 36px;
    background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.3);
}

.save-button:hover {
    background: linear-gradient(135deg, #1976D2 0%, #1565C0 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(33, 150, 243, 0.4);
}

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

/* Quality Warning Banner */
.quality-warning-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #FFF3CD 0%, #FFF9E6 100%);
    border-top: 2px solid #FFD54F;
    padding: 12px 48px 12px 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 900;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.warning-text {
    margin: 0;
    color: #856404;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
}

.warning-dismiss {
    color: #856404;
    text-decoration: underline;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    transition: color 0.2s;
}

.warning-dismiss:hover {
    color: #533f03;
}

.warning-close {
    position: absolute;
    top: 8px;
    right: 12px;
    background: none;
    border: none;
    color: #856404;
    font-size: 20px;
    cursor: pointer;
    padding: 4px 8px;
    line-height: 1;
    transition: all 0.2s;
    border-radius: 4px;
}

.warning-close:hover {
    background-color: rgba(133, 100, 4, 0.1);
    color: #533f03;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
}

.modal-content {
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

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

.modal-header h3 {
    margin: 0;
    color: #2196F3;
    font-size: 1.5em;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.modal-close:hover {
    background-color: #f5f5f5;
    color: #333;
}

.modal-body {
    padding: 24px;
}

.save-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

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

.form-group label {
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"] {
    padding: 10px 12px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.form-group input[type="text"]:focus,
.form-group input[type="email"]:focus,
.form-group input[type="password"]:focus {
    outline: none;
    border-color: #2196F3;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

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

.btn-primary,
.btn-secondary {
    padding: 10px 24px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background-color: #2196F3;
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background-color: #1976D2;
}

.btn-primary:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.btn-secondary {
    background-color: #f5f5f5;
    color: #333;
}

.btn-secondary:hover {
    background-color: #e0e0e0;
}

.error-message {
    background-color: #ffebee;
    color: #c62828;
    padding: 12px;
    border-radius: 6px;
    border-left: 4px solid #c62828;
    font-size: 14px;
}

.success-message {
    text-align: center;
    padding: 20px;
}

.success-message p {
    font-size: 16px;
    color: #2e7d32;
    margin-bottom: 20px;
    line-height: 1.6;
}

.logged-in-info {
    background-color: #e3f2fd;
    color: #1976D2;
    padding: 12px;
    border-radius: 6px;
    border-left: 4px solid #2196F3;
    margin-bottom: 16px;
}

.logged-in-info p {
    margin: 0;
    font-weight: 600;
    font-size: 14px;
}

.help-text {
    font-size: 12px;
    color: #666;
    margin: 4px 0 0 0;
}

/* My Loops Page */
.my-loops-page {
    max-width: 1200px;
    margin: 0 auto;
}

.page-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
}

.page-header h2 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 2em;
}

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

/* Loading/Error/Empty States */
.loading-state,
.error-state,
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.loading-state p {
    color: #666;
    font-size: 16px;
}

.error-state .error-message {
    display: inline-block;
    margin-bottom: 20px;
}

.btn-retry {
    padding: 10px 24px;
    background-color: #2196F3;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: background-color 0.2s;
}

.btn-retry:hover {
    background-color: #1976D2;
}

.empty-state .empty-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.empty-state h3 {
    margin: 0 0 10px 0;
    color: #666;
    font-size: 1.5em;
}

.empty-state p {
    color: #999;
    margin-bottom: 30px;
}

/* =================================================================
   Register Prompt (My Loops Page for Non-Logged Users)
   ================================================================= */

.register-prompt {
    max-width: 800px;
    margin: 40px auto;
    padding: 0 20px;
}

.register-prompt-content {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 3px solid #2196F3;
    border-radius: 16px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 8px 24px rgba(33, 150, 243, 0.15);
}

.register-prompt-content h2 {
    margin: 0 0 16px 0;
    color: #1976D2;
    font-size: 28px;
    font-weight: 700;
}

.register-prompt-content > p {
    margin: 0 0 24px 0;
    color: #666;
    font-size: 16px;
}

.benefits-list {
    list-style: none;
    padding: 0;
    margin: 0 0 32px 0;
    text-align: left;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.benefits-list li {
    padding: 12px 16px;
    margin-bottom: 10px;
    background-color: #f8f9fa;
    border-left: 4px solid #2196F3;
    border-radius: 6px;
    color: #555;
    font-size: 15px;
    line-height: 1.6;
    transition: all 0.2s;
}

.benefits-list li:hover {
    background-color: #e3f2fd;
    transform: translateX(4px);
}

.benefits-list li strong {
    color: #1976D2;
}

.prompt-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 400px;
    margin: 0 auto;
}

.btn-register {
    padding: 16px 32px;
    background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.4);
}

.btn-register:hover {
    background: linear-gradient(135deg, #1976D2 0%, #1565C0 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(33, 150, 243, 0.5);
}

.btn-login-alt {
    padding: 12px 24px;
    background-color: transparent;
    color: #2196F3;
    border: 2px solid #2196F3;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-login-alt:hover {
    background-color: #e3f2fd;
    border-color: #1976D2;
    color: #1976D2;
}

/* Mobile Responsiveness for Register Prompt */
@media (max-width: 768px) {
    .register-prompt {
        margin: 20px auto;
    }

    .register-prompt-content {
        padding: 30px 20px;
    }

    .register-prompt-content h2 {
        font-size: 24px;
    }

    .benefits-list li {
        font-size: 14px;
        padding: 10px 12px;
    }

    .btn-register {
        font-size: 16px;
        padding: 14px 28px;
    }
}

/* =================================================================
   Search and Filter Section
   ================================================================= */

.search-filter-section {
    margin-bottom: 30px;
    padding: 25px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    border: 2px solid #dee2e6;
}

/* Search Box */
.search-box {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.search-input {
    flex: 1;
    padding: 12px 18px;
    border: 2px solid #ced4da;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s;
    background-color: white;
}

.search-input:focus {
    outline: none;
    border-color: #2196F3;
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
}

.btn-search {
    padding: 12px 24px;
    background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(33, 150, 243, 0.3);
}

.btn-search:hover {
    background: linear-gradient(135deg, #1976D2 0%, #1565C0 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.4);
}

.btn-clear {
    padding: 12px 20px;
    background-color: #fff;
    color: #666;
    border: 2px solid #ced4da;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.btn-clear:hover {
    background-color: #f8f9fa;
    border-color: #adb5bd;
    color: #333;
}

/* Category Filter */
.category-filter {
    margin-top: 20px;
}

.category-filter label {
    display: block;
    margin-bottom: 12px;
    font-weight: 600;
    color: #495057;
    font-size: 14px;
}

.category-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.category-chip {
    padding: 8px 16px;
    background-color: white;
    color: #495057;
    border: 2px solid #dee2e6;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.category-chip:hover {
    border-color: #2196F3;
    color: #2196F3;
    background-color: #e3f2fd;
}

.category-chip.active {
    background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
    color: white;
    border-color: #2196F3;
    box-shadow: 0 2px 8px rgba(33, 150, 243, 0.3);
}

/* Search Info */
.search-info {
    margin-top: 20px;
    padding: 12px 16px;
    background-color: #e3f2fd;
    border-left: 4px solid #2196F3;
    border-radius: 6px;
}

.search-info p {
    margin: 0;
    color: #1976D2;
    font-size: 14px;
    font-weight: 500;
}

/* Mobile Responsiveness for Search */
@media (max-width: 768px) {
    .search-filter-section {
        padding: 20px 15px;
    }

    .search-box {
        flex-direction: column;
    }

    .btn-search,
    .btn-clear {
        width: 100%;
    }

    .category-chips {
        gap: 8px;
    }

    .category-chip {
        font-size: 12px;
        padding: 6px 12px;
    }
}

/* Loops Grid */
.loops-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

/* Loop Card */
.loop-card {
    background-color: white;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.loop-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    border-color: #2196F3;
}

/* Favorite Loop Card Styling */
.favorite-card {
    border-color: #FFD54F;
    background: linear-gradient(135deg, #FFFEF5 0%, #FFF9E6 100%);
    box-shadow: 0 2px 12px rgba(255, 193, 7, 0.2);
}

.favorite-card:hover {
    border-color: #FFC107;
    box-shadow: 0 6px 20px rgba(255, 193, 7, 0.35);
}

.favorites-section {
    margin-bottom: 40px;
    padding-bottom: 40px;
    border-bottom: 2px dashed #e0e0e0;
}

.loop-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 20px;
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
    border-bottom: 2px solid #e0e0e0;
}

.loop-video-info {
    flex: 1;
    min-width: 0;
}

.loop-video-title {
    margin: 0 0 8px 0;
    color: #333;
    font-size: 16px;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

.loop-custom-title {
    margin: 0;
    color: #666;
    font-size: 14px;
    font-style: italic;
}

.btn-delete {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s;
    opacity: 0.6;
}

.btn-delete:hover {
    background-color: rgba(244, 67, 54, 0.1);
    opacity: 1;
    transform: scale(1.1);
}

.btn-unfavorite {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s;
    color: #FFC107;
    opacity: 0.9;
}

.btn-unfavorite:hover {
    background-color: rgba(255, 193, 7, 0.15);
    opacity: 1;
    transform: scale(1.15);
}

.btn-edit {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s;
    opacity: 0.6;
}

.btn-edit:hover {
    background-color: rgba(33, 150, 243, 0.1);
    opacity: 1;
    transform: scale(1.1);
}

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

.loop-card-body {
    padding: 20px;
}

.loop-description {
    margin-bottom: 12px;
    padding: 12px;
    background-color: #f9f9f9;
    border-left: 3px solid #2196F3;
    border-radius: 4px;
    color: #555;
    font-size: 14px;
    line-height: 1.6;
}

.loop-times {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 12px;
}

.loop-time-badge,
.loop-duration-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    font-family: 'Courier New', monospace;
}

.loop-time-badge {
    background-color: #e3f2fd;
    color: #1976D2;
}

.loop-duration-badge {
    background-color: #f3e5f5;
    color: #7B1FA2;
}

.loop-metadata {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 12px;
}

.loop-meta-item {
    font-size: 13px;
    color: #666;
}

.loop-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.tag {
    padding: 4px 10px;
    background-color: #fff3e0;
    color: #E65100;
    border: 1px solid #FFB74D;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.tag-clickable {
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
    margin-right: 6px;
    margin-bottom: 6px;
}

.tag-clickable:hover {
    background-color: #E65100;
    color: white;
    border-color: #E65100;
    transform: translateY(-1px);
}

.loop-username,
.loop-username-view {
    font-size: 14px;
    color: #666;
    margin: 8px 0;
}

.username-link {
    color: #3498db;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.username-link:hover {
    color: #2980b9;
    text-decoration: underline;
}

.loop-card-footer {
    display: flex;
    gap: 10px;
    padding: 16px 20px;
    background-color: #fafafa;
    border-top: 1px solid #e0e0e0;
}

.loop-card-footer .btn-secondary {
    flex: 1;
    text-align: center;
    text-decoration: none;
    padding: 10px 16px;
    font-size: 13px;
}

.btn-share.copied {
    background-color: #4CAF50;
    color: white;
    transition: all 0.3s;
}

/* Loop Edit Form */
.loop-edit-form {
    padding: 20px;
    background-color: #f8fbff;
    border: 2px solid #2196F3;
    border-radius: 8px;
    margin: 0 20px 20px 20px;
}

.loop-edit-form .form-group {
    margin-bottom: 16px;
}

.loop-edit-form .form-group:last-of-type {
    margin-bottom: 20px;
}

.loop-edit-form label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.loop-edit-form input[type="text"],
.loop-edit-form select,
.loop-edit-form textarea {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.2s;
}

.loop-edit-form input[type="text"]:focus,
.loop-edit-form select:focus,
.loop-edit-form textarea:focus {
    outline: none;
    border-color: #2196F3;
    background-color: #fff;
}

.loop-edit-form textarea {
    resize: vertical;
    min-height: 80px;
}

.edit-form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.btn-save {
    padding: 10px 24px;
    background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(33, 150, 243, 0.3);
}

.btn-save:hover:not(:disabled) {
    background: linear-gradient(135deg, #1976D2 0%, #1565C0 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.4);
}

.btn-save:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-cancel {
    padding: 10px 24px;
    background-color: #f5f5f5;
    color: #666;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-cancel:hover {
    background-color: #e0e0e0;
    border-color: #bbb;
    color: #333;
}

/* Loop Card Thumbnails (for Browse and My Loops pages) */
.loop-card .loop-thumbnail {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background-color: #000;
}

.loop-card .thumbnail-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.loop-card .thumbnail-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0);
    transition: background 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loop-card:hover .thumbnail-overlay {
    background: rgba(0, 0, 0, 0.4);
}

.loop-card .play-overlay {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.3s;
    border: none;
    cursor: pointer;
}

.loop-card:hover .play-overlay {
    opacity: 1;
    transform: scale(1);
}

.loop-card .play-icon {
    font-size: 24px;
    color: #ff0000;
    margin-left: 4px;
}

.loop-card .loop-thumbnail .loop-duration-badge {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background-color: rgba(0, 0, 0, 0.85);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    font-family: 'Courier New', monospace;
    z-index: 1;
}

/* Browse Loops Page - Specific overrides */
.browse-card .loop-thumbnail {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background-color: #000;
}

.browse-card .play-overlay {
    text-decoration: none;
}

.browse-card .loop-title {
    margin: 0 0 8px 0;
    color: #333;
    font-size: 18px;
    font-weight: 600;
}

.browse-card .loop-video-source {
    margin: 0 0 12px 0;
    color: #666;
    font-size: 13px;
    line-height: 1.4;
}

.browse-card .video-title {
    color: #444;
    font-weight: 500;
}

/* Load More Button */
.load-more-container {
    display: flex;
    justify-content: center;
    margin: 40px 0;
}

.btn-load-more {
    padding: 12px 36px;
    background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.3);
}

.btn-load-more:hover:not(:disabled) {
    background: linear-gradient(135deg, #1976D2 0%, #1565C0 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(33, 150, 243, 0.4);
}

.btn-load-more:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

@media (max-width: 768px) {
    .container {
        padding: 20px;
    }

    .input-section input[type="text"] {
        width: 100%;
        margin-bottom: 10px;
    }

    .input-section button {
        width: 100%;
        margin-left: 0;
    }

    #player {
        width: 100%;
        height: auto;
    }

    .timeline-container {
        padding: 15px;
    }

    .timeline-slider {
        height: 60px;
    }

    .timeline-handle {
        width: 24px;
        height: 24px;
    }

    .handle-label {
        font-size: 11px;
        padding: 3px 6px;
    }

    .play-button,
    .stop-button {
        width: 100%;
        justify-content: center;
    }

    .zoom-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .zoom-slider-wrapper {
        flex-direction: column;
        gap: 8px;
    }

    .zoom-slider-container {
        width: 100%;
    }

    .zoom-limit {
        font-size: 10px;
        min-width: auto;
    }

    .preset-buttons {
        justify-content: space-between;
    }

    .preset-btn {
        flex: 1;
        min-width: 0;
    }

    .modal-content {
        width: 95%;
        max-height: 95vh;
    }

    .modal-header {
        padding: 16px 20px;
    }

    .modal-header h3 {
        font-size: 1.3em;
    }

    .modal-body {
        padding: 20px;
    }

    .modal-actions {
        flex-direction: column;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
    }

    .save-button {
        width: 100%;
    }

    .view-actions {
        flex-direction: column;
        gap: 10px;
    }

    .view-actions .btn-favorite,
    .view-actions .btn-share,
    .view-actions .edit-mode-button {
        width: 100%;
    }

    .header {
        flex-direction: column;
        align-items: flex-start;
    }

    h1 {
        font-size: 1.5em;
    }

    .user-status {
        align-self: flex-end;
    }

    /* My Loops Page Mobile Styles */
    .loops-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .page-header h2 {
        font-size: 1.5em;
    }

    .loop-card-header {
        padding: 16px;
    }

    .loop-video-title {
        font-size: 15px;
    }

    .loop-card-body {
        padding: 16px;
    }

    .loop-card-footer {
        flex-direction: column;
        padding: 12px 16px;
    }

    .loop-card-footer .btn-secondary {
        width: 100%;
    }

    /* Quality Warning Banner Mobile */
    .quality-warning-banner {
        flex-direction: column;
        gap: 10px;
        padding: 12px 40px 12px 15px;
    }

    .warning-text {
        font-size: 13px;
    }

    .warning-close {
        top: 6px;
        right: 8px;
        font-size: 18px;
    }
}

/* =================================================================
   Login Modal Styles
   ================================================================= */

/* Login link in header */
.login-link {
    color: #2196F3;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    padding: 8px 16px;
    border-radius: 20px;
    transition: all 0.2s;
}

.login-link:hover {
    background-color: #1976D2;
    color: white;
}

/* Modal overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Modal content */
.modal-content {
    background-color: white;
    border-radius: 12px;
    padding: 30px;
    max-width: 450px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease-out;
}

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

/* Modal close button */
.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 28px;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.modal-close:hover {
    background-color: #f5f5f5;
    color: #333;
}

/* Modal header */
.modal-header {
    margin-bottom: 25px;
}

.modal-header h2 {
    font-size: 24px;
    color: #333;
    margin: 0;
}

/* Modal tabs */
.modal-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    border-bottom: 2px solid #e0e0e0;
}

.tab-btn {
    flex: 1;
    padding: 12px 20px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    color: #666;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: -2px;
}

.tab-btn:hover {
    color: #2196F3;
}

.tab-btn.active {
    color: #2196F3;
    border-bottom-color: #2196F3;
}

/* Auth form */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

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

.form-group label {
    font-weight: 600;
    color: #555;
    font-size: 14px;
}

.form-group input {
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 15px;
    transition: all 0.2s;
    font-family: inherit;
}

.form-group input:focus {
    outline: none;
    border-color: #2196F3;
    background-color: #f8fbff;
}

.form-group input::placeholder {
    color: #aaa;
}

.form-group select {
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 15px;
    transition: all 0.2s;
    font-family: inherit;
    background-color: white;
    cursor: pointer;
}

.form-group select:focus {
    outline: none;
    border-color: #2196F3;
    background-color: #f8fbff;
}

/* Suggested Tags */
.suggested-tags {
    margin-top: 10px;
}

.suggested-tags .help-text {
    margin-bottom: 8px;
    font-size: 13px;
    color: #666;
}

.tag-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-chip {
    padding: 6px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 16px;
    background-color: white;
    color: #555;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.tag-chip:hover {
    border-color: #2196F3;
    color: #2196F3;
    background-color: #f8fbff;
}

.tag-chip.active {
    border-color: #2196F3;
    background-color: #2196F3;
    color: white;
}

.tag-chip.active:hover {
    background-color: #1976D2;
    border-color: #1976D2;
}

/* Error message */
.error-message {
    background-color: #ffebee;
    border: 1px solid #ef5350;
    color: #c62828;
    padding: 12px 15px;
    border-radius: 6px;
    font-size: 14px;
    line-height: 1.4;
}

/* Form buttons */
.auth-form .btn {
    padding: 14px 20px;
    font-size: 16px;
    font-weight: 600;
    margin-top: 10px;
}

.auth-form .btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Forgot password link */
.forgot-password-link {
    text-align: center;
    margin-top: 15px;
}

.forgot-password-link a {
    color: #3498db;
    text-decoration: none;
    font-size: 14px;
}

.forgot-password-link a:hover {
    text-decoration: underline;
}

/* Reset password form */
.reset-instructions {
    font-size: 14px;
    color: #555;
    line-height: 1.6;
    margin-bottom: 20px;
    text-align: center;
}

/* Back to login link */
.back-to-login-link {
    text-align: center;
    margin-top: 15px;
}

.back-to-login-link a {
    color: #3498db;
    text-decoration: none;
    font-size: 14px;
}

.back-to-login-link a:hover {
    text-decoration: underline;
}

/* Success message in reset form */
.success-message {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    text-align: center;
}

/* Mobile responsiveness for modal */
@media (max-width: 500px) {
    .modal-content {
        padding: 25px 20px;
        width: 95%;
    }

    .modal-header h2 {
        font-size: 20px;
    }

    .tab-btn {
        padding: 10px 15px;
        font-size: 14px;
    }

    .form-group input {
        padding: 10px 12px;
        font-size: 14px;
    }

    .auth-form .btn {
        padding: 12px 16px;
        font-size: 15px;
    }
}

/* =================================================================
   Loop Title Section (View Loop Page)
   ================================================================= */

.loop-title-section {
    margin-bottom: 30px;
    padding: 15px;
    /*background: linear-gradient(135deg, #f5f7fa 0%, #e8ecf1 100%);*/
    /*border-radius: 12px;*/
    border-left: 4px solid #2196F3;
}

.loop-title {
    margin: 0 0 12px 0;
    color: #333;
    font-size: 28px;
    font-weight: 700;
    line-height: 1.3;
}

.video-reference-title {
    margin: 0;
    color: #666;
    font-size: 14px;
    line-height: 1.5;
}

.video-reference-title a {
    color: #2196F3;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.video-reference-title a:hover {
    color: #1976D2;
    text-decoration: underline;
}

/* Mobile Responsiveness for Loop Title */
@media (max-width: 768px) {
    .loop-title-section {
        padding: 20px;
        margin-bottom: 25px;
    }

    .loop-title {
        font-size: 22px;
    }

    .video-reference-title {
        font-size: 13px;
    }
}

/* =================================================================
   Comments Section Styles
   ================================================================= */

.comments-section {
    margin-top: 40px;
    padding: 30px;
    background-color: #f9f9f9;
    border-radius: 12px;
    border: 1px solid #e0e0e0;
}

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

.comments-header h3 {
    font-size: 20px;
    color: #333;
    margin: 0;
}

/* Comment Form */
.comment-form {
    margin-bottom: 30px;
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    border: 2px solid #e0e0e0;
}

.comment-form textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    transition: all 0.2s;
}

.comment-form textarea:focus {
    outline: none;
    border-color: #2196F3;
    background-color: #f8fbff;
}

.comment-form textarea:disabled {
    background-color: #f5f5f5;
    cursor: not-allowed;
}

.comment-form-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
}

.char-count {
    font-size: 12px;
    color: #999;
}

.btn-submit-comment {
    padding: 10px 24px;
    background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(33, 150, 243, 0.3);
}

.btn-submit-comment:hover:not(:disabled) {
    background: linear-gradient(135deg, #1976D2 0%, #1565C0 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.4);
}

.btn-submit-comment:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Login Prompt */
.login-prompt {
    background-color: #fff3cd;
    border: 1px solid #ffc107;
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.login-prompt p {
    margin: 0;
    color: #856404;
    font-size: 14px;
}

/* Comments List States */
.comments-loading,
.comments-error,
.comments-empty {
    padding: 30px;
    text-align: center;
    color: #666;
    background-color: white;
    border-radius: 8px;
    border: 1px dashed #ccc;
}

.comments-error {
    background-color: #ffebee;
    border-color: #ef5350;
    color: #c62828;
}

/* Comments List */
.comments-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Comment Item */
.comment-item {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    transition: all 0.2s;
}

.comment-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-color: #ccc;
}

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

.comment-author {
    font-weight: 600;
    color: #2196F3;
    font-size: 14px;
}

.comment-date {
    font-size: 12px;
    color: #999;
}

.comment-body {
    margin-bottom: 10px;
}

.comment-body p {
    margin: 0;
    line-height: 1.6;
    color: #333;
    font-size: 14px;
    word-wrap: break-word;
}

/* Comment Links */
.comment-link {
    color: #2196F3;
    text-decoration: underline;
    word-break: break-all;
}

.comment-link:hover {
    color: #1976D2;
}

.comment-footer {
    display: flex;
    justify-content: flex-end;
}

.btn-delete-comment {
    background: none;
    border: none;
    color: #f44336;
    font-size: 13px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s;
    opacity: 0.7;
}

.btn-delete-comment:hover {
    background-color: rgba(244, 67, 54, 0.1);
    opacity: 1;
}

/* Mobile Responsiveness for Comments */
@media (max-width: 600px) {
    .comments-section {
        padding: 20px 15px;
        margin-top: 30px;
    }

    .comments-header h3 {
        font-size: 18px;
    }

    .comment-form {
        padding: 15px;
    }

    .comment-form textarea {
        font-size: 13px;
    }

    .comment-form-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .btn-submit-comment {
        width: 100%;
    }

    .comment-item {
        padding: 15px;
    }

    .comment-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }

    .comment-body p {
        font-size: 13px;
    }
}

/* =================================================================
   Related Loops Section Styles
   ================================================================= */

.related-loops-section {
    margin-top: 40px;
    padding: 30px;
    background-color: #f9f9f9;
    border-radius: 12px;
    border: 1px solid #e0e0e0;
}

.related-loops-header {
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e0e0e0;
}

.related-loops-header h3 {
    font-size: 20px;
    color: #333;
    margin: 0 0 8px 0;
}

.related-loops-header .subtitle {
    margin: 0;
    color: #666;
    font-size: 14px;
    font-style: italic;
}

/* Loading/Error States */
.related-loops-loading,
.related-loops-error {
    padding: 30px;
    text-align: center;
    color: #666;
    background-color: white;
    border-radius: 8px;
    border: 1px dashed #ccc;
}

.related-loops-error {
    background-color: #ffebee;
    border-color: #ef5350;
    color: #c62828;
}

/* Related Loops Grid */
.related-loops-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

/* Related Loop Card */
.related-loop-card {
    background-color: white;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    display: block;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.related-loop-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    border-color: #2196F3;
}

.related-loop-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.related-loop-title-link {
    text-decoration: none;
    color: inherit;
}

.related-loop-title-link:hover .related-loop-title {
    color: #3498db;
}

.related-loop-username {
    font-size: 12px;
    color: #666;
    margin: 0 0 8px 0;
}

/* Thumbnail */
.related-loop-thumbnail {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background-color: #000;
}

.related-loop-thumbnail .thumbnail-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s;
}

.related-loop-card:hover .thumbnail-image {
    transform: scale(1.05);
}

/* Thumbnail Overlay */
.related-loop-thumbnail .thumbnail-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0);
    transition: background 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.related-loop-card:hover .thumbnail-overlay {
    background: rgba(0, 0, 0, 0.4);
}

.related-loop-thumbnail .play-icon {
    font-size: 40px;
    color: white;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.3s;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.related-loop-card:hover .play-icon {
    opacity: 1;
    transform: scale(1);
}

/* Duration Badge */
.related-loop-thumbnail .loop-duration-badge {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background-color: rgba(0, 0, 0, 0.85);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    font-family: 'Courier New', monospace;
    z-index: 1;
}

/* Loop Info */
.related-loop-info {
    padding: 16px;
}

.related-loop-title {
    margin: 0 0 8px 0;
    color: #333;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

.related-loop-meta {
    margin: 0 0 10px 0;
    color: #666;
    font-size: 13px;
    font-family: 'Courier New', monospace;
}

/* Tags */
.related-loop-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tag-mini {
    padding: 3px 8px;
    background-color: #f0f0f0;
    color: #555;
    border: 1px solid #ddd;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
}

.tag-mini.tag-clickable {
    cursor: pointer;
    transition: all 0.2s ease;
}

.tag-mini.tag-clickable:hover {
    background-color: #E65100;
    color: white;
    border-color: #E65100;
    transform: translateY(-1px);
}

.tag-more {
    background-color: #e3f2fd;
    color: #1976D2;
    border-color: #90caf9;
}

/* Mobile Responsiveness for Related Loops */
@media (max-width: 768px) {
    .related-loops-section {
        padding: 20px 15px;
        margin-top: 30px;
    }

    .related-loops-header h3 {
        font-size: 18px;
    }

    .related-loops-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 15px;
    }

    .related-loop-info {
        padding: 12px;
    }

    .related-loop-title {
        font-size: 14px;
    }

    .related-loop-meta {
        font-size: 12px;
    }
}

@media (max-width: 500px) {
    .related-loops-grid {
        grid-template-columns: 1fr;
    }

    .related-loop-thumbnail .play-icon {
        font-size: 32px;
    }
}

/* ===================================
   Footer Styles
   =================================== */

.app-footer {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    margin-top: 60px;
    padding: 30px 20px;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-left p {
    margin: 0;
    font-size: 14px;
    opacity: 0.9;
}

.footer-links {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}

.footer-link {
    color: white;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: opacity 0.2s ease;
    opacity: 0.9;
}

.footer-link:hover {
    opacity: 1;
    text-decoration: underline;
}

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

    .footer-links {
        justify-content: center;
    }
}

/* ===================================
   Legal Page Styles
   =================================== */

.legal-page {
    padding: 40px 20px;
    min-height: calc(100vh - 200px);
}

.legal-container {
    max-width: 900px;
    margin: 0 auto;
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.legal-container h1 {
    color: #333;
    font-size: 2.5em;
    margin-bottom: 10px;
    padding-bottom: 15px;
    border-bottom: 3px solid #667eea;
}

.legal-container .last-updated {
    color: #666;
    font-style: italic;
    margin-bottom: 30px;
    font-size: 0.9em;
}

.legal-container section {
    margin-bottom: 35px;
}

.legal-container h2 {
    color: #444;
    font-size: 1.8em;
    margin-top: 30px;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e0e0e0;
}

.legal-container h3 {
    color: #555;
    font-size: 1.3em;
    margin-top: 20px;
    margin-bottom: 12px;
}

.legal-container p {
    color: #555;
    line-height: 1.8;
    margin-bottom: 15px;
    text-align: justify;
}

.legal-container ul {
    margin: 15px 0;
    padding-left: 30px;
}

.legal-container li {
    color: #555;
    line-height: 1.8;
    margin-bottom: 10px;
}

.legal-container a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.legal-container a:hover {
    color: #764ba2;
    text-decoration: underline;
}

.legal-container strong {
    color: #333;
    font-weight: 600;
}

.section-divider {
    margin: 60px 0;
    border: none;
    border-top: 3px solid #667eea;
    opacity: 0.3;
}

/* Smooth scroll for anchor links */
html {
    scroll-behavior: smooth;
}

@media (max-width: 768px) {
    .legal-container {
        padding: 25px;
    }

    .legal-container h1 {
        font-size: 2em;
    }

    .legal-container h2 {
        font-size: 1.5em;
    }

    .legal-container h3 {
        font-size: 1.2em;
    }

    .legal-container p {
        text-align: left;
    }
}

@media (max-width: 480px) {
    .legal-page {
        padding: 20px 10px;
    }

    .legal-container {
        padding: 20px;
    }

    .legal-container h1 {
        font-size: 1.8em;
    }
}

/* ===================================
   Cookie Consent Banner Styles
   =================================== */

.cookie-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    padding: 25px 20px;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    animation: slideUp 0.4s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.cookie-consent-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
}

.cookie-consent-text {
    flex: 1;
}

.cookie-consent-text h3 {
    margin: 0 0 10px 0;
    font-size: 1.3em;
    color: white;
}

.cookie-consent-text p {
    margin: 0 0 8px 0;
    line-height: 1.6;
    font-size: 0.95em;
    opacity: 0.95;
}

.cookie-learn-more {
    margin-top: 8px !important;
}

.cookie-learn-more a {
    color: #3498db;
    text-decoration: underline;
    font-weight: 500;
    transition: color 0.2s ease;
}

.cookie-learn-more a:hover {
    color: #5dade2;
}

.cookie-consent-buttons {
    display: flex;
    gap: 15px;
    flex-shrink: 0;
}

.btn-cookie {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-cookie-essential {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.btn-cookie-essential:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.btn-cookie-accept {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-cookie-accept:hover {
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
    transform: translateY(-2px);
}

/* Mobile responsive */
@media (max-width: 768px) {
    .cookie-consent-content {
        flex-direction: column;
        text-align: center;
    }

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

    .btn-cookie {
        width: 100%;
        padding: 14px 20px;
    }
}

@media (max-width: 480px) {
    .cookie-consent-banner {
        padding: 20px 15px;
    }

    .cookie-consent-text h3 {
        font-size: 1.1em;
    }

    .cookie-consent-text p {
        font-size: 0.9em;
    }

    /* Loops grid - prevent horizontal scroll on small phones */
    .loops-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    /* Header and navigation */
    .header h1 {
        font-size: 1.5em;
    }

    .main-nav {
        flex-wrap: wrap;
        gap: 8px;
        padding: 10px 0;
    }

    .nav-link {
        font-size: 13px;
        padding: 6px 10px;
    }

    /* Search and filters */
    .search-box {
        flex-direction: column;
        gap: 10px;
    }

    .btn-search,
    .btn-clear {
        width: 100%;
    }

    /* Container */
    .container {
        padding: 15px;
    }

    /* User status */
    .user-status {
        font-size: 12px;
        padding: 6px 12px;
    }
}

/* Additional mobile improvements for tablets */
@media (max-width: 768px) {
    /* Loops grid - 2 columns on tablet, 1 on phone */
    .loops-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 20px;
    }

    /* Header */
    .header h1 {
        font-size: 1.8em;
    }

    /* Search section */
    .search-filter-section {
        padding: 20px 15px;
    }

    .category-filter {
        margin-top: 15px;
    }
}

/* Very small devices (< 375px like iPhone SE) */
@media (max-width: 375px) {
    .container {
        padding: 10px;
    }

    h1 {
        font-size: 1.3em;
    }

    .loops-grid {
        gap: 12px;
    }

    .loop-card-header h3 {
        font-size: 0.9em;
    }

    .category-chips {
        flex-wrap: wrap;
        gap: 6px;
    }

    .category-chip {
        font-size: 12px;
        padding: 6px 12px;
    }
}

/* ============================================================================
   YOUTUBE SEARCH DROPDOWN STYLES
   ============================================================================ */

/* Video Input Wrapper */
.video-input-wrapper {
    position: relative;
    width: 100%;
}

/* Search Dropdown Container */
.search-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 2px solid #2196F3;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    max-height: 500px;
    overflow: hidden;
    z-index: 1000;
    margin-top: 8px;
}

/* Search Dropdown Header */
.search-dropdown-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: linear-gradient(135deg, #f5f7fa 0%, #e8eef5 100%);
    border-bottom: 1px solid #e0e0e0;
    font-size: 14px;
    font-weight: 600;
    color: #555;
}

.close-dropdown {
    background: none;
    border: none;
    font-size: 18px;
    color: #999;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
    transition: color 0.2s;
}

.close-dropdown:hover {
    color: #e74c3c;
}

/* Search Results List */
.search-results-list {
    max-height: 420px;
    overflow-y: auto;
    padding: 8px;
}

/* Individual Search Result Item */
.search-result-item {
    display: flex;
    gap: 12px;
    padding: 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.search-result-item:hover {
    background: linear-gradient(135deg, #f0f7ff 0%, #e6f2ff 100%);
    border-color: #2196F3;
    transform: translateX(4px);
}

/* Result Thumbnail */
.result-thumbnail {
    width: 120px;
    height: 90px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
    border: 1px solid #e0e0e0;
}

/* Result Info */
.result-info {
    flex: 1;
    min-width: 0;
}

.result-title {
    margin: 0 0 6px 0;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.4;
}

.result-channel {
    margin: 0 0 6px 0;
    font-size: 12px;
    color: #666;
    font-weight: 500;
}

.result-description {
    margin: 0;
    font-size: 12px;
    color: #888;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.4;
}

/* Search Error Message */
.search-error {
    position: relative;
    margin-top: 12px;
    padding: 12px 40px 12px 16px;
    background: linear-gradient(135deg, #fff3cd 0%, #ffe8a1 100%);
    border: 1px solid #ffc107;
    border-radius: 6px;
    color: #856404;
    font-size: 14px;
}

.search-error p {
    margin: 0;
}

.close-error {
    position: absolute;
    top: 8px;
    right: 12px;
    background: none;
    border: none;
    font-size: 18px;
    color: #856404;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
    transition: color 0.2s;
}

.close-error:hover {
    color: #533f03;
}

/* Loading Button State */
.load-button:disabled {
    background: #ccc;
    cursor: not-allowed;
    opacity: 0.6;
}

/* Scrollbar Styling for Search Results */
.search-results-list::-webkit-scrollbar {
    width: 8px;
}

.search-results-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.search-results-list::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.search-results-list::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Mobile Responsive Styles for Search Dropdown */
@media (max-width: 768px) {
    .search-dropdown {
        max-height: 400px;
    }

    .search-results-list {
        max-height: 320px;
    }

    .search-result-item {
        flex-direction: column;
        gap: 8px;
    }

    .result-thumbnail {
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 9;
    }

    .result-title {
        font-size: 13px;
    }

    .result-channel,
    .result-description {
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .search-dropdown-header {
        padding: 10px 12px;
        font-size: 12px;
    }

    .search-result-item {
        padding: 10px;
    }
}

/* ============================================================================
   GOOGLE OAUTH LOGIN STYLES
   ============================================================================ */

/* OAuth Divider */
.oauth-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 20px 0;
    color: #999;
    font-size: 14px;
}

.oauth-divider::before,
.oauth-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #e0e0e0;
}

.oauth-divider span {
    padding: 0 15px;
    font-weight: 500;
}

/* Google Login Button */
.btn-google {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 12px 20px;
    background: white;
    color: #444;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-google:hover {
    background: #f8f8f8;
    border-color: #ccc;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.btn-google:active {
    background: #f0f0f0;
    transform: translateY(1px);
}

.btn-google:disabled {
    background: #f5f5f5;
    color: #999;
    cursor: not-allowed;
    box-shadow: none;
}

.google-icon {
    flex-shrink: 0;
}

/* Mobile Responsive */
@media (max-width: 480px) {
    .oauth-divider {
        margin: 15px 0;
    }

    .btn-google {
        font-size: 14px;
        padding: 10px 16px;
    }
}

/* ============================================================================
   USER SETTINGS MODAL STYLES
   ============================================================================ */

/* Settings Modal Specific Styles */
.settings-modal {
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
}

.settings-content {
    padding: 20px;
}

/* User Info Section */
.user-info-section {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: linear-gradient(135deg, #f5f7fa 0%, #e8eef5 100%);
    border-radius: 8px;
    margin-bottom: 24px;
}

.user-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid #2196F3;
    flex-shrink: 0;
}

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

.user-avatar-placeholder {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: bold;
    flex-shrink: 0;
}

.user-details {
    flex: 1;
    min-width: 0;
}

.current-username {
    margin: 0 0 4px 0;
    font-size: 20px;
    font-weight: 600;
    color: #333;
}

.current-email {
    margin: 0 0 4px 0;
    font-size: 14px;
    color: #666;
}

.auth-provider {
    margin: 0;
    font-size: 12px;
    color: #666;
    display: flex;
    align-items: center;
    gap: 6px;
}

.google-icon-small {
    flex-shrink: 0;
}

/* Settings Forms */
.settings-form {
    margin-bottom: 32px;
}

.settings-form h3 {
    margin: 0 0 8px 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.form-help-text {
    margin: 0 0 16px 0;
    font-size: 14px;
    color: #666;
    line-height: 1.5;
}

.settings-divider {
    height: 1px;
    background: #e0e0e0;
    margin: 32px 0;
}

/* User Settings Button in Header */
.user-settings-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 20px;
    color: #333;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    margin-right: 12px;
}

.user-settings-btn:hover {
    background: #f5f5f5;
    border-color: #2196F3;
    transform: translateY(-1px);
}

.user-avatar-small {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid #2196F3;
    flex-shrink: 0;
}

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

/* Success and Error Messages in Settings */
.settings-content .success-message {
    padding: 12px 16px;
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
    border: 1px solid #c3e6cb;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 14px;
}

.settings-content .error-message {
    padding: 12px 16px;
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 14px;
}

/* Scrollbar for Settings Modal */
.settings-modal::-webkit-scrollbar {
    width: 8px;
}

.settings-modal::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.settings-modal::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.settings-modal::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Mobile Responsive for Settings */
@media (max-width: 768px) {
    .settings-modal {
        max-width: 95%;
        max-height: 95vh;
    }

    .user-info-section {
        flex-direction: column;
        text-align: center;
    }

    .user-avatar,
    .user-avatar-placeholder {
        width: 80px;
        height: 80px;
    }

    .user-avatar-placeholder {
        font-size: 36px;
    }

    .current-username {
        font-size: 18px;
    }

    .settings-form h3 {
        font-size: 16px;
    }

    .user-settings-btn {
        padding: 6px 12px;
        font-size: 13px;
    }

    .user-avatar-small {
        width: 20px;
        height: 20px;
    }
}

@media (max-width: 480px) {
    .settings-content {
        padding: 16px;
    }

    .user-info-section {
        padding: 16px;
    }

    .settings-form {
        margin-bottom: 24px;
    }

    .user-settings-btn .user-text {
        display: none;
    }

    .user-settings-btn {
        padding: 8px;
        border-radius: 50%;
        margin-right: 8px;
    }
}

/* Username Locked Info */
.username-locked-info {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 16px;
    background: linear-gradient(135deg, #fff9e6 0%, #fff3cd 100%);
    border: 1px solid #ffc107;
    border-radius: 6px;
    color: #856404;
    font-size: 14px;
    line-height: 1.5;
}

.lock-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.username-locked-info strong {
    color: #533f03;
    font-weight: 600;
}
