/**
 * WhatsApp-like P2P Chat Interface Styles
 * Modern, responsive design with file transfer support
 */

/* Chat Container */
.chat-container {
    display: flex;
    height: 100vh;
    background: #f0f0f0;
    font-family: 'Inter', sans-serif;
}

/* Sidebar */
.chat-sidebar {
    width: 350px;
    background: #ffffff;
    border-right: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column;
}

.chat-sidebar-header {
    padding: 20px;
    background: #007A4D;
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chat-sidebar-header h2 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
}

.connection-status {
    font-size: 0.8rem;
    opacity: 0.9;
}

.connection-status.connected::before {
    content: "🟢 ";
}

.connection-status.disconnected::before {
    content: "🔴 ";
}

/* User Search */
.user-search-container {
    padding: 15px;
    border-bottom: 1px solid #e0e0e0;
    position: relative;
}

.user-search {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #e0e0e0;
    border-radius: 25px;
    background: #f8f9fa;
    font-size: 14px;
}

.user-search:focus {
    outline: none;
    border-color: #007A4D;
    box-shadow: 0 0 0 2px rgba(0, 122, 77, 0.1);
}

.user-search-results {
    position: absolute;
    top: 100%;
    left: 15px;
    right: 15px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    max-height: 300px;
    overflow-y: auto;
    display: none;
}

.user-result {
    padding: 12px 15px;
    display: flex;
    align-items: center;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
}

.user-result:last-child {
    border-bottom: none;
}

.user-result:hover {
    background: #f8f9fa;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 12px;
    object-fit: cover;
}

.user-info {
    flex: 1;
}

.user-name {
    font-weight: 500;
    margin-bottom: 2px;
}

.user-username {
    font-size: 0.85rem;
    color: #666;
}

.invite-btn {
    background: #007A4D;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.invite-btn:hover {
    background: #005a37;
    transform: translateY(-1px);
}

/* Chat List */
.chat-list {
    flex: 1;
    overflow-y: auto;
    background: white;
}

.chat-item {
    padding: 15px 20px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
}

.chat-item:hover {
    background: #f8f9fa;
}

.chat-item.active {
    background: #e8f5e8;
    border-right: 3px solid #007A4D;
}

.chat-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    margin-right: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.chat-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.group-avatar {
    background: #007A4D;
    color: white;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.chat-info {
    flex: 1;
    min-width: 0;
}

.chat-name {
    font-weight: 600;
    margin-bottom: 4px;
    color: #1a1a2e;
}

.chat-last-message {
    color: #666;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-meta {
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.chat-time {
    color: #666;
    font-size: 0.8rem;
    margin-bottom: 4px;
}

.unread-badge {
    background: #007A4D;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

/* Main Chat Area */
.chat-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #e5ddd5;
}

.chat-header {
    background: white;
    padding: 15px 20px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chat-header-info h3 {
    margin: 0 0 4px 0;
    color: #1a1a2e;
}

.participant-count {
    font-size: 0.8rem;
    color: #666;
}

.chat-header-actions button {
    background: none;
    border: none;
    padding: 8px;
    border-radius: 50%;
    cursor: pointer;
    color: #666;
    transition: all 0.3s ease;
}

.chat-header-actions button:hover {
    background: #f0f0f0;
    color: #007A4D;
}

/* Messages Container */
.messages-container {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.message {
    display: flex;
    max-width: 70%;
    margin-bottom: 8px;
}

.message.sent {
    align-self: flex-end;
}

.message.received {
    align-self: flex-start;
}

.message-content {
    background: white;
    border-radius: 12px;
    padding: 8px 12px;
    position: relative;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.message.sent .message-content {
    background: #dcf8c6;
}

.text-message {
    color: #1a1a2e;
    line-height: 1.4;
    word-wrap: break-word;
}

.text-message a {
    color: #007A4D;
    text-decoration: none;
}

.text-message a:hover {
    text-decoration: underline;
}

.system-message {
    color: #666;
    font-style: italic;
    text-align: center;
    font-size: 0.9rem;
}

.message-meta {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-top: 4px;
    font-size: 0.7rem;
    color: #666;
    gap: 4px;
}

.message-time {
    opacity: 0.8;
}

.message-status i {
    font-size: 0.8rem;
}

.message-status.read i {
    color: #007A4D;
}

/* File Messages */
.file-message {
    display: flex;
    align-items: center;
    padding: 12px;
    background: white;
    border-radius: 12px;
    border: 1px solid #e0e0e0;
    gap: 12px;
    min-width: 250px;
}

.file-icon {
    width: 40px;
    height: 40px;
    background: #007A4D;
    color: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.file-info {
    flex: 1;
    min-width: 0;
}

.file-name {
    font-weight: 500;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-size {
    font-size: 0.8rem;
    color: #666;
}

.file-progress {
    margin-top: 8px;
}

.progress-bar {
    background: #f0f0f0;
    border-radius: 4px;
    height: 4px;
    overflow: hidden;
}

.progress-fill {
    background: #007A4D;
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s ease;
}

.download-btn {
    background: #007A4D;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.download-btn:hover {
    background: #005a37;
    transform: translateY(-1px);
}

/* Image Messages */
.image-message {
    max-width: 300px;
}

.message-image {
    width: 100%;
    height: auto;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.message-image:hover {
    transform: scale(1.02);
}

.image-placeholder {
    width: 200px;
    height: 150px;
    background: #f0f0f0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-size: 48px;
}

/* Typing Indicator */
.typing-indicator {
    align-self: flex-start;
    max-width: 70%;
    margin-bottom: 8px;
    display: none;
}

.typing-content {
    background: white;
    border-radius: 12px;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.typing-dots {
    display: flex;
    gap: 2px;
}

.typing-dots span {
    width: 6px;
    height: 6px;
    background: #007A4D;
    border-radius: 50%;
    animation: typing-bounce 1.4s infinite ease-in-out;
}

.typing-dots span:nth-child(1) { animation-delay: -0.32s; }
.typing-dots span:nth-child(2) { animation-delay: -0.16s; }

.typing-text {
    color: #666;
    font-size: 0.8rem;
    font-style: italic;
}

@keyframes typing-bounce {
    0%, 80%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Message Input */
.message-input-container {
    background: white;
    padding: 15px 20px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    align-items: flex-end;
    gap: 10px;
}

.message-input {
    flex: 1;
    min-height: 40px;
    max-height: 120px;
    padding: 10px 15px;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    resize: none;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.4;
}

.message-input:focus {
    outline: none;
    border-color: #007A4D;
    box-shadow: 0 0 0 2px rgba(0, 122, 77, 0.1);
}

.input-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.file-button,
.send-button {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.file-button {
    background: #f0f0f0;
    color: #666;
}

.file-button:hover {
    background: #e0e0e0;
    color: #007A4D;
}

.send-button {
    background: #007A4D;
    color: white;
}

.send-button:hover {
    background: #005a37;
    transform: scale(1.1);
}

/* Registration Modal */
.registration-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 450px;
}

.modal-content h3 {
    margin: 0 0 20px 0;
    text-align: center;
    color: #1a1a2e;
}

.modal-content form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.modal-content input {
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.modal-content input:focus {
    outline: none;
    border-color: #007A4D;
    box-shadow: 0 0 0 2px rgba(0, 122, 77, 0.1);
}

.input-feedback {
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 0;
}

.input-feedback.success {
    color: #28a745;
}

.input-feedback.error {
    color: #dc3545;
}

.input-feedback i {
    font-size: 0.9rem;
}

.username-suggestions {
    margin-top: 8px;
}

.suggestions-header {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 8px;
    font-weight: 500;
}

.suggestions-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.suggestion-btn {
    background: #f8f9fa;
    border: 1px solid #007A4D;
    color: #007A4D;
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.suggestion-btn:hover {
    background: #007A4D;
    color: white;
    transform: translateY(-1px);
}

.modal-content button[type="submit"] {
    padding: 12px 20px;
    background: #007A4D;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.modal-content button[type="submit"]:hover:not(:disabled) {
    background: #005a37;
    transform: translateY(-1px);
}

.modal-content button[type="submit"]:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

/* Notifications */
.notification, .chat-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 20px;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    z-index: 10000;
    animation: slideIn 0.3s ease;
    transform: translateX(100%);
    opacity: 0;
    transition: all 0.3s ease;
}

.chat-notification.show {
    transform: translateX(0);
    opacity: 1;
}

.notification.info, .chat-notification.info {
    background: #007A4D;
}

.notification.error, .chat-notification.error {
    background: #dc3545;
}

.notification.success, .chat-notification.success {
    background: #28a745;
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 8px;
}

.notification-content i {
    font-size: 1.1rem;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .chat-container {
        flex-direction: column;
        height: 100vh;
    }
    
    .chat-sidebar {
        width: 100%;
        height: 40vh;
    }
    
    .chat-main {
        height: 60vh;
    }
    
    .message {
        max-width: 85%;
    }
    
    .file-message {
        min-width: auto;
        width: 100%;
    }
}

@media (max-width: 480px) {
    .chat-sidebar-header,
    .message-input-container {
        padding: 10px 15px;
    }
    
    .chat-item {
        padding: 12px 15px;
    }
    
    .messages-container {
        padding: 15px;
    }
    
    .message-input {
        font-size: 16px; /* Prevents zoom on iOS */
    }
}

/* Dark Theme Support */
@media (prefers-color-scheme: dark) {
    .chat-sidebar,
    .chat-main,
    .message-content {
        background: #1a1a2e;
        color: #e0e0e0;
    }
    
    .chat-header {
        background: #16213e;
        border-bottom-color: #333;
    }
    
    .messages-container {
        background: #0f1419;
    }
    
    .message.sent .message-content {
        background: #005a37;
    }
    
    .message.received .message-content {
        background: #2a2a40;
    }
}

/* Mode Change Notification */
.mode-change-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #007A4D;
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    animation: slideIn 0.3s ease-out;
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.notification-content i {
    font-size: 1.1rem;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Mode Badge in Chat Header */
.mode-badge {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 500;
    margin-left: 8px;
}

.mode-badge.mode-high-global {
    background: #28a745;
}

.mode-badge.mode-low-global {
    background: #ffc107;
    color: #000;
}

.mode-badge.mode-lan-high,
.mode-badge.mode-lan-low {
    background: #17a2b8;
}

.mode-badge.mode-offline {
    background: #6c757d;
}

/* Invitation Dialog Styles */
.invite-dialog {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    animation: fadeIn 0.3s ease;
}

.invite-dialog-content {
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
}

.invite-dialog-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #eee;
}

.invite-dialog-header h3 {
    margin: 0;
    color: #1a1a2e;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.invite-dialog-header .close-btn {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: #666;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.invite-dialog-header .close-btn:hover {
    background: #f5f5f5;
    color: #333;
}

.invite-dialog-body {
    padding: 24px;
}

.invite-form {
    display: flex;
    gap: 10px;
    margin: 15px 0;
}

.invite-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.invite-input:focus {
    outline: none;
    border-color: #007A4D;
}

.send-invite-btn {
    background: #007A4D;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.3s ease;
}

.send-invite-btn:hover {
    background: #005a3a;
}

.invite-link-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.invite-link-section label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.invite-link-container {
    display: flex;
    gap: 10px;
}

.invite-link-container input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #f8f9fa;
    font-family: monospace;
    font-size: 0.9rem;
}

.copy-link-btn {
    background: #6c757d;
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.copy-link-btn:hover {
    background: #5a6268;
}

.no-results {
    padding: 30px 20px;
    text-align: center;
    color: #666;
}

.no-results-content i {
    font-size: 48px;
    color: #007A4D;
    margin-bottom: 15px;
}

.no-results-content p {
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.invite-options {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.invite-email-btn, .invite-whatsapp-btn {
    background: #007A4D;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.invite-whatsapp-btn {
    background: #25D366;
}

.invite-email-btn:hover {
    background: #005a3a;
    transform: translateY(-2px);
}

.invite-whatsapp-btn:hover {
    background: #1da851;
    transform: translateY(-2px);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { 
        opacity: 0;
        transform: translateY(30px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

/* Fallback Dialog Styles */
.fallback-dialog .invite-dialog-content {
    max-width: 600px;
}

.fallback-message {
    background: #e3f2fd;
    border: 1px solid #2196f3;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.fallback-message i {
    color: #2196f3;
    font-size: 1.2rem;
    margin-top: 2px;
}

.fallback-message p {
    margin: 0;
    color: #1565c0;
}

.fallback-link-container {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.fallback-link-container input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #007A4D;
    border-radius: 8px;
    background: #f8f9fa;
    font-family: monospace;
    font-size: 0.9rem;
    font-weight: 600;
}

.copy-fallback-btn {
    background: #007A4D;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.3s ease;
    white-space: nowrap;
}

.copy-fallback-btn:hover {
    background: #005a3a;
}

.fallback-instructions {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.fallback-instructions p {
    margin: 0 0 10px 0;
    font-weight: 600;
    color: #333;
}

.fallback-instructions ol {
    margin: 10px 0 0 0;
    padding-left: 20px;
}

.fallback-instructions li {
    margin-bottom: 8px;
    line-height: 1.4;
}

.fallback-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.retry-btn, .done-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.retry-btn {
    background: #ffc107;
    color: #000;
}

.retry-btn:hover {
    background: #e0a800;
    transform: translateY(-2px);
}

.done-btn {
    background: #28a745;
    color: white;
}

.done-btn:hover {
    background: #218838;
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    .invite-form {
        flex-direction: column;
    }
    
    .invite-options {
        flex-direction: column;
        align-items: center;
    }
    
    .invite-email-btn, .invite-whatsapp-btn {
        width: 200px;
        justify-content: center;
    }
}

/* Authentication Modal Styles */
.auth-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

.auth-modal-content {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
}

.auth-header {
    text-align: center;
    padding: 30px 30px 20px;
    border-bottom: 1px solid #eee;
}

.auth-header h2 {
    margin: 0 0 10px 0;
    color: #1a1a2e;
    font-size: 1.8rem;
}

.auth-header p {
    margin: 0;
    color: #666;
    font-size: 1rem;
}

/* Welcome Benefits */
.welcome-benefits {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    padding: 20px 30px;
    background: rgba(0, 122, 77, 0.05);
    border-bottom: 1px solid #eee;
}

.benefit-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #007A4D;
    font-size: 0.9rem;
    font-weight: 500;
}

.benefit-item i {
    width: 16px;
    text-align: center;
}

/* Quick Start Styles */
.quick-description, .register-description {
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 20px;
    text-align: center;
}

.quick-note {
    margin-top: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.85rem;
    color: #666;
    line-height: 1.4;
}

.quick-note i {
    color: #007A4D;
    margin-top: 2px;
}

#quick-start-btn {
    background: linear-gradient(135deg, #007A4D, #28a745);
    font-size: 1.1rem;
    padding: 16px 20px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 122, 77, 0.3);
    transition: all 0.3s ease;
}

#quick-start-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #005a37, #218838);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 122, 77, 0.4);
}

/* Optional Section Styles */
.optional-section {
    margin-top: 20px;
    padding: 20px;
    background: rgba(0, 122, 77, 0.02);
    border: 1px dashed #007A4D;
    border-radius: 8px;
}

.optional-section h4 {
    margin: 0 0 8px 0;
    color: #007A4D;
    font-size: 1rem;
}

.optional-note {
    margin: 0 0 15px 0;
    color: #666;
    font-size: 0.85rem;
    font-style: italic;
}

/* Make register button more appealing */
#register-btn {
    background: linear-gradient(135deg, #007A4D, #28a745);
    font-size: 1.1rem;
    padding: 16px 20px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 122, 77, 0.3);
}

#register-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #005a37, #218838);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 122, 77, 0.4);
}

/* Setup Note */
.setup-note {
    margin-top: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.85rem;
    color: #666;
    line-height: 1.4;
    text-align: center;
    justify-content: center;
}

.setup-note i {
    color: #007A4D;
    margin-top: 2px;
}

.auth-tabs {
    display: flex;
    border-bottom: 1px solid #eee;
}

.auth-tab {
    flex: 1;
    padding: 15px 20px;
    background: none;
    border: none;
    cursor: pointer;
    font-weight: 600;
    color: #666;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
}

.auth-tab.active {
    color: #007A4D;
    border-bottom-color: #007A4D;
    background: rgba(0, 122, 77, 0.05);
}

.auth-content {
    padding: 30px;
}

.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
}

.auth-form h3 {
    margin: 0 0 20px 0;
    color: #1a1a2e;
    font-size: 1.3rem;
}

.input-group {
    margin-bottom: 20px;
}

.auth-form input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.auth-form input:focus {
    outline: none;
    border-color: #007A4D;
    box-shadow: 0 0 0 3px rgba(0, 122, 77, 0.1);
}

.input-feedback {
    margin-top: 8px;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.input-feedback.success {
    color: #28a745;
}

.input-feedback.error {
    color: #dc3545;
}

.auth-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: #666;
    cursor: pointer;
}

.link-btn {
    background: none;
    border: none;
    color: #007A4D;
    cursor: pointer;
    font-size: 0.9rem;
    text-decoration: underline;
}

.link-btn:hover {
    color: #005a3a;
}

.auth-form button[type="submit"] {
    width: 100%;
    padding: 14px 20px;
    background: #007A4D;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.auth-form button[type="submit"]:hover:not(:disabled) {
    background: #005a37;
    transform: translateY(-2px);
}

.auth-form button[type="submit"]:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.auth-footer {
    padding: 20px 30px;
    border-top: 1px solid #eee;
    text-align: center;
}

.security-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #666;
    font-size: 0.9rem;
}

.security-info i {
    color: #007A4D;
}

/* MFA Styles */
.mfa-header {
    text-align: center;
    padding: 30px 30px 20px;
    border-bottom: 1px solid #eee;
}

.mfa-header i {
    font-size: 3rem;
    color: #007A4D;
    margin-bottom: 15px;
}

.mfa-content {
    padding: 30px;
}

.mfa-info {
    text-align: center;
    margin-bottom: 30px;
    color: #666;
}

.mfa-code-input {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 30px;
}

.mfa-digit {
    width: 50px;
    height: 50px;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 600;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    transition: border-color 0.3s ease;
}

.mfa-digit:focus {
    outline: none;
    border-color: #007A4D;
    box-shadow: 0 0 0 3px rgba(0, 122, 77, 0.1);
}

.mfa-actions {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
}

.mfa-actions button[type="submit"] {
    width: 200px;
    padding: 12px 20px;
    background: #007A4D;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mfa-help {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    color: #666;
}

/* Account Setup Styles */
.setup-header {
    text-align: center;
    padding: 30px 30px 20px;
    border-bottom: 1px solid #eee;
}

.setup-header i {
    font-size: 3rem;
    color: #007A4D;
    margin-bottom: 15px;
}

.setup-content {
    padding: 30px;
}

.setup-options {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 30px;
}

.setup-option {
    display: flex;
    align-items: center;
    padding: 20px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.setup-option:hover {
    border-color: #007A4D;
    background: rgba(0, 122, 77, 0.02);
}

.option-icon {
    width: 60px;
    height: 60px;
    background: #007A4D;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-right: 20px;
}

.option-info {
    flex: 1;
}

.option-info h3 {
    margin: 0 0 8px 0;
    color: #1a1a2e;
}

.option-info p {
    margin: 0;
    color: #666;
    font-size: 0.9rem;
}

.setup-btn {
    background: #007A4D;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.setup-btn:hover {
    background: #005a37;
    transform: translateY(-2px);
}

.setup-actions {
    display: flex;
    justify-content: space-between;
    gap: 15px;
}

.skip-btn, .complete-btn {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.skip-btn {
    background: linear-gradient(135deg, #007A4D, #28a745);
    color: white;
    border: none;
    font-size: 1.1rem;
}

.skip-btn:hover {
    background: linear-gradient(135deg, #005a37, #218838);
    transform: translateY(-2px);
}

.complete-btn {
    background: #f8f9fa;
    color: #007A4D;
    border: 2px solid #007A4D;
}

.complete-btn:hover {
    background: #007A4D;
    color: white;
}

/* MFA Setup Styles */
.mfa-setup-header {
    display: flex;
    align-items: center;
    padding: 20px 30px;
    border-bottom: 1px solid #eee;
}

.back-btn {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    margin-right: 15px;
    transition: all 0.3s ease;
}

.back-btn:hover {
    background: #f0f0f0;
    color: #007A4D;
}

.mfa-methods {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 30px;
}

.mfa-method {
    display: flex;
    align-items: center;
    padding: 20px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mfa-method:hover {
    border-color: #007A4D;
    background: rgba(0, 122, 77, 0.02);
}

.mfa-method.selected {
    border-color: #007A4D;
    background: rgba(0, 122, 77, 0.05);
}

.method-icon {
    width: 50px;
    height: 50px;
    background: #f8f9fa;
    color: #007A4D;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    margin-right: 15px;
}

.method-info {
    flex: 1;
}

.method-info h3 {
    margin: 0 0 5px 0;
    color: #1a1a2e;
}

.method-info p {
    margin: 0;
    color: #666;
    font-size: 0.9rem;
}

.method-status {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #007A4D;
    font-size: 0.8rem;
    font-weight: 600;
}

.qr-setup {
    display: flex;
    gap: 30px;
    margin-bottom: 20px;
}

.qr-code {
    width: 200px;
    height: 200px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qr-placeholder {
    text-align: center;
    color: #666;
}

.qr-placeholder i {
    font-size: 3rem;
    margin-bottom: 10px;
}

.setup-instructions {
    flex: 1;
}

.setup-instructions h4 {
    margin: 0 0 15px 0;
    color: #1a1a2e;
}

.setup-instructions ol {
    margin: 0;
    padding-left: 20px;
}

.setup-instructions li {
    margin-bottom: 8px;
    color: #666;
}

/* Recovery Styles */
.recovery-methods {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.recovery-method {
    padding: 30px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.recovery-method:hover {
    border-color: #007A4D;
    background: rgba(0, 122, 77, 0.02);
    transform: translateY(-2px);
}

.recovery-method i {
    font-size: 2.5rem;
    color: #007A4D;
    margin-bottom: 15px;
}

.recovery-method h3 {
    margin: 0 0 10px 0;
    color: #1a1a2e;
}

.recovery-method p {
    margin: 0;
    color: #666;
    font-size: 0.9rem;
}

.backup-codes {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-top: 15px;
}

.codes-header h4 {
    margin: 0 0 10px 0;
    color: #1a1a2e;
}

.codes-header p {
    margin: 0 0 20px 0;
    color: #666;
    font-size: 0.9rem;
}

.codes-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 20px;
}

.backup-code {
    background: white;
    padding: 10px;
    border-radius: 6px;
    font-family: monospace;
    font-weight: 600;
    text-align: center;
    border: 1px solid #e0e0e0;
}

.codes-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.download-codes-btn, .print-codes-btn {
    background: #007A4D;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
}

.download-codes-btn:hover, .print-codes-btn:hover {
    background: #005a37;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .auth-modal-content {
        width: 95%;
        margin: 10px;
    }
    
    .auth-content, .mfa-content, .setup-content {
        padding: 20px;
    }
    
    .mfa-code-input {
        gap: 5px;
    }
    
    .mfa-digit {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    
    .recovery-methods {
        grid-template-columns: 1fr;
    }
    
    .qr-setup {
        flex-direction: column;
        gap: 20px;
    }
    
    .qr-code {
        width: 100%;
        height: 200px;
    }
    
    .setup-actions {
        flex-direction: column;
    }
    
    .codes-list {
        grid-template-columns: 1fr;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}