/**
 * Dookaro Plus public styles - Clean version without image generation
 */

/* Reset any default margins/paddings that might affect viewport calculations */
* {
    box-sizing: border-box;
}

/* Ensure body and html take full viewport */
html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    overflow: hidden;
}

/* Chat container */
.dookaro-chat-container {
    width: 100vw;
    height: 100vh;
    height: 100dvh; /* Dynamic viewport height for mobile browsers */
    display: flex;
    background-color: #18191d;
    border-radius: 0;
    box-shadow: none;
    overflow: hidden;
    position: fixed;
    top: 0;
    left: 0;
    margin: 0;
    padding: 0;
}

/* Adjust for WordPress admin bar when present */
body.admin-bar .dookaro-chat-container {
    top: 32px;
    height: calc(100vh - 32px);
}

/* Mobile admin bar adjustment */
@media screen and (max-width: 782px) {
    body.admin-bar .dookaro-chat-container {
        top: 46px;
        height: calc(100vh - 46px);
        height: calc(100dvh - 46px);
    }
}

/* Sidebar */
.dookaro-sidebar {
    width: 280px;
    height: 100%;
    background-color: #1e1f23;
    border-right: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    min-width: 180px;
    max-width: 480px;
    flex-shrink: 0;
    z-index: 5;
    overflow: hidden;
}

/* Dynamic sidebar height adjustment for admin bar */
body.admin-bar .dookaro-sidebar {
    height: calc(100vh - 32px);
}

@media screen and (max-width: 782px) {
    body.admin-bar .dookaro-sidebar {
        height: calc(100vh - 46px);
        height: calc(100dvh - 46px);
    }
}

/* Sidebar resizer */
.dookaro-sidebar-resizer {
    width: 2px;
    cursor: col-resize;
    background-color: transparent;
    position: relative;
    z-index: 10;
    height: 100%;
    transition: background-color 0.2s;
    flex-shrink: 0;
}

.dookaro-sidebar-resizer:hover,
.dookaro-sidebar-resizer.resizing {
    background-color: rgba(26, 115, 232, 0.1);
}

.dookaro-sidebar-resizer::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 1px;
    height: 30px;
    background-color: #e0e0e0;
    border-radius: 1px;
    transition: background-color 0.2s;
}

.dookaro-sidebar-resizer:hover::after,
.dookaro-sidebar-resizer.resizing::after {
    background-color: #1a73e8;
}

body.resizing {
    cursor: col-resize !important;
    user-select: none;
    -webkit-user-select: none;
}

.dookaro-sidebar-header {
    padding: 16px;
    border-bottom: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    height: 56px; /* Exact height: 16px + 24px content + 16px */
    box-sizing: border-box;
    background-color: #1e1f23;
}

.dookaro-sidebar-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    line-height: 24px; /* Fixed line height */
    color: #ffffff;
}

.dookaro-chat-list {
    overflow-y: auto;
    flex: 1;
    min-height: 0;
    height: calc(100% - 60px); /* Subtract bottom menu height */
}

/* Back button for mobile view */
.dookaro-back-button {
    display: none;
    background: none;
    border: none;
    padding: 10px;
    cursor: pointer;
    color: #333;
    /* Mobile touch improvements */
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
}

.dookaro-back-button svg {
    width: 24px;
    height: 24px;
}

/* Chat items in sidebar */
.dookaro-chat-item {
    padding: 12px 16px;
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: color 0.3s ease;
    border-bottom: none;
    /* Mobile touch improvements */
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
    user-select: none;
    -webkit-user-select: none;
    color: #666666;
}

.dookaro-chat-item:hover {
    color: #ffffff;
}

.dookaro-chat-item.active {
    color: #ffffff;
}

/* Mobile specific touch feedback */
@media (max-width: 768px) {
    .dookaro-chat-item:active {
        background-color: #e0e0e0;
        transform: scale(0.98);
    }
    
    .dookaro-chat-item.active:active {
        background-color: #d1ebff;
    }
}

.dookaro-chat-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 0px;
    margin-left: 14px;
    flex-shrink: 0;
    background-color: #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dookaro-chat-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    border-radius: 50%;
    max-width: 100px;
    max-height: 100px;
}

.dookaro-avatar-placeholder {
    width: 100%;
    height: 100%;
    background-color: #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #999;
    font-size: 14px;
    font-weight: 600;
}

/* Admin page avatar styles */
.wp-list-table img {
    width: 40px !important;
    height: 40px !important;
    object-fit: cover !important;
    object-position: center !important;
    border-radius: 50% !important;
}

.dookaro-admin-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    display: inline-block;
    background-color: #e0e0e0;
}

.dookaro-admin-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    border-radius: 50%;
}

.dookaro-chat-info {
    flex: 1;
    min-width: 0;
}

.dookaro-chat-name {
    font-weight: 600;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: inherit;
}

.dookaro-chat-preview {
    font-size: 0.85em;
    color: inherit;
    opacity: 0.7;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Main chat area */
.dookaro-chat-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
    background-color: #18191d;
    position: relative;
    z-index: 1;
    overflow: hidden;
}

/* Dynamic chat-main height adjustment for admin bar */
body.admin-bar .dookaro-chat-main {
    height: calc(100vh - 32px);
}

@media screen and (max-width: 782px) {
    body.admin-bar .dookaro-chat-main {
        height: calc(100vh - 46px);
        height: calc(100dvh - 46px);
    }
}

/* Chat header */
.dookaro-chat-header {
    padding: 40px;
    border-bottom: none;
    display: flex;
    align-items: center;
    background-color: #18191d;
    flex-shrink: 0;
    height: 88px; /* Exact height: 40px + 8px content + 40px */
    box-sizing: border-box;
}

.dookaro-toggle-sidebar {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    margin-right: 10px;
    color: #ffffff;
    display: none;
    /* Mobile touch improvements */
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
}

@media (max-width: 768px) {
    .dookaro-toggle-sidebar {
        display: block;
    }
}

.dookaro-active-chat {
    display: flex;
    align-items: center;
    flex: 1;
}

.dookaro-active-info {
    flex: 1;
}

.dookaro-active-name {
    font-weight: 600;
    margin-bottom: 2px;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dookaro-online-indicator {
    width: 8px;
    height: 8px;
    background-color: #e2e071;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 0 2px #18191d, 0 0 0 3px #e2e071;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 2px #18191d, 0 0 0 3px #e2e071;
    }
    50% {
        box-shadow: 0 0 0 2px #18191d, 0 0 0 6px rgba(226, 224, 113, 0.3);
    }
    100% {
        box-shadow: 0 0 0 2px #18191d, 0 0 0 3px #e2e071;
    }
}

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

.dookaro-clear-chat {
    padding: 6px 12px;
    background-color: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9em;
    transition: background-color 0.2s;
    color: #ffffff;
}

.dookaro-clear-chat:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.dookaro-upgrade-subscription-button {
    padding: 8px 12px;
    background: linear-gradient(135deg, #e2e071, #d4d15a);
    border: none;
    border-radius: 20px;
    color: #2c2c2c;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 500;
    margin-left: 8px;
    box-shadow: 0 2px 8px rgba(226, 224, 113, 0.3);
}

.dookaro-upgrade-subscription-button:hover {
    background: linear-gradient(135deg, #f0ee7e, #e2e071);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(226, 224, 113, 0.5);
}

.dookaro-upgrade-subscription-button svg {
    width: 16px;
    height: 16px;
}

.dookaro-upgrade-text {
    white-space: nowrap;
}

@media (max-width: 768px) {
    .dookaro-upgrade-subscription-button {
        padding: 6px 10px;
        font-size: 11px;
        gap: 4px;
    }
    
    .dookaro-upgrade-subscription-button svg {
        width: 14px;
        height: 14px;
    }
}

.dookaro-character-info-button {
    background: none;
    border: none;
    color: #ffffff;
    padding: 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dookaro-character-info-button:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

.dookaro-character-info-button:active {
    transform: translateY(0);
    background-color: rgba(255, 255, 255, 0.2);
}

/* Messages area */
.dookaro-chat-messages {
    flex: 1;
    padding: 60px 60px 16px 60px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    min-height: 0;
    background-color: #18191d;
    position: relative;
}

/* Message styles */
.dookaro-message {
    display: flex;
    margin-bottom: 20px;
    max-width: 90%;
    animation: fadeIn 0.3s ease;
    position: relative;
}

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

.dookaro-user-message {
    align-self: flex-end;
    flex-direction: row-reverse;
    justify-content: flex-start;
}

.dookaro-ai-message {
    align-self: flex-start;
    flex-direction: row;
    justify-content: flex-start;
}

.dookaro-message-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 8px;
    background-color: #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Avatar positioning for different message types */
.dookaro-user-message .dookaro-message-avatar {
    order: 1;
    margin-right: 8px;
    margin-left: 0;
}

.dookaro-ai-message .dookaro-message-avatar {
    order: 1;
    margin-right: 0px;
    margin-left: 8px;
}

.dookaro-message-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    border-radius: 50%;
}

.dookaro-message-content {
    background-color: #ffffff;
    padding: 12px 16px;
    border-radius: 18px;
    box-shadow: none;
    border: none;
    position: relative;
    max-width: 100%;
    word-wrap: break-word;
}

/* Content positioning for different message types */
.dookaro-user-message .dookaro-message-content {
    order: 2;
}

.dookaro-ai-message .dookaro-message-content {
    order: 2;
}

.dookaro-user-message .dookaro-message-content {
    background-color: #1e1f23;
    margin-right: 8px;
    border-bottom-left-radius: 18px;
    border-top-left-radius: 2px;
    border-bottom-right-radius: 18px;
    color: #ffffff;
}

.dookaro-ai-message .dookaro-message-content {
    background-color: rgba(255, 255, 255, 0.08);
    margin-left: 8px;
    border-top-right-radius: 2px;
    border-bottom-right-radius: 18px;
    border-bottom-left-radius: 18px;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.dookaro-message-time {
    display: none;
}

/* Message image */
.dookaro-message-image {
    margin-bottom: 8px;
    position: relative;
}

.dookaro-message-image img {
    max-width: 100%;
    max-height: 300px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease;
}

.dookaro-message-image img:hover {
    transform: scale(1.02);
    cursor: pointer;
}

/* Input area */
.dookaro-chat-input {
    padding: 12px 16px;
    border-top: none;
    background-color: #18191d;
    flex-shrink: 0;
}

.dookaro-message-form {
    display: flex;
    flex-direction: column;
}

.dookaro-message-input-container {
    display: flex;
    align-items: center;
    border: none;
    border-radius: 0px;
    padding: 10px 12px;
    background-color: #1e1f23;
    gap: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Remove any focus outlines from input container */
.dookaro-message-input-container:focus-within {
    outline: none !important;
    border: none !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
}

.dookaro-message-input,
#dookaro-message-input {
    flex: 1;
    border: none !important;
    outline: none !important;
    background-color: transparent !important;
    background: transparent !important;
    padding: 0;
    max-height: 100px;
    min-height: 20px;
    height: 20px;
    resize: none;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.4;
    overflow-y: hidden;
    color: #ffffff;
    transition: height 0.2s ease;
    box-shadow: none !important;
}

.dookaro-message-input::placeholder,
#dookaro-message-input::placeholder {
    color: #cccccc;
}

.dookaro-message-input:focus,
#dookaro-message-input:focus {
    background-color: transparent !important;
    background: transparent !important;
    color: #ffffff !important;
    outline: none !important;
    border: none !important;
    box-shadow: none !important;
}

.dookaro-message-input:hover,
#dookaro-message-input:hover {
    background-color: transparent !important;
    background: transparent !important;
    color: #ffffff;
}

.dookaro-message-input:active,
#dookaro-message-input:active {
    background-color: transparent !important;
    background: transparent !important;
    color: #ffffff;
}

.dookaro-input-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

/* Send button (blue) */
.dookaro-send-button,
.dookaro-send-btn,
#dookaro-send-btn {
    cursor: pointer;
    color: #1e1f23;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.2s ease;
    background: #ececec;
    border: none;
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    /* Mobile touch improvements */
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    z-index: 10;
}

.dookaro-send-button:hover,
.dookaro-send-btn:hover,
#dookaro-send-btn:hover {
    background: #e0e0e0;
    transform: scale(1.05);
}

.dookaro-send-button:active,
.dookaro-send-btn:active,
#dookaro-send-btn:active {
    transform: scale(0.95);
}

/* Make sure send button is always clickable */
.dookaro-send-button:disabled,
.dookaro-send-btn:disabled,
#dookaro-send-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: auto;
}

/* Remove microphone button styles */
.dookaro-microphone-button {
    display: none;
}

.dookaro-emoji-button,
.dookaro-image-upload-label {
    cursor: pointer;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.2s ease;
    background: none;
    border: none;
    /* Mobile touch improvements */
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
}

.dookaro-emoji-button:hover,
.dookaro-image-upload-label:hover {
    background-color: #f0f2f5;
    color: #333;
}

/* Image preview */
.dookaro-image-preview-container {
    margin-bottom: 10px;
}

.dookaro-image-preview {
    position: relative;
    display: inline-block;
}

.dookaro-image-preview img {
    max-width: 200px;
    max-height: 200px;
    border-radius: 8px;
}

.dookaro-remove-image {
    position: absolute;
    top: -10px;
    right: -10px;
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    font-size: 16px;
    line-height: 22px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Modern Loading Animations */
.dookaro-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* Modern minimal circular loading */
.dookaro-loading-circle {
    width: 28px;
    height: 28px;
    border: 2px solid rgba(218, 216, 100, 0.2);
    border-top: 2px solid #dad864;
    border-radius: 50%;
    animation: dookaro-spin 1s linear infinite;
    margin: 12px auto;
}

@keyframes dookaro-spin {
    0% { 
        transform: rotate(0deg); 
    }
    100% { 
        transform: rotate(360deg); 
    }
}

/* Chat Loading State */
.dookaro-chat-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 16px;
    margin: 16px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.dookaro-chat-loading .dookaro-loading-circle {
    margin: 0 8px 0 0;
    width: 20px;
    height: 20px;
    border-width: 2px;
}

.dookaro-chat-loading-text {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    font-weight: 500;
}

/* Preloading state for entire chat */
.dookaro-chat-preloading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1e1f23 0%, #18191d 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.dookaro-chat-preloading.hidden {
    opacity: 0;
    visibility: hidden;
}

.dookaro-preloading-logo {
    width: 60px;
    height: 60px;
    margin-bottom: 24px;
    opacity: 0.9;
}

.dookaro-preloading-title {
    color: #fff;
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 8px;
    text-align: center;
}

.dookaro-preloading-subtitle {
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
    margin-bottom: 32px;
    text-align: center;
}

.dookaro-preloading-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid rgba(218, 216, 100, 0.2);
    border-top: 3px solid #dad864;
    border-radius: 50%;
    animation: dookaro-spin 1.2s linear infinite;
}

/* Fade in animation for loaded content */
.dookaro-chat-loaded {
    animation: dookaro-fadeInChat 0.6s ease-out;
}

@keyframes dookaro-fadeInChat {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Typing indicator - minimal design with avatar on right */
.dookaro-typing-indicator {
    display: flex;
    align-items: flex-start;
    margin-bottom: 16px;
    opacity: 0;
    animation: fadeInTyping 0.3s ease-in forwards;
    flex-direction: row-reverse; /* Reverse direction for right-aligned avatar */
    justify-content: flex-start;
}

.dookaro-typing-content {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0;
    margin-left: 8px; /* Changed from margin-right to margin-left */
    background: transparent;
    border: none;
    box-shadow: none;
    flex-direction: row-reverse; /* Reverse order: dots after text */
}

.dookaro-typing-dots {
    display: flex;
    align-items: center;
    gap: 3px;
}

.dookaro-typing-dots span {
    width: 6px;
    height: 6px;
    background-color: #999;
    border-radius: 50%;
    animation: typingDots 1.4s infinite ease-in-out;
}

.dookaro-typing-dots span:nth-child(1) {
    animation-delay: 0s;
}

.dookaro-typing-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.dookaro-typing-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

.dookaro-typing-text {
    font-size: 14px;
    color: #999;
    font-weight: normal;
    margin: 0;
}

/* Special styling for typing indicator avatar */
.dookaro-typing-indicator .dookaro-message-avatar {
    order: 2; /* Avatar goes to the right */
}

@keyframes typingDots {
    0%, 60%, 100% {
        transform: scale(1);
        opacity: 0.4;
    }
    30% {
        transform: scale(1.2);
        opacity: 1;
    }
}

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

/* Error message */
.dookaro-error {
    color: #d32f2f;
    padding: 10px;
    margin: 10px 0;
    background-color: #ffeaea;
    border-radius: 4px;
    border-left: 3px solid #d32f2f;
}

/* Custom Dookaro message input container styles */
.dookaro-chat-input .dookaro-message-form .dookaro-message-input-container {
    border-top-left-radius: 0px;
    border-top-right-radius: 0px;
    border-bottom-left-radius: 0px;
    border-bottom-right-radius: 0px;
}

/* 782px and smaller screen sizes */
@media (max-width: 782px) {
    /* Dookaro chat input */
    .elementor-shortcode .dookaro-chat-main .dookaro-chat-input {
        /* Additional styles can be added here if needed */
    }
    
    /* Standard mobile input styling - 782px breakpoint */
    .dookaro-chat-input .dookaro-message-form .dookaro-message-input-container {
        border-style: none;
    }
    
    .elementor-shortcode .dookaro-chat-main .dookaro-chat-input {
        border-style: none !important;
    }
    
    .dookaro-chat-main .dookaro-chat-input form {
        border-style: none;
    }
    
    .elementor-widget-shortcode .elementor-widget-container .elementor-shortcode .dookaro-chat-container .dookaro-chat-main .dookaro-chat-input .dookaro-message-form .dookaro-message-input-container {
        border-top-left-radius: 10px !important;
        border-top-right-radius: 10px !important;
        border-bottom-left-radius: 10px !important;
        border-bottom-right-radius: 10px !important;
    }
}

/* 479px and smaller screen sizes */
@media (max-width: 479px) {
    /* Dookaro chat header */
    .elementor-shortcode .dookaro-chat-main .dookaro-chat-header {
        padding-right: 17px !important;
    }
}

/* 769px and larger screen sizes */
@media (min-width: 769px) {
    /* Dookaro chat input */
    .elementor-shortcode .dookaro-chat-main .dookaro-chat-input {
        padding-left: 0px;
        padding-right: 0px;
        padding-top: 0px;
        padding-bottom: 0px;
    }
}

/* Fullscreen mode - desktop */
.dookaro-chat-container.sidebar-hidden .dookaro-sidebar {
    transform: translateX(-100%);
    position: absolute;
    z-index: 10;
    height: 100%;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
}

/* Responsive design - Mobile Messenger-like Experience */
@media (max-width: 768px) {
    /* Use CSS custom properties for more reliable height calculation */
    .dookaro-mobile .dookaro-chat-container {
        height: var(--real-vh, 100vh);
        height: var(--real-vh, 100dvh);
        min-height: var(--real-vh, 100vh);
        max-height: var(--real-vh, 100vh);
    }
    
    .dookaro-mobile .dookaro-sidebar,
    .dookaro-mobile .dookaro-chat-main {
        height: var(--real-vh, 100vh);
        height: var(--real-vh, 100dvh);
        min-height: var(--real-vh, 100vh);
        max-height: var(--real-vh, 100vh);
    }
    
    /* Critical: Force input to bottom with highest priority */
    .dookaro-mobile .dookaro-chat-input {
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100vw !important;
        z-index: 999999 !important;
        background-color: #18191d !important;
        border-top: 1px solid #e0e0e0 !important;
        /* Prevent any layout interference */
        margin: 0 !important;
        transform: none !important;
        transition: none !important;
    }
    
    /* Ensure input container is always visible */
    .dookaro-mobile .dookaro-message-input-container {
        padding: 10px 12px;
        border-radius: 0px;
        gap: 8px;
        background-color: #1e1f23;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
        border: 1px solid #e0e0e0;
        position: relative;
        z-index: 1001;
        display: flex;
        align-items: flex-end;
        min-height: 40px;
        /* Apply custom border radius removal for all mobile containers */
        border-top-left-radius: 0px !important;
        border-top-right-radius: 0px !important;
        border-bottom-left-radius: 0px !important;
        border-bottom-right-radius: 0px !important;
    }
    
    /* Force textarea to prevent zoom */
    .dookaro-mobile .dookaro-message-input {
        font-size: 16px !important;
        /* Prevent any zoom on iOS */
        transform: translateZ(0);
        -webkit-appearance: none;
        -webkit-border-radius: 0;
    }
    
    /* Messages area must leave space for input */
    .dookaro-mobile .dookaro-chat-messages {
        padding-bottom: 100px !important;
        margin-bottom: 0 !important;
        /* Use custom property for height */
        max-height: calc(var(--real-vh, 100vh) - 140px) !important;
    }
    
    /* Keyboard state handling */
    .dookaro-mobile.keyboard-open .dookaro-chat-input {
        bottom: 0 !important;
        position: fixed !important;
        z-index: 999999 !important;
    }
    
    /* Safe area insets for newer devices */
    .dookaro-mobile .dookaro-chat-input {
        padding-bottom: env(safe-area-inset-bottom, 0px);
        padding-left: env(safe-area-inset-left, 16px);
        padding-right: env(safe-area-inset-right, 16px);
    }
    
    /* Force full height and prevent iOS bounce */
    html {
        height: 100%;
        height: 100vh;
        height: 100dvh;
        overflow: hidden;
        position: fixed;
        width: 100%;
        -webkit-overflow-scrolling: auto;
        -webkit-user-select: none;
        -webkit-touch-callout: none;
        -webkit-tap-highlight-color: transparent;
    }
    
    body {
        height: 100%;
        height: 100vh;
        height: 100dvh;
        overflow: hidden;
        position: fixed;
        width: 100%;
        margin: 0;
        padding: 0;
        -webkit-overflow-scrolling: auto;
    }
    
    .dookaro-chat-container {
        width: 100vw;
        width: 100%;
        height: 100vh;
        height: 100dvh;
        flex-direction: row;
        position: fixed;
        top: 0;
        left: 0;
        overflow: hidden;
        margin: 0;
        padding: 0;
        /* Prevent text selection and callouts on mobile */
        -webkit-user-select: none;
        -webkit-touch-callout: none;
        -webkit-tap-highlight-color: transparent;
    }
    
    /* Mobile view states */
    .dookaro-chat-container {
        /* By default show sidebar on mobile */
    }
    
    .dookaro-chat-container.in-chat-view {
        /* When in chat view, hide sidebar and show chat */
    }
    
    /* Sidebar - full screen on mobile */
    .dookaro-sidebar {
        width: 100vw;
        width: 100%;
        height: 100vh;
        height: 100dvh;
        border-right: none;
        transform: translateX(0);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        display: flex;
        flex-direction: column;
        overflow: hidden;
        position: absolute;
        top: 0;
        left: 0;
        z-index: 10;
    }
    
    .dookaro-sidebar-resizer {
        display: none;
    }
    
    /* Chat main - full screen when active */
    .dookaro-chat-main {
        position: absolute;
        width: 100vw;
        width: 100%;
        height: 100vh;
        height: 100dvh;
        top: 0;
        left: 0;
        transform: translateX(100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        display: flex;
        flex-direction: column;
        overflow: hidden;
        z-index: 5;
    }
    
    /* Show chat view when in chat mode */
    .dookaro-chat-container.in-chat-view .dookaro-sidebar {
        transform: translateX(-100%);
    }
    
    .dookaro-chat-container.in-chat-view .dookaro-chat-main {
        transform: translateX(0);
        z-index: 15;
    }
    
    /* Show back button in mobile view */
    .dookaro-back-button {
        display: flex !important;
        background: none;
        border: none;
        color: #ffffff;
        padding: 8px;
        cursor: pointer;
        border-radius: 6px;
        transition: background-color 0.2s;
        margin-left: 12px;
        order: 4;
    }
    
    .dookaro-back-button:hover {
        background-color: rgba(255, 255, 255, 0.1);
    }
    
    /* Hide toggle sidebar button in mobile */
    .dookaro-toggle-sidebar {
        display: none !important;
    }
    
    .dookaro-active-chat {
        flex: 1;
        display: flex;
        align-items: center;
        gap: 8px;
        order: 1;
        min-width: 0;
        margin-right: 8px;
    }
    
    .dookaro-actions {
        margin-right: 12px;
        order: 3;
    }
    
    /* Fix online indicator positioning */
    .dookaro-active-name {
        display: flex;
        align-items: center;
        gap: 6px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        min-width: 0;
    }
    
    .dookaro-online-indicator {
        flex-shrink: 0;
        margin-right: 4px;
    }
    
    /* Ensure active info doesn't overflow */
    .dookaro-active-info {
        flex: 1;
        min-width: 0;
        overflow: hidden;
    }
    
    /* Fixed header height for mobile */
    .dookaro-chat-header {
        height: 60px;
        min-height: 60px;
        max-height: 60px;
        flex-shrink: 0;
        padding: 12px 40px;
        box-sizing: border-box;
        border-bottom: none;
    }
    
    .dookaro-sidebar-header {
        height: 60px;
        min-height: 60px;
        max-height: 60px;
        flex-shrink: 0;
        padding: 12px 16px;
        box-sizing: border-box;
    }
    
    /* Chat list - scrollable area */
    .dookaro-chat-list {
        flex: 1;
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
        scroll-behavior: smooth;
        min-height: 0;
        height: calc(100vh - 60px);
        height: calc(100dvh - 60px);
    }
    
    /* Messages area - takes remaining space */
    .dookaro-chat-messages {
        flex: 1;
        min-height: 0;
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
        padding: 40px 40px 12px 40px;
        scroll-behavior: smooth;
        will-change: scroll-position;
        /* Calculate height to leave space for header and input */
        height: calc(100vh - 60px - 80px);
        height: calc(100dvh - 60px - 80px);
        max-height: calc(100vh - 60px - 80px);
        max-height: calc(100dvh - 60px - 80px);
    }
    

    
    .dookaro-message {
        max-width: 85%;
        margin-bottom: 16px;
    }
    
    .dookaro-message-content {
        padding: 10px 12px;
    }
    
    /* Fixed input area at bottom */
    .dookaro-chat-input {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100vw;
        width: 100%;
        padding: 12px 16px;
        background-color: #18191d;
        flex-shrink: 0;
        z-index: 1000;
        box-sizing: border-box;
        border-top: 1px solid #e0e0e0;
        /* Ensure it's always visible */
        min-height: 80px;
        max-height: 120px;
        /* Prevent any transforms or transitions */
        transform: none;
        transition: none;
    }
    
    .dookaro-message-input-container {
        padding: 10px 12px;
        border-radius: 0px;
        gap: 8px;
        background-color: #1e1f23;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
        border: 1px solid #e0e0e0;
        position: relative;
        z-index: 1001;
        display: flex;
        align-items: flex-end;
        min-height: 40px;
        /* Apply custom border radius removal for all mobile containers */
        border-top-left-radius: 0px !important;
        border-top-right-radius: 0px !important;
        border-bottom-left-radius: 0px !important;
        border-bottom-right-radius: 0px !important;
    }
    
    .dookaro-message-input {
        font-size: 16px; /* Prevent zoom on iOS */
        min-height: 20px;
        max-height: 60px;
        line-height: 1.4;
        border: none;
        outline: none;
        background: transparent;
        resize: none;
        padding: 0;
        margin: 0;
        /* Better mobile text input handling */
        -webkit-appearance: none;
        -webkit-border-radius: 0;
        /* Prevent autocorrect issues */
        autocomplete: off;
        autocorrect: off;
        autocapitalize: sentences;
        spellcheck: true;
        /* Allow text selection */
        -webkit-user-select: text;
        -moz-user-select: text;
        -ms-user-select: text;
        user-select: text;
    }
    
    .dookaro-input-actions {
        gap: 6px;
        display: flex;
        align-items: center;
        flex-shrink: 0;
    }
    
    .dookaro-emoji-button,
    .dookaro-image-upload-label {
        padding: 8px;
        min-width: 36px;
        min-height: 36px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
    }
    
    .dookaro-send-button {
        width: 36px;
        height: 36px;
        padding: 8px;
        min-width: 36px;
        min-height: 36px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Handle viewport changes when keyboard appears */
    .dookaro-chat-container.keyboard-open {
        /* Keep full height */
        height: 100vh;
        height: 100dvh;
    }
    
    .dookaro-chat-container.keyboard-open .dookaro-chat-main {
        height: 100vh;
        height: 100dvh;
    }
    
    .dookaro-chat-container.keyboard-open .dookaro-chat-messages {
        /* Adjust messages area when keyboard is open */
        padding-bottom: 20px;
        max-height: calc(100vh - 60px - 120px);
        max-height: calc(100dvh - 60px - 120px);
    }
    
    .dookaro-chat-container.keyboard-open .dookaro-chat-input {
        /* Keep input at bottom when keyboard appears */
        position: fixed;
        bottom: 0;
        z-index: 1000;
        /* Ensure it stays on top */
        transform: translateZ(0);
        backface-visibility: hidden;
    }
    
    /* Emoji picker for mobile */
    .dookaro-emoji-picker {
        position: fixed;
        bottom: 90px; /* Position above the mobile input area */
        left: 10px; /* Keep aligned to the left */
        right: auto;
        width: 280px; /* Fixed width, not full screen */
        max-width: calc(100vw - 20px); /* Respect screen margins */
        border-radius: 12px;
        border: 1px solid #e0e0e0;
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
        transform-origin: bottom left;
    }
    
    .dookaro-emoji-container {
        padding: 16px;
        gap: 10px;
        max-height: 220px;
        grid-template-columns: repeat(6, 1fr); /* Fewer columns for mobile */
    }
    
    .dookaro-emoji {
        font-size: 20px;
        padding: 10px 6px;
        min-height: 36px;
        border-radius: 8px;
    }
    
    /* Prevent text selection on touch elements */
    .dookaro-chat-item,
    .dookaro-send-button,
    .dookaro-emoji-button,
    .dookaro-image-upload-label,
    .dookaro-back-button,
    .dookaro-clear-chat,
    .dookaro-toggle-sidebar {
        -webkit-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        user-select: none;
        -webkit-touch-callout: none;
        -webkit-tap-highlight-color: transparent;
    }
    
    /* Allow text selection only in messages and input */
    .dookaro-message-content,
    .dookaro-message-input {
        -webkit-user-select: text;
        -moz-user-select: text;
        -ms-user-select: text;
        user-select: text;
    }
    
    /* Better touch targets */
    .dookaro-chat-item {
        min-height: 60px;
        padding: 12px 16px;
    }
    
    /* Additional mobile optimizations */
    .dookaro-chat-container * {
        -webkit-tap-highlight-color: transparent;
    }
    
    /* Ensure proper stacking */
    .dookaro-chat-container.in-chat-view .dookaro-chat-input {
        z-index: 1000;
    }
    
    /* Handle admin bar on mobile */
    body.admin-bar .dookaro-chat-container {
        top: 46px;
        height: calc(100vh - 46px);
        height: calc(100dvh - 46px);
    }
    
    body.admin-bar .dookaro-sidebar,
    body.admin-bar .dookaro-chat-main {
        height: calc(100vh - 46px);
        height: calc(100dvh - 46px);
    }
    
    body.admin-bar .dookaro-chat-messages {
        height: calc(100vh - 46px - 60px - 80px);
        height: calc(100dvh - 46px - 60px - 80px);
        max-height: calc(100vh - 46px - 60px - 80px);
        max-height: calc(100dvh - 46px - 60px - 80px);
    }
    
    body.admin-bar .dookaro-chat-list {
        height: calc(100vh - 46px - 60px);
        height: calc(100dvh - 46px - 60px);
    }

    /* Input container must stay visible */
    .dookaro-message-input-container {
        /* Ensure minimum visibility */
        min-height: 44px !important;
        /* iOS minimum touch target */
        z-index: 10001 !important;
    }

    /* Comprehensive mobile border radius removal for all scenarios */
    .dookaro-message-input-container,
    .dookaro-mobile .dookaro-message-input-container,
    .dookaro-chat-input .dookaro-message-input-container,
    .dookaro-mobile .dookaro-chat-input .dookaro-message-input-container,
    .dookaro-chat-input .dookaro-message-form .dookaro-message-input-container,
    .dookaro-mobile .dookaro-chat-input .dookaro-message-form .dookaro-message-input-container {
        border-radius: 0px !important;
        border-top-left-radius: 0px !important;
        border-top-right-radius: 0px !important;
        border-bottom-left-radius: 0px !important;
        border-bottom-right-radius: 0px !important;
        background-color: #1e1f23 !important;
    }
    
    /* Mobile input styling */
    .dookaro-mobile .dookaro-message-input,
    .dookaro-message-input {
        background: transparent !important;
        color: #ffffff !important;
    }
    
    .dookaro-mobile .dookaro-message-input:focus,
    .dookaro-message-input:focus {
        background: transparent !important;
        color: #ffffff !important;
    }
    
    .dookaro-mobile .dookaro-message-input:hover,
    .dookaro-message-input:hover {
        background: transparent !important;
        color: #ffffff !important;
    }
    
    .dookaro-mobile .dookaro-message-input:active,
    .dookaro-message-input:active {
        background: transparent !important;
        color: #ffffff !important;
    }
    
    .dookaro-mobile .dookaro-message-input::placeholder,
    .dookaro-message-input::placeholder {
        color: #cccccc !important;
    }
}

/* Emoji picker - inspired by customization modal */
.dookaro-emoji-picker {
    background: linear-gradient(135deg, #2c2c2c 0%, #1e1f23 100%);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.05);
    position: absolute;
    bottom: 60px; /* Position above the input container */
    left: 10px; /* Align with emoji button on the left */
    width: 320px;
    max-width: 320px;
    z-index: 1001;
    overflow: hidden;
    display: none !important;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transform-origin: bottom left;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(20px);
}

@keyframes slideUpFade {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.dookaro-emoji-picker.active {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) scale(1) !important;
}

.dookaro-emoji-container {
    padding: 20px;
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 10px;
    max-height: 280px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background: transparent;
}

/* Custom scrollbar for emoji container */
.dookaro-emoji-container::-webkit-scrollbar {
    width: 6px;
}

.dookaro-emoji-container::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.dookaro-emoji-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.dookaro-emoji-container::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

.dookaro-emoji {
    font-size: 24px;
    padding: 12px;
    border-radius: 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1;
    min-height: 48px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
    overflow: hidden;
}

.dookaro-emoji::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.02) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: inherit;
}

.dookaro-emoji:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.12);
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.dookaro-emoji:hover::before {
    opacity: 1;
}

.dookaro-emoji:active {
    transform: translateY(0) scale(0.98);
    background: rgba(255, 255, 255, 0.12);
    transition-duration: 0.1s;
}

/* Remove all old emoji styles */
.dookaro-emoji-categories,
.dookaro-emoji-search,
.dookaro-emoji-category {
    display: none !important;
}

/* Mobile adjustments for emoji picker */
@media (max-width: 768px) {
    .dookaro-emoji-picker {
        position: fixed;
        bottom: 90px; /* Position above the mobile input area */
        left: 10px; /* Keep aligned to the left */
        right: auto;
        width: 300px; /* Fixed width, not full screen */
        max-width: calc(100vw - 20px); /* Respect screen margins */
        border-radius: 16px;
        border: 1px solid rgba(255, 255, 255, 0.08);
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.05);
        transform-origin: bottom left;
        backdrop-filter: blur(20px);
    }
    
    .dookaro-emoji-container {
        padding: 18px;
        gap: 8px;
        max-height: 240px;
        grid-template-columns: repeat(6, 1fr); /* Fewer columns for mobile */
    }
    
    .dookaro-emoji {
        font-size: 22px;
        padding: 10px;
        min-height: 42px;
        border-radius: 10px;
    }
}

/* Additional critical mobile fixes */
@media (max-width: 768px) {
    /* Force mobile viewport to prevent zooming and ensure proper layout */
    @viewport {
        width: device-width;
        initial-scale: 1;
        maximum-scale: 1;
        user-scalable: no;
    }
    
    /* Additional body fixes for mobile */
    body.keyboard-open {
        position: fixed;
        width: 100%;
        height: 100vh;
        height: 100dvh;
        overflow: hidden;
    }
    
    /* Force input to stay at bottom in all scenarios */
    .dookaro-chat-input {
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100vw !important;
        z-index: 9999 !important;
        background-color: #18191d !important;
        /* Critical: prevent any layout shifts */
        transform: translateZ(0) !important;
        backface-visibility: hidden !important;
        /* Ensure it's always on top */
        isolation: isolate;
    }
    
    /* Alternative layout for problematic browsers */
    @supports not (height: 100dvh) {
        .dookaro-chat-container {
            height: 100vh;
        }
        
        .dookaro-sidebar,
        .dookaro-chat-main {
            height: 100vh;
        }
        
        .dookaro-chat-messages {
            height: calc(100vh - 60px - 80px);
            max-height: calc(100vh - 60px - 80px);
        }
        
        .dookaro-chat-list {
            height: calc(100vh - 60px);
        }
    }
    
    /* Keyboard open state with forced positioning */
    .keyboard-open .dookaro-chat-input {
        position: fixed !important;
        bottom: 0 !important;
        z-index: 9999 !important;
        /* Force hardware acceleration */
        will-change: transform;
        transform: translate3d(0, 0, 0) !important;
    }
    
    /* Prevent content from going under the input */
    .keyboard-open .dookaro-chat-messages {
        padding-bottom: 100px !important;
        margin-bottom: 0 !important;
    }
    
    /* Additional iOS Safari fixes */
    @supports (-webkit-touch-callout: none) {
        .dookaro-chat-input {
            /* iOS Safari specific fixes */
            position: -webkit-sticky !important;
            position: sticky !important;
            bottom: 0 !important;
        }
        
        .keyboard-open .dookaro-chat-input {
            /* Force position when keyboard is open on iOS */
            position: fixed !important;
            bottom: env(keyboard-inset-height, 0px) !important;
        }
    }
    
    /* Android Chrome specific fixes */
    @media screen and (-webkit-min-device-pixel-ratio: 0) {
        .dookaro-chat-input {
            /* Chrome mobile specific */
            position: fixed !important;
            bottom: max(0px, env(keyboard-inset-height, 0px)) !important;
        }
    }
    
    /* Emergency fallback for any remaining issues */
    .dookaro-chat-container.emergency-fix .dookaro-chat-input {
        position: absolute !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        z-index: 10000 !important;
    }
    
    .dookaro-chat-container.emergency-fix .dookaro-chat-main {
        padding-bottom: 100px !important;
    }
    
    /* Ensure proper message area height calculation */
    .dookaro-chat-messages {
        /* Use flex-grow instead of calc when possible */
        flex: 1 1 auto;
        min-height: 0;
        overflow-y: auto;
        /* Fallback heights */
        height: calc(100vh - 140px);
        height: calc(100dvh - 140px);
        max-height: calc(100vh - 140px);
        max-height: calc(100dvh - 140px);
    }
    
    /* Better touch handling */
    .dookaro-message-input {
        /* Prevent zoom on iOS */
        font-size: 16px !important;
        /* Better touch response */
        touch-action: manipulation;
        /* Prevent autocomplete dropdown issues */
        autocomplete: off;
        autocorrect: off;
        autocapitalize: off;
        spellcheck: false;
    }
    
    /* Input container must stay visible */
    .dookaro-message-input-container {
        /* Ensure minimum visibility */
        min-height: 44px !important;
        /* iOS minimum touch target */
        z-index: 10001 !important;
    }
}



/* Modal Styles */
.dookaro-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.dookaro-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.dookaro-modal-content {
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
}

.dookaro-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 24px 0 24px;
    border-bottom: 1px solid #f0f2f5;
    margin-bottom: 24px;
    flex-shrink: 0;
}

.dookaro-modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.dookaro-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #666;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
    line-height: 1;
}

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

.dookaro-modal-body {
    padding: 0 24px 24px 24px;
    overflow-y: auto;
    flex: 1;
}

.dookaro-modal-footer {
    padding: 24px;
    border-top: 1px solid #f0f2f5;
    flex-shrink: 0;
}

/* Specific modal styles */
#dookaro-profile-modal .dookaro-modal-content,
#dookaro-customization-modal .dookaro-modal-content,
#dookaro-subscription-details-modal .dookaro-modal-content,
#dookaro-help-modal .dookaro-modal-content,
#dookaro-attachment-modal .dookaro-modal-content {
    height: 90vh;
}

@media (max-width: 768px) {
    .dookaro-modal {
        padding: 10px;
    }
    
    .dookaro-modal-content {
        max-height: 95vh;
    }
    
    #dookaro-profile-modal .dookaro-modal-content,
    #dookaro-customization-modal .dookaro-modal-content,
    #dookaro-subscription-details-modal .dookaro-modal-content,
    #dookaro-help-modal .dookaro-modal-content,
    #dookaro-attachment-modal .dookaro-modal-content {
        height: 95vh;
    }
    
    .dookaro-modal-header {
        padding: 16px 16px 0 16px;
    }
    
    .dookaro-modal-body {
        padding: 0 16px 16px 16px;
    }
    
    .dookaro-modal-footer {
        padding: 16px;
    }
}

/* Modern Profile Modal Form Styles */
#dookaro-profile-modal .dookaro-form-group {
    margin-bottom: 24px;
    position: relative;
}

#dookaro-profile-modal .dookaro-form-group label {
    display: block;
    margin-bottom: 8px;
    color: #dad864;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

#dookaro-profile-modal .dookaro-form-input,
#dookaro-profile-modal .dookaro-form-textarea,
#dookaro-profile-modal .dookaro-form-select {
    width: 100%;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(218, 216, 100, 0.2);
    border-radius: 12px;
    font-size: 15px;
    font-family: inherit;
    color: #ffffff;
    transition: all 0.3s ease;
    box-sizing: border-box;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

#dookaro-profile-modal .dookaro-form-input::placeholder,
#dookaro-profile-modal .dookaro-form-textarea::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

#dookaro-profile-modal .dookaro-form-input:focus,
#dookaro-profile-modal .dookaro-form-textarea:focus,
#dookaro-profile-modal .dookaro-form-select:focus {
    outline: none;
    border-color: #dad864;
    background: rgba(218, 216, 100, 0.1);
    box-shadow: 
        0 0 0 2px rgba(218, 216, 100, 0.2),
        0 4px 12px rgba(218, 216, 100, 0.1);
    transform: translateY(-1px);
}

#dookaro-profile-modal .dookaro-form-textarea {
    resize: vertical;
    min-height: 100px;
}

#dookaro-profile-modal .dookaro-form-help {
    display: block;
    margin-top: 6px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 12px;
    line-height: 1.5;
}

/* Modern Profile Modal Button Styles */
#dookaro-profile-modal .dookaro-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#dookaro-profile-modal .dookaro-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

#dookaro-profile-modal .dookaro-btn:hover::before {
    left: 100%;
}

#dookaro-profile-modal .dookaro-btn-primary {
    background: linear-gradient(145deg, #dad864 0%, #c4c456 100%);
    color: #1e1f23;
    border: 1px solid rgba(218, 216, 100, 0.3);
    box-shadow: 
        0 4px 12px rgba(218, 216, 100, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

#dookaro-profile-modal .dookaro-btn-primary:hover {
    background: linear-gradient(145deg, #e4e470 0%, #d0d062 100%);
    transform: translateY(-2px);
    box-shadow: 
        0 6px 20px rgba(218, 216, 100, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

#dookaro-profile-modal .dookaro-btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

#dookaro-profile-modal .dookaro-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

/* Modern Profile Modal Avatar Section */
#dookaro-profile-modal .dookaro-avatar-upload-section {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 8px;
}

#dookaro-profile-modal .dookaro-current-avatar {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid #dad864;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, rgba(218, 216, 100, 0.1) 0%, rgba(218, 216, 100, 0.05) 100%);
    position: relative;
    box-shadow: 
        0 8px 16px rgba(0, 0, 0, 0.3),
        inset 0 2px 4px rgba(218, 216, 100, 0.1);
}

#dookaro-profile-modal .dookaro-current-avatar::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    border-radius: 50%;
    background: linear-gradient(45deg, #dad864, transparent, #dad864);
    z-index: -1;
    animation: avatarGlow 3s ease-in-out infinite;
}

@keyframes avatarGlow {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

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

#dookaro-profile-modal .dookaro-avatar-placeholder-large {
    width: 100%;
    height: 100%;
    background: linear-gradient(145deg, rgba(218, 216, 100, 0.2) 0%, rgba(218, 216, 100, 0.1) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #dad864;
    font-size: 28px;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

#dookaro-profile-modal .dookaro-avatar-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
}

.dookaro-customization-intro {
    background-color: #f0f7ff;
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid #1a73e8;
}

.dookaro-customization-intro p {
    margin: 0;
    color: #666;
    line-height: 1.6;
}

/* Character Information Modal Styles */
.dookaro-character-details {
    text-align: right;
}

.dookaro-character-avatar-section {
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #333;
    text-align: right;
}

.dookaro-character-avatar-large {
    width: 80px;
    height: 80px;
    margin: 0 auto 12px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid #333;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #1e1f23;
}

.dookaro-character-avatar-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dookaro-character-avatar-large.placeholder {
    background-color: #1a73e8;
    color: white;
    font-size: 32px;
    font-weight: bold;
}

.dookaro-character-details h4 {
    color: #ffffff;
    margin-bottom: 16px;
    font-size: 18px;
    text-align: right;
}

.dookaro-character-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 16px;
}

.dookaro-info-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: right;
}

.dookaro-info-item.full-width {
    grid-column: 1 / -1;
}

.dookaro-info-item label {
    font-weight: 600;
    color: #ffffff;
    text-align: right;
}

.dookaro-info-item span,
.dookaro-info-item p {
    color: #cccccc;
    font-size: 14px;
    margin: 0;
    line-height: 1.5;
    padding: 8px 12px;
    background-color: #18191d;
    border-radius: 6px;
    min-height: 20px;
    text-align: right;
}

.dookaro-info-item p {
    text-align: right;
    white-space: pre-wrap;
}

/* Dark theme for Character Info Modal */
#dookaro-character-info-modal .dookaro-modal-content {
    background-color: #1e1f23;
    border: 1px solid #333;
}

#dookaro-character-info-modal .dookaro-modal-header {
    background-color: #1e1f23;
    border-bottom: 1px solid #333;
    text-align: right;
}

#dookaro-character-info-modal .dookaro-modal-header h3 {
    color: #ffffff;
    text-align: right;
}

}

#dookaro-character-info-modal .dookaro-modal-close {
    color: #cccccc;
}

#dookaro-character-info-modal .dookaro-modal-close:hover {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.1);
}

#dookaro-character-info-modal .dookaro-modal-body {
    background-color: #1e1f23;
}

#dookaro-character-info-modal .dookaro-modal-footer {
    background-color: #1e1f23;
    border-top: 1px solid #333;
}

/* Mobile Styles */
@media (max-width: 768px) {
    .dookaro-chat-container {
        flex-direction: column;
        height: 100vh;
        overflow: hidden;
    }
    
    .dookaro-sidebar {
        width: 100%;
        height: 100%;
        position: absolute;
        top: 0;
        left: 0;
        z-index: 1000;
        transform: translateX(0);
        transition: transform 0.3s ease;
    }
    
    .dookaro-main-chat {
        width: 100%;
        height: 100%;
        position: relative;
        z-index: 1;
    }
    
    .dookaro-chat-container.in-chat-view .dookaro-sidebar {
        transform: translateX(-100%);
    }
    
    .dookaro-chat-container.in-chat-view .dookaro-main-chat {
        z-index: 1001;
    }
    
    .dookaro-chat-header {
        padding: 12px 0 !important;
        border-bottom: none !important;
        display: flex;
        align-items: center;
        gap: 12px;
    }
    
    .dookaro-back-button {
        display: flex !important;
        background: none;
        border: none;
        color: #ffffff;
        padding: 8px;
        cursor: pointer;
        border-radius: 6px;
        transition: background-color 0.2s;
        margin-left: 12px;
        order: 4;
    }
    
    .dookaro-back-button:hover {
        background-color: rgba(255, 255, 255, 0.1);
    }
    
    /* Hide toggle sidebar button in mobile */
    .dookaro-toggle-sidebar {
        display: none !important;
    }
    
    .dookaro-active-chat {
        flex: 1;
        display: flex;
        align-items: center;
        gap: 8px;
        order: 1;
        min-width: 0;
        margin-right: 8px;
    }
    
    .dookaro-actions {
        margin-right: 12px;
        order: 3;
    }
    
    /* Fix online indicator positioning */
    .dookaro-active-name {
        display: flex;
        align-items: center;
        gap: 6px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        min-width: 0;
    }
    
    .dookaro-online-indicator {
        flex-shrink: 0;
        margin-right: 4px;
    }
    
    /* Ensure active info doesn't overflow */
    .dookaro-active-info {
        flex: 1;
        min-width: 0;
        overflow: hidden;
    }
    
    .dookaro-chat-messages {
        flex: 1;
        padding: 16px 12px;
    }
    
    .dookaro-message-form {
        padding: 12px;
        border-top: 1px solid #333;
    }
    
    .dookaro-bottom-menu {
        padding: 8px;
    }
    
    .dookaro-menu-item {
        min-width: 60px;
        padding: 8px 4px;
    }
    
    .dookaro-menu-label {
        font-size: 10px;
    }
    
    .dookaro-avatar-actions {
        flex-direction: column;
        gap: 8px;
    }
    
    /* Character Info Modal Mobile Styles - Full Screen */
    #dookaro-character-info-modal {
        padding: 0 !important;
        align-items: stretch !important;
        justify-content: stretch !important;
    }
    
    #dookaro-character-info-modal .dookaro-modal-content {
        width: 100vw !important;
        height: 100vh !important;
        max-width: 100vw !important;
        max-height: 100vh !important;
        margin: 0 !important;
        border-radius: 0 !important;
        display: flex !important;
        flex-direction: column !important;
        overflow: hidden !important;
    }
    
    #dookaro-character-info-modal .dookaro-modal-header {
        padding: 16px 20px !important;
        border-bottom: 1px solid #333 !important;
        flex-shrink: 0 !important;
        background-color: #1e1f23 !important;
    }
    
    #dookaro-character-info-modal .dookaro-modal-body {
        flex: 1 !important;
        overflow-y: auto !important;
        padding: 20px !important;
        background-color: #1e1f23 !important;
    }
    
    .dookaro-character-info-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .dookaro-info-item.full-width {
        grid-column: 1;
    }
    
    .dookaro-character-avatar-large {
        width: 80px;
        height: 80px;
    }
    
    .dookaro-character-avatar-section {
        margin-bottom: 20px;
        padding-bottom: 16px;
        border-bottom: 1px solid #333;
        text-align: right;
    }
    
    .dookaro-character-details h4 {
        font-size: 20px;
        margin-bottom: 12px;
        color: #ffffff;
        text-align: right;
    }
    
    .dookaro-info-item span,
    .dookaro-info-item p {
        font-size: 14px;
        padding: 12px 16px;
        background-color: #18191d;
        border-radius: 8px;
        color: #cccccc;
        min-height: 40px;
    }
    
    .dookaro-info-item label {
        font-size: 15px;
        margin-bottom: 8px;
        color: #ffffff;
        font-weight: 600;
    }
    
    .dookaro-info-item {
        gap: 10px;
    }
}

/* Chat Messages Container with Fade Shadows */
.dookaro-chat-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
    background-color: #18191d;
    position: relative;
    z-index: 1;
    overflow: hidden;
}







/* Subscription System Styles */

/* Subscription Modal */
.dookaro-subscription-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.4s ease-out;
}

.dookaro-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(12px);
}

.dookaro-modal-container {
    position: relative;
    background: linear-gradient(145deg, #1a1a1e 0%, #0f0f11 100%);
    border-radius: 24px;
    box-shadow: 0 30px 100px rgba(0, 0, 0, 0.8), 
                0 0 50px rgba(74, 158, 255, 0.1) inset,
                0 2px 0 rgba(74, 158, 255, 0.4);
    max-width: 520px;
    width: 92%;
    max-height: 90vh;
    overflow: hidden;
    animation: modalZoomIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    direction: rtl;
    text-align: right;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

/* Add decorative top border */
.dookaro-modal-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #4a9eff 0%, #0066cc 25%, #ff6b9d 75%, #4a9eff 100%);
    border-radius: 24px 24px 0 0;
    z-index: 1;
}

@keyframes modalZoomIn {
    0% {
        transform: scale(0.7);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.dookaro-modal-header {
    padding: 32px 32px 24px 32px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    text-align: center;
    position: relative;
}

.dookaro-modal-title {
    margin: 0;
    font-size: 28px;
    font-weight: 700;
    background: linear-gradient(135deg, #ffffff 0%, #e0e0e0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.dookaro-modal-body {
    padding: 32px;
    text-align: center;
}

.dookaro-modal-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px auto;
    border-radius: 50%;
    background: linear-gradient(145deg, #4a9eff 0%, #0066cc 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    box-shadow: 0 8px 25px rgba(74, 158, 255, 0.3),
                0 0 20px rgba(74, 158, 255, 0.2) inset;
    font-size: 32px;
}

.dookaro-modal-message {
    font-size: 18px;
    color: #b0b0b0;
    line-height: 1.6;
    margin: 0 0 32px 0;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.dookaro-modal-stats {
    background: linear-gradient(145deg, #2a2a2e 0%, #1e1e20 100%);
    border-radius: 16px;
    padding: 24px;
    margin: 0 0 16px 0;
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2),
                0 0 20px rgba(74, 158, 255, 0.05) inset;
}

.dookaro-stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding: 8px 0;
}

.dookaro-stat-item:last-child {
    margin-bottom: 0;
    border-bottom: none;
}

.dookaro-stat-label {
    font-size: 16px;
    color: #a0a0a0;
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.dookaro-stat-value {
    font-size: 16px;
    font-weight: 700;
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.dookaro-stat-value.subscription-type-none {
    color: #808080;
}

.dookaro-stat-value.subscription-type-basic {
    color: #4a9eff;
    text-shadow: 0 0 8px rgba(74, 158, 255, 0.3);
}

.dookaro-stat-value.subscription-type-premium {
    color: #ff6b9d;
    text-shadow: 0 0 8px rgba(255, 107, 157, 0.3);
}

.dookaro-modal-footer {
    padding: 24px 32px 32px 32px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    justify-content: center;
    direction: ltr;
}

.dookaro-modal-action-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
}

.dookaro-btn {
    padding: 16px 32px;
    border-radius: 16px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    outline: none;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 140px;
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dookaro-btn:focus {
    box-shadow: 0 0 0 3px rgba(74, 158, 255, 0.5);
}

.dookaro-btn-primary {
    background: linear-gradient(135deg, #4a9eff 0%, #0066cc 100%);
    color: #ffffff;
    box-shadow: 0 8px 25px rgba(74, 158, 255, 0.3);
}

.dookaro-btn-primary:hover {
    background: linear-gradient(135deg, #0066cc 0%, #004499 100%);
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(74, 158, 255, 0.4);
}

.dookaro-btn-secondary {
    background: linear-gradient(145deg, #404040 0%, #2a2a2a 100%);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.dookaro-btn-secondary:hover {
    background: linear-gradient(145deg, #4a4a4a 0%, #333333 100%);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.dookaro-btn-back {
    background: linear-gradient(145deg, #6c757d 0%, #495057 100%);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    width: 100%;
    margin-top: 8px;
}

.dookaro-btn-back:hover {
    background: linear-gradient(145deg, #757575 0%, #525252 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

/* Prevent body scroll when modal is open */  
.dookaro-modal-open {
    overflow: hidden;
}

/* Modal Responsive Styles */
@media (max-width: 768px) {
    .dookaro-modal-container {
        width: 95%;
        max-width: none;
        margin: 10px;
        border-radius: 20px;
    }
    
    .dookaro-modal-header {
        padding: 28px 24px 20px 24px;
    }
    
    .dookaro-modal-title {
        font-size: 24px;
    }
    
    .dookaro-modal-body {
        padding: 24px;
    }
    
    .dookaro-modal-icon {
        width: 70px;
        height: 70px;
        margin-bottom: 20px;
        font-size: 28px;
    }
    
    .dookaro-modal-message {
        font-size: 16px;
        margin-bottom: 24px;
    }
    
    .dookaro-modal-stats {
        padding: 20px;
        margin-bottom: 12px;
    }
    
    .dookaro-stat-item {
        margin-bottom: 12px;
        padding: 6px 0;
    }
    
    .dookaro-stat-label,
    .dookaro-stat-value {
        font-size: 15px;
    }
    
    .dookaro-modal-footer {
        padding: 20px 24px 28px 24px;
        flex-direction: column;
        gap: 12px;
    }
    
    .dookaro-modal-action-buttons {
        flex-direction: column;
        gap: 12px;
    }
    
    .dookaro-btn {
        width: 100%;
        padding: 14px 24px;
        font-size: 15px;
        min-width: unset;
        letter-spacing: 0.3px;
    }
}

/* Message Counter */
.dookaro-message-counter-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 15px;
    background: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    font-size: 13px;
    color: #6c757d;
}

.dookaro-message-counter-label {
    font-weight: 500;
}

.dookaro-message-counter {
    font-weight: 600;
    color: #495057;
    background: #e9ecef;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
}

/* Note: Input is always visible - disabled input state removed */

/* Subscription Status Indicator */
.dookaro-subscription-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dookaro-subscription-status.status-none {
    background: #f8f9fa;
    color: #6c757d;
    border: 1px solid #dee2e6;
}

.dookaro-subscription-status.status-basic {
    background: #e3f2fd;
    color: #1976d2;
    border: 1px solid #bbdefb;
}

.dookaro-subscription-status.status-premium {
    background: #f3e5f5;
    color: #7b1fa2;
    border: 1px solid #e1bee7;
}

.dookaro-subscription-status-icon {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
}

/* Limit Warning States */
.dookaro-message-counter.limit-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.dookaro-message-counter.limit-danger {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.dookaro-message-counter.limit-reached {
    background: #dc3545;
    color: #ffffff;
    border: 1px solid #dc3545;
    animation: pulse 2s infinite;
}

/* Animations */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* Mobile Responsive - Counter specific styles */
@media (max-width: 768px) {
    .dookaro-message-counter-container {
        padding: 6px 12px;
        font-size: 12px;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .dookaro-subscription-modal .dookaro-modal-container {
        background: #2c2c2c;
        color: #ffffff;
    }
    
    .dookaro-modal-title {
        color: #ffffff;
    }
    
    .dookaro-modal-message {
        color: #e0e0e0;
    }
    
    .dookaro-modal-stats {
        background: #3c3c3c;
    }
    
    .dookaro-stat-label {
        color: #b0b0b0;
    }
    
    .dookaro-stat-value {
        color: #ffffff;
    }
    
    .dookaro-modal-header {
        border-bottom-color: #404040;
    }
    
    .dookaro-message-counter-container {
        background: #2c2c2c;
        border-color: #404040;
        color: #ccc;
    }
    
    .dookaro-message-counter {
        background: #404040;
        color: #fff;
    }
}

/* Subscription Badge in Sidebar */
.dookaro-user-subscription-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-left: 8px;
}

.dookaro-user-subscription-badge.badge-basic {
    background: #e3f2fd;
    color: #1976d2;
}

.dookaro-user-subscription-badge.badge-premium {
    background: linear-gradient(45deg, #f3e5f5, #e8eaf6);
    color: #7b1fa2;
    border: 1px solid #e1bee7;
}

/* Profile Modal Subscription Info */
.dookaro-subscription-info {
    color: #6c757d;
    font-size: 12px;
    margin-top: 4px;
}

/* Purchase Modal Styles */
.dookaro-purchase-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #1a1a1a;
    z-index: 99999;
    overflow-y: auto;
    animation: modalZoomIn 0.3s ease;
}

.dookaro-purchase-modal .dookaro-back-btn:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    border-radius: 8px;
}

.dookaro-purchase-modal .dookaro-duration-btn:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    color: #ffffff !important;
}

.dookaro-purchase-modal .dookaro-purchase-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.dookaro-purchase-modal .dookaro-purchase-btn[data-plan="plus"]:hover {
    background: rgba(255, 255, 255, 0.3) !important;
}

.dookaro-purchase-modal .dookaro-purchase-btn[data-plan="pro"]:hover {
    background: linear-gradient(135deg, #ffed4e 0%, #ffd700 100%) !important;
}



/* Professional Subscription Modal Styles */
.dookaro-purchase-modal .dookaro-plan-card:hover {
    transform: scale(1.02) !important;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.4) !important;
}

.dookaro-purchase-modal .dookaro-plan-card:nth-child(2):hover {
    box-shadow: 0 25px 80px rgba(255, 215, 0, 0.2) !important;
}

.dookaro-purchase-modal .dookaro-back-btn:hover {
    background: rgba(255, 255, 255, 0.15) !important;
    transform: translateX(4px);
}

.dookaro-purchase-modal .dookaro-duration-btn:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    color: #ffffff !important;
    transform: translateY(-2px);
}

.dookaro-purchase-modal .dookaro-purchase-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.3);
}

.dookaro-purchase-modal .dookaro-purchase-btn[data-plan="basic"]:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%) !important;
    box-shadow: 0 8px 32px rgba(102, 126, 234, 0.4) !important;
}

.dookaro-purchase-modal .dookaro-purchase-btn[data-plan="premium"]:hover {
    background: linear-gradient(135deg, #ffed4e 0%, #ffd700 100%) !important;
    box-shadow: 0 8px 32px rgba(255, 215, 0, 0.5) !important;
}

/* Professional Modal Animation */
@keyframes modalZoomIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.dookaro-purchase-modal {
    animation: modalZoomIn 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* Mobile Responsive for Professional Modal */
@media (max-width: 768px) {
    .dookaro-purchase-modal [style*="grid-template-columns: 1fr 1fr"] {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }
    
    .dookaro-purchase-modal [style*="padding: 20px"] {
        padding: 16px 12px !important;
    }
    
    .dookaro-purchase-modal [style*="padding: 24px"] {
        padding: 16px !important;
    }
    
    .dookaro-purchase-modal [style*="font-size: 24px"] {
        font-size: 20px !important;
    }
    
    .dookaro-purchase-modal [style*="font-size: 20px"] {
        font-size: 18px !important;
    }
    
    .dookaro-purchase-modal .dookaro-duration-btn {
        padding: 8px 16px !important;
        font-size: 13px !important;
    }
    
    .dookaro-purchase-modal {
        font-size: 13px;
    }
    
    .dookaro-purchase-modal .dookaro-back-btn {
        font-size: 14px !important;
        padding: 6px 10px !important;
    }
    
    .dookaro-purchase-modal h2 {
        font-size: 16px !important;
    }
    
    .dookaro-purchase-modal h3 {
        font-size: 20px !important;
    }
    
    .dookaro-purchase-modal [style*="max-width: 900px"] {
        max-width: 100% !important;
    }
    }
    
    .dookaro-purchase-modal .dookaro-duration-btn {
        padding: 10px 16px !important;
        font-size: 13px !important;
    }
    
    .dookaro-purchase-modal .dookaro-purchase-btn {
        padding: 14px !important;
        font-size: 15px !important;
    }
}



/* Loading Spinner */
.dookaro-loading-spinner {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.dookaro-loading-spinner .spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Subscription Details */
.dookaro-subscription-details {
    padding: 20px;
}

.dookaro-subscription-section {
    margin-bottom: 24px;
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    border: 1px solid #e9ecef;
}

.dookaro-subscription-section h4 {
    margin: 0 0 16px 0;
    color: #2c3e50;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dookaro-subscription-section h4 i {
    color: #667eea;
}

/* Subscription Status */
.dookaro-subscription-status {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.status-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge.free {
    background: #e9ecef;
    color: #6c757d;
}

.status-badge.basic {
    background: linear-gradient(135deg, #e3f2fd, #bbdefb);
    color: #1976d2;
    border: 1px solid #90caf9;
}

.status-badge.premium {
    background: linear-gradient(135deg, #f3e5f5, #e1bee7);
    color: #7b1fa2;
    border: 1px solid #ce93d8;
}

.status-text {
    color: #495057;
    font-weight: 500;
}

/* Usage Information */
.dookaro-usage-info {
    margin-top: 12px;
}

.dookaro-usage-bar {
    width: 100%;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.usage-progress {
    height: 100%;
    background: linear-gradient(90deg, #28a745, #20c997);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.usage-progress[style*="100%"] {
    background: linear-gradient(90deg, #dc3545, #fd7e14);
}

.usage-stats {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: #6c757d;
    margin-bottom: 8px;
}

.remaining-messages {
    color: #28a745;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
}

.limit-reached {
    color: #dc3545;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
}

/* Subscription Details */
.subscription-details {
    display: grid;
    gap: 12px;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #e9ecef;
}

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

.detail-item .label {
    color: #6c757d;
    font-weight: 500;
}

.detail-item .value {
    color: #2c3e50;
    font-weight: 600;
}

.detail-item .value.highlight {
    color: #667eea;
}

.detail-item .value.expired {
    color: #dc3545;
}

/* Upgrade Information */
.upgrade-info p {
    color: #6c757d;
    margin-bottom: 16px;
    line-height: 1.5;
}

.upgrade-plans {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

.plan-option {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 16px;
    text-align: center;
    transition: all 0.3s ease;
}

.plan-option:hover {
    border-color: #667eea;
    transform: translateY(-2px);
}

.plan-option.premium {
    border-color: #7b1fa2;
    background: linear-gradient(135deg, #f3e5f5, #ffffff);
}

.plan-option h5 {
    margin: 0 0 8px 0;
    color: #2c3e50;
    font-size: 16px;
}

.plan-option p {
    margin: 0;
    color: #6c757d;
    font-size: 14px;
}

.upgrade-note {
    color: #6c757d;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    padding: 12px;
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 6px;
}

/* Error State */
.dookaro-subscription-error {
    text-align: center;
    padding: 40px 20px;
    color: #dc3545;
}

.dookaro-subscription-error i {
    font-size: 48px;
    margin-bottom: 16px;
    display: block;
}

.dookaro-subscription-error h4 {
    margin: 0 0 12px 0;
    color: #dc3545;
}

.dookaro-subscription-error p {
    margin: 0 0 20px 0;
    color: #6c757d;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    #dookaro-subscription-modal .dookaro-modal-content {
        margin: 10px;
        max-height: calc(100vh - 20px);
    }
    
    .dookaro-subscription-section {
        padding: 16px;
        margin-bottom: 16px;
    }
    
    .upgrade-plans {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .detail-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    
    .usage-stats {
        flex-direction: column;
        gap: 4px;
    }
}

.dookaro-emoji-button {
    background: none;
    border: none;
    padding: 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dookaro-emoji-button:hover {
    background-color: #f0f2f5;
    color: #1a73e8;
}

.dookaro-attachment-button {
    background: none;
    border: none;
    padding: 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 4px;
}

.dookaro-attachment-button:hover {
    background-color: #f0f2f5;
    color: #1a73e8;
}

.dookaro-attachment-button:active {
    transform: scale(0.95);
}



/* Image Caption Modal Styles */
#dookaro-image-caption-modal .dookaro-modal-content {
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
}

#dookaro-image-caption-modal .dookaro-modal-body {
    padding: 0;
    display: flex;
    flex-direction: column;
}

.dookaro-image-display-container {
    position: relative;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    max-height: 400px;
    overflow: hidden;
}

#dookaro-caption-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.dookaro-image-actions {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    gap: 8px;
}

.dookaro-image-action-btn {
    background: rgba(0, 0, 0, 0.7);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.dookaro-image-action-btn:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: scale(1.1);
}

.dookaro-caption-input-container {
    position: relative;
    padding: 16px;
    background: #f8f9fa;
    border-top: 1px solid #e0e0e0;
}

#dookaro-image-caption {
    width: 100%;
    border: none;
    background: transparent;
    resize: none;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.4;
    padding: 12px;
    outline: none;
    box-sizing: border-box;
    min-height: 60px;
    max-height: 120px;
}

#dookaro-image-caption::placeholder {
    color: #999;
}

#dookaro-image-caption-modal .dookaro-modal-footer {
    padding: 16px 24px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

#dookaro-image-caption-modal .dookaro-btn {
    padding: 10px 24px;
    border: none;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 80px;
}

#dookaro-image-caption-modal .dookaro-btn-secondary {
    background: #f1f3f4;
    color: #5f6368;
}

#dookaro-image-caption-modal .dookaro-btn-secondary:hover {
    background: #e8eaed;
}

#dookaro-image-caption-modal .dookaro-btn-primary {
    background: #1a73e8;
    color: white;
}

#dookaro-image-caption-modal .dookaro-btn-primary:hover {
    background: #1557b0;
}

#dookaro-image-caption-modal .dookaro-btn-primary:disabled {
    background: #dadce0;
    color: #9aa0a6;
    cursor: not-allowed;
}

/* Mobile responsive for Image Caption modal */
@media (max-width: 768px) {
    #dookaro-image-caption-modal .dookaro-modal-content {
        width: 100%;
        height: 100%;
        max-height: 100vh;
        margin: 0;
        border-radius: 0;
    }
    
    .dookaro-image-display-container {
        max-height: 50vh;
    }
    
    .dookaro-caption-input-container {
        flex: 1;
        padding: 20px;
    }
    
    #dookaro-image-caption {
        min-height: 80px;
    }
}

/* Customization Modal Styles */
#dookaro-customization-modal .dookaro-modal-content {
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
}

#dookaro-customization-modal .dookaro-modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-bottom: none;
    border-radius: 12px 12px 0 0;
}

#dookaro-customization-modal .dookaro-modal-header h3 {
    color: white;
    display: flex;
    align-items: center;
    gap: 8px;
}

#dookaro-customization-modal .dookaro-modal-header h3::before {
    content: "👑";
    font-size: 20px;
}

#dookaro-customization-modal .dookaro-modal-close {
    color: white;
    opacity: 0.8;
}

#dookaro-customization-modal .dookaro-modal-close:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.1);
}

/* Customization Details */
.dookaro-customization-details {
    padding: 20px;
}

.dookaro-customization-section {
    margin-bottom: 24px;
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    border: 1px solid #e9ecef;
}

.dookaro-customization-section h4 {
    margin: 0 0 16px 0;
    color: #2c3e50;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dookaro-customization-section h4 i {
    color: #667eea;
}



/* Mobile responsive improvements for profile modals */
@media (max-width: 768px) {
    #dookaro-profile-modal .dookaro-modal-content,
    #dookaro-customization-modal .dookaro-modal-content {
        width: 95%;
        max-height: 90vh;
        margin: 0 auto;
    }
    
    #dookaro-profile-modal .dookaro-modal-header,
    #dookaro-customization-modal .dookaro-modal-header {
        padding: 20px 16px;
    }
    
    #dookaro-profile-modal .dookaro-modal-body,
    #dookaro-customization-modal .dookaro-modal-body {
        padding: 20px 16px;
    }
    
    #dookaro-profile-modal .dookaro-modal-footer,
    #dookaro-customization-modal .dookaro-modal-footer {
        padding: 16px;
        flex-direction: column;
        gap: 12px;
    }
    
    #dookaro-profile-modal .dookaro-btn,
    #dookaro-customization-modal .dookaro-btn {
        width: 100%;
        justify-content: center;
    }
    
    #dookaro-profile-modal .dookaro-avatar-upload-section {
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }
    
    #dookaro-profile-modal .dookaro-avatar-actions {
        width: 100%;
        align-items: center;
    }
}

/* General Form Styles for other modals */
.dookaro-form-group {
    margin-bottom: 20px;
}

.dookaro-form-group label {
    display: block;
    margin-bottom: 6px;
    color: #333;
    font-weight: 500;
    font-size: 14px;
}

.dookaro-form-input,
.dookaro-form-textarea,
.dookaro-form-select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
}

.dookaro-form-input:focus,
.dookaro-form-textarea:focus,
.dookaro-form-select:focus {
    outline: none;
    border-color: #1a73e8;
    box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.1);
}

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

.dookaro-form-help {
    display: block;
    margin-top: 4px;
    color: #666;
    font-size: 12px;
    line-height: 1.4;
}

/* General Button Styles for other modals */
.dookaro-btn {
    padding: 10px 16px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.dookaro-btn-primary {
    background-color: #1a73e8;
    color: white;
}

.dookaro-btn-primary:hover {
    background-color: #1557b0;
    transform: translateY(-1px);
}

.dookaro-btn-secondary {
    background-color: #f1f3f4;
    color: #333;
    border: 1px solid #ddd;
}

.dookaro-btn-secondary:hover {
    background-color: #e8eaed;
    transform: translateY(-1px);
}

/* General Avatar Upload Section for other modals */
.dookaro-avatar-upload-section {
    display: flex;
    align-items: center;
    gap: 16px;
}

.dookaro-current-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f5f5f5;
}

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

.dookaro-avatar-placeholder-large {
    width: 100%;
    height: 100%;
    background-color: #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-size: 24px;
    font-weight: 600;
}

.dookaro-avatar-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.dookaro-customization-intro {
    background-color: #f0f7ff;
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid #1a73e8;
}

.dookaro-customization-intro p {
    margin: 0;
    color: #666;
    line-height: 1.6;
}

/* Modern Character Info Modal Styles */
#dookaro-character-info-modal .dookaro-modal-content {
    background: linear-gradient(145deg, #1e1f23 0%, #18191d 100%);
    border: 1px solid rgba(218, 216, 100, 0.1);
    max-width: 600px;
}

#dookaro-character-info-modal .dookaro-modal-header {
    background: linear-gradient(145deg, rgba(218, 216, 100, 0.08) 0%, rgba(218, 216, 100, 0.03) 100%);
    border-bottom: 1px solid rgba(218, 216, 100, 0.15);
}

#dookaro-character-info-modal .dookaro-modal-header h3 {
    color: #ffffff;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
}

#dookaro-character-info-modal .dookaro-modal-header h3::before {
    content: '🤖';
    font-size: 24px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

#dookaro-character-info-modal .dookaro-modal-body {
    background: rgba(0, 0, 0, 0.1);
}

#dookaro-character-info-modal .dookaro-character-details {
    text-align: right;
    color: #ffffff;
}

#dookaro-character-info-modal .dookaro-character-details h4 {
    color: #dad864;
    font-weight: 700;
    font-size: 20px;
    margin: 16px 0;
    text-align: center;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

#dookaro-character-info-modal .dookaro-character-avatar-section {
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(218, 216, 100, 0.2);
    text-align: center;
}

#dookaro-character-info-modal .dookaro-character-avatar-large {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid #dad864;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, rgba(218, 216, 100, 0.1) 0%, rgba(218, 216, 100, 0.05) 100%);
    position: relative;
    box-shadow: 
        0 8px 16px rgba(0, 0, 0, 0.3),
        inset 0 2px 4px rgba(218, 216, 100, 0.1);
}

#dookaro-character-info-modal .dookaro-character-avatar-large::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    border-radius: 50%;
    background: linear-gradient(45deg, #dad864, transparent, #dad864);
    z-index: -1;
    animation: avatarGlow 3s ease-in-out infinite;
}

#dookaro-character-info-modal .dookaro-character-avatar-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#dookaro-character-info-modal .dookaro-character-avatar-large.placeholder {
    background: linear-gradient(145deg, rgba(218, 216, 100, 0.2) 0%, rgba(218, 216, 100, 0.1) 100%);
    color: #dad864;
    font-size: 36px;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

#dookaro-character-info-modal .dookaro-character-info-grid {
    display: grid;
    gap: 16px;
    margin-top: 20px;
}

#dookaro-character-info-modal .dookaro-info-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(218, 216, 100, 0.1);
    border-radius: 12px;
    padding: 16px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

#dookaro-character-info-modal .dookaro-info-item:hover {
    background: rgba(218, 216, 100, 0.08);
    border-color: rgba(218, 216, 100, 0.2);
    transform: translateY(-2px);
}

#dookaro-character-info-modal .dookaro-info-item.full-width {
    grid-column: 1 / -1;
}

#dookaro-character-info-modal .dookaro-info-item strong,
#dookaro-character-info-modal .dookaro-info-item label {
    color: #dad864;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: block;
    margin-bottom: 8px;
}

#dookaro-character-info-modal .dookaro-info-item span,
#dookaro-character-info-modal .dookaro-info-item p {
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
    margin: 0;
}

/* Enhanced loading states for profile modals */
#dookaro-profile-modal .dookaro-form-input:focus,
#dookaro-profile-modal .dookaro-form-textarea:focus,
#dookaro-customization-modal .dookaro-form-input:focus,
#dookaro-customization-modal .dookaro-form-textarea:focus {
    animation: inputFocusGlow 0.3s ease-out;
}

@keyframes inputFocusGlow {
    0% {
        box-shadow: 0 0 0 0 rgba(218, 216, 100, 0.4);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(218, 216, 100, 0.1);
    }
    100% {
        box-shadow: 
            0 0 0 2px rgba(218, 216, 100, 0.2),
            0 4px 12px rgba(218, 216, 100, 0.1);
    }
}

/* Enhanced mobile experience for profile modals */
@media (max-width: 480px) {
    .dookaro-modal {
        padding: 16px;
        align-items: flex-start;
        padding-top: 40px;
    }
    
    #dookaro-profile-modal .dookaro-modal-content,
    #dookaro-customization-modal .dookaro-modal-content,
    #dookaro-character-info-modal .dookaro-modal-content {
        width: 100%;
        max-height: calc(100vh - 80px);
        border-radius: 16px;
        margin: 0;
    }
    
    #dookaro-profile-modal .dookaro-modal-header h3,
    #dookaro-customization-modal .dookaro-modal-header h3,
    #dookaro-character-info-modal .dookaro-modal-header h3 {
        font-size: 18px;
    }
    
    #dookaro-profile-modal .dookaro-current-avatar,
    #dookaro-character-info-modal .dookaro-character-avatar-large {
        width: 80px;
        height: 80px;
    }
    
    #dookaro-character-info-modal .dookaro-character-avatar-large {
        width: 100px;
        height: 100px;
    }
}

/* Profile modal save state animation */
#dookaro-profile-modal .dookaro-btn.saving {
    pointer-events: none;
    position: relative;
    color: transparent;
}

#dookaro-profile-modal .dookaro-btn.saving::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid transparent;
    border-top-color: #1e1f23;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

#dookaro-customization-modal .dookaro-btn.saving {
    pointer-events: none;
    position: relative;
    color: transparent;
}

#dookaro-customization-modal .dookaro-btn.saving::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid transparent;
    border-top-color: #1e1f23;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Success state for profile modals */
#dookaro-profile-modal .dookaro-btn.success,
#dookaro-customization-modal .dookaro-btn.success {
    background: linear-gradient(145deg, #4caf50 0%, #45a049 100%);
    color: white;
    animation: successPulse 0.6s ease-out;
}

@keyframes successPulse {
    0% {
        transform: scale(1);
        box-shadow: 0 4px 12px rgba(218, 216, 100, 0.3);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
    }
}

/* Scroll enhancement for modal bodies */
#dookaro-profile-modal .dookaro-modal-body::-webkit-scrollbar,
#dookaro-customization-modal .dookaro-modal-body::-webkit-scrollbar,
#dookaro-character-info-modal .dookaro-modal-body::-webkit-scrollbar {
    width: 6px;
}

#dookaro-profile-modal .dookaro-modal-body::-webkit-scrollbar-track,
#dookaro-customization-modal .dookaro-modal-body::-webkit-scrollbar-track,
#dookaro-character-info-modal .dookaro-modal-body::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

#dookaro-profile-modal .dookaro-modal-body::-webkit-scrollbar-thumb,
#dookaro-customization-modal .dookaro-modal-body::-webkit-scrollbar-thumb,
#dookaro-character-info-modal .dookaro-modal-body::-webkit-scrollbar-thumb {
    background: rgba(218, 216, 100, 0.6);
    border-radius: 3px;
    transition: background 0.3s ease;
}

#dookaro-profile-modal .dookaro-modal-body::-webkit-scrollbar-thumb:hover,
#dookaro-customization-modal .dookaro-modal-body::-webkit-scrollbar-thumb:hover,
#dookaro-character-info-modal .dookaro-modal-body::-webkit-scrollbar-thumb:hover {
    background: rgba(218, 216, 100, 0.8);
}

/* Simple Profile Modal Styles - Clean & Minimal */
.dookaro-simple-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    backdrop-filter: blur(10px);
    background: rgba(0, 0, 0, 0.7);
}

.dookaro-simple-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(30, 31, 35, 0.95) 0%, rgba(24, 25, 29, 0.95) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    animation: backdropFadeIn 0.4s ease-out forwards;
}

@keyframes backdropFadeIn {
    0% {
        opacity: 0;
        transform: scale(0.95);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.dookaro-simple-modal-container {
    position: relative;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    background: linear-gradient(145deg, #1e1f23 0%, #18191d 100%);
    border: 1px solid rgba(218, 216, 100, 0.1);
    border-radius: 20px;
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.4),
        0 0 50px rgba(218, 216, 100, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    opacity: 0;
    transform: translateY(30px) scale(0.95);
    animation: modalSlideIn 0.5s ease-out 0.1s forwards;
}

@keyframes modalSlideIn {
    0% {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Simple Modal Header */
.dookaro-simple-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    background: linear-gradient(135deg, #1e1f23 0%, #18191d 100%);
    border-bottom: 1px solid rgba(218, 216, 100, 0.1);
    box-shadow: 0 1px 10px rgba(0, 0, 0, 0.2);
}

.dookaro-modal-nav {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 10;
}

.dookaro-modal-close {
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
}

.dookaro-modal-close:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(218, 216, 100, 0.3);
    transform: scale(1.05);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.dookaro-modal-title-section {
    margin-bottom: 32px;
    text-align: center;
}

.dookaro-modal-title {
    font-size: 28px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 8px 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    background: linear-gradient(135deg, #fff 0%, #dad864 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.dookaro-modal-subtitle {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
    opacity: 0;
    animation: subtitleFadeIn 0.6s ease-out 0.3s forwards;
}

@keyframes subtitleFadeIn {
    0% {
        opacity: 0;
        transform: translateY(10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Step Indicators */
.dookaro-step-indicators {
    display: flex;
    justify-content: center;
    gap: 32px;
    margin-top: 24px;
}

.dookaro-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    position: relative;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    animation: stepFadeIn 0.5s ease-out forwards;
}

.dookaro-step:nth-child(1) { animation-delay: 0.2s; }
.dookaro-step:nth-child(2) { animation-delay: 0.3s; }
.dookaro-step:nth-child(3) { animation-delay: 0.4s; }

@keyframes stepFadeIn {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.dookaro-step-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.08);
    border: 2px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.6);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.dookaro-step-icon::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(218, 216, 100, 0.3), transparent);
    transition: left 0.6s ease;
}

.dookaro-step.active .dookaro-step-icon {
    background: linear-gradient(135deg, #dad864 0%, #b8b652 100%);
    border-color: #dad864;
    color: #1e1f23;
    box-shadow: 
        0 8px 24px rgba(218, 216, 100, 0.3),
        0 0 30px rgba(218, 216, 100, 0.2);
    transform: scale(1.1);
}

.dookaro-step.active .dookaro-step-icon::before {
    left: 100%;
}

.dookaro-step span {
    font-size: 14px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.6);
    transition: color 0.3s ease;
    text-align: center;
}

.dookaro-step.active span {
    color: #dad864;
    text-shadow: 0 0 10px rgba(218, 216, 100, 0.5);
}

/* Modal Body */
.dookaro-advanced-modal-body {
    flex: 1;
    padding: 32px;
    overflow-y: auto;
    position: relative;
    background: linear-gradient(135deg, #1e1f23 0%, #18191d 100%);
}

.dookaro-advanced-modal-body::-webkit-scrollbar {
    width: 8px;
}

.dookaro-advanced-modal-body::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.dookaro-advanced-modal-body::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #dad864 0%, #b8b652 100%);
    border-radius: 4px;
}

.dookaro-advanced-modal-body::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #f5f36e 0%, #dad864 100%);
}

/* Help Modal Step Content - Different from advanced modal */
#dookaro-help-modal .dookaro-step-content {
    flex: 1;
}

/* Attachment Modal Styles - Matching Profile Modal */
.dookaro-attachment-profile-section {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
    backdrop-filter: blur(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.dookaro-attachment-profile-section:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.dookaro-modern-attachment-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.dookaro-attachment-wrapper {
    position: relative;
    width: 120px;
    height: 120px;
    border-radius: 16px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.dookaro-attachment-wrapper:hover {
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.08);
    transform: scale(1.02);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.dookaro-modern-attachment-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.6);
    text-align: center;
    padding: 16px;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.dookaro-modern-attachment-placeholder svg {
    opacity: 0.5;
    transition: all 0.3s ease;
}

.dookaro-attachment-wrapper:hover .dookaro-modern-attachment-placeholder svg {
    opacity: 0.8;
    transform: scale(1.1);
}

.dookaro-modern-attachment-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.dookaro-modern-attachment-file {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 100%;
    color: rgba(255, 255, 255, 0.8);
    text-align: center;
    padding: 12px;
    font-size: 11px;
    font-weight: 600;
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.1), rgba(139, 195, 74, 0.1));
    border: 1px solid rgba(76, 175, 80, 0.2);
}

.dookaro-modern-attachment-file svg {
    opacity: 0.7;
}

.dookaro-attachment-controls {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
}

.dookaro-attachment-controls .dookaro-upload-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.dookaro-attachment-controls .dookaro-upload-btn:hover {
    background: rgba(102, 126, 234, 0.1);
    border-color: rgba(102, 126, 234, 0.3);
    color: #667eea;
    transform: translateY(-1px);
}

.dookaro-attachment-controls .dookaro-remove-avatar-link {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
}

.dookaro-attachment-controls .dookaro-remove-avatar-link:hover {
    color: #ff6b6b;
    background: rgba(255, 107, 107, 0.1);
    border-color: rgba(255, 107, 107, 0.3);
    transform: translateY(-1px);
}

/* File Type Specific Styles */
.dookaro-attachment-file-pdf {
    background: linear-gradient(135deg, rgba(244, 67, 54, 0.1), rgba(255, 87, 34, 0.1));
    border-color: rgba(244, 67, 54, 0.2);
}

.dookaro-attachment-file-doc {
    background: linear-gradient(135deg, rgba(33, 150, 243, 0.1), rgba(63, 81, 181, 0.1));
    border-color: rgba(33, 150, 243, 0.2);
}

.dookaro-attachment-file-zip {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.1), rgba(255, 152, 0, 0.1));
    border-color: rgba(255, 193, 7, 0.2);
}

.dookaro-attachment-file-audio {
    background: linear-gradient(135deg, rgba(156, 39, 176, 0.1), rgba(233, 30, 99, 0.1));
    border-color: rgba(156, 39, 176, 0.2);
}

.dookaro-attachment-file-video {
    background: linear-gradient(135deg, rgba(255, 87, 34, 0.1), rgba(255, 193, 7, 0.1));
    border-color: rgba(255, 87, 34, 0.2);
}

/* Responsive Design for Attachment Modal */
@media (max-width: 768px) {
    .dookaro-attachment-profile-section {
        padding: 20px;
        margin-bottom: 20px;
    }
    
    .dookaro-attachment-wrapper {
        width: 100px;
        height: 100px;
    }
    
    .dookaro-attachment-controls {
        flex-direction: column;
        gap: 8px;
    }
    
    .dookaro-attachment-controls .dookaro-upload-btn {
        padding: 10px 16px;
        font-size: 13px;
    }
}

/* Image Modal Styles - Matching Profile Modal */
.dookaro-image-profile-section {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 16px;
    padding: 24px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

.dookaro-modern-image-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.dookaro-image-wrapper {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.15);
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.dookaro-image-wrapper:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 64px rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.15);
}

.dookaro-modern-image {
    max-width: 100%;
    max-height: 60vh;
    width: auto;
    height: auto;
    display: block;
    border-radius: 14px;
    transition: all 0.3s ease;
}

.dookaro-image-controls {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

/* Copy button styles matching profile modal */
#dookaro-image-modal .dookaro-remove-avatar-link {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 500;
}

#dookaro-image-modal .dookaro-remove-avatar-link:hover {
    color: #dad864;
    background: rgba(218, 216, 100, 0.1);
}

/* Image info input field */
#image-info-display {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: rgba(255, 255, 255, 0.8) !important;
    cursor: default;
}

#image-info-display:focus {
    outline: none !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    box-shadow: none !important;
}

/* Responsive for Image Modal */
@media (max-width: 768px) {
    .dookaro-modern-image {
        max-height: 50vh;
    }
    
    .dookaro-image-controls {
        flex-direction: column;
        align-items: center;
        width: 100%;
    }
    
    .dookaro-image-controls .dookaro-upload-btn,
    .dookaro-image-controls .dookaro-remove-avatar-link {
        width: 100%;
        max-width: 200px;
    }
    
    .dookaro-image-profile-section {
        padding: 16px;
    }
}

/* Notification Animations */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

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

@keyframes stepContentSlideIn {
    0% {
        opacity: 0;
        transform: translateX(30px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Profile Grid */
.dookaro-profile-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

@media (max-width: 768px) {
    .dookaro-profile-grid {
        grid-template-columns: 1fr;
    }
}

/* Card Styles */
.dookaro-avatar-card,
.dookaro-info-card,
.dookaro-bio-card,
.dookaro-preference-card,
.dookaro-review-card {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 24px;
    backdrop-filter: blur(20px);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.dookaro-avatar-card::before,
.dookaro-info-card::before,
.dookaro-bio-card::before,
.dookaro-preference-card::before,
.dookaro-review-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(218, 216, 100, 0.3), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.dookaro-avatar-card:hover::before,
.dookaro-info-card:hover::before,
.dookaro-bio-card:hover::before,
.dookaro-preference-card:hover::before,
.dookaro-review-card:hover::before {
    opacity: 1;
}

.dookaro-avatar-card:hover,
.dookaro-info-card:hover,
.dookaro-bio-card:hover,
.dookaro-preference-card:hover,
.dookaro-review-card:hover {
    border-color: rgba(218, 216, 100, 0.3);
    box-shadow: 
        0 16px 40px rgba(0, 0, 0, 0.3),
        0 0 20px rgba(218, 216, 100, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    transform: translateY(-4px);
}

.dookaro-card-header {
    margin-bottom: 20px;
    text-align: center;
}

.dookaro-card-header h3 {
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 4px 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.dookaro-card-subtitle {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
}

/* Avatar Section */
.dookaro-avatar-preview-section {
    text-align: center;
}

.dookaro-avatar-container {
    position: relative;
    display: inline-block;
    margin-bottom: 20px;
}

.dookaro-avatar-image,
.dookaro-avatar-placeholder {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid rgba(218, 216, 100, 0.3);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.3),
        0 0 20px rgba(218, 216, 100, 0.2);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.dookaro-avatar-placeholder {
    background: linear-gradient(135deg, #dad864 0%, #b8b652 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1e1f23;
    font-size: 48px;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.dookaro-avatar-container:hover .dookaro-avatar-image,
.dookaro-avatar-container:hover .dookaro-avatar-placeholder {
    transform: scale(1.05);
    box-shadow: 
        0 16px 48px rgba(0, 0, 0, 0.4),
        0 0 30px rgba(218, 216, 100, 0.3);
}

.dookaro-avatar-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
}

.dookaro-avatar-container:hover .dookaro-avatar-overlay {
    opacity: 1;
}

.dookaro-avatar-change-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #dad864 0%, #b8b652 100%);
    border: none;
    color: #1e1f23;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(218, 216, 100, 0.3);
}

.dookaro-avatar-change-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 24px rgba(218, 216, 100, 0.4);
}

/* Avatar Actions */
.dookaro-avatar-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.dookaro-action-btn {
    padding: 12px 20px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.dookaro-action-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s ease;
}

.dookaro-action-btn:hover::before {
    left: 100%;
}

.dookaro-action-btn.primary {
    background: linear-gradient(135deg, #dad864 0%, #b8b652 100%);
    color: #1e1f23;
    box-shadow: 0 4px 16px rgba(218, 216, 100, 0.3);
}

.dookaro-action-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(218, 216, 100, 0.4);
}

.dookaro-action-btn.secondary {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.dookaro-action-btn.secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

/* Form Styles */
.dookaro-form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

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

.dookaro-input-group.half-width {
    grid-column: span 1;
}

@media (min-width: 600px) {
    .dookaro-form-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .dookaro-input-group:first-child,
    .dookaro-input-group:last-child {
        grid-column: span 2;
    }
}

.dookaro-input-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #dad864;
    text-shadow: 0 0 10px rgba(218, 216, 100, 0.3);
}

.dookaro-advanced-input,
.dookaro-advanced-textarea,
.dookaro-advanced-select {
    width: 100%;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    color: #fff;
    font-size: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.dookaro-advanced-input:focus,
.dookaro-advanced-textarea:focus,
.dookaro-advanced-select:focus {
    outline: none;
    border-color: #dad864;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 
        0 0 20px rgba(218, 216, 100, 0.2),
        inset 0 2px 4px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.dookaro-advanced-input::placeholder,
.dookaro-advanced-textarea::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

/* Bio Editor */
.dookaro-bio-card {
    grid-column: span 2;
    margin-top: 24px;
}

@media (max-width: 768px) {
    .dookaro-bio-card {
        grid-column: span 1;
    }
}

.dookaro-bio-editor {
    position: relative;
}

.dookaro-char-counter {
    position: absolute;
    bottom: 12px;
    right: 16px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
}

.dookaro-current-chars {
    color: #dad864;
    font-weight: 600;
}

/* Preferences */
.dookaro-preferences-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

@media (min-width: 768px) {
    .dookaro-preferences-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.dookaro-preference-options,
.dookaro-language-options {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.dookaro-preference-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.dookaro-preference-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(218, 216, 100, 0.2);
}

.dookaro-preference-info h4 {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    margin: 0 0 4px 0;
}

.dookaro-preference-info p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
}

/* Toggle Switch */
.dookaro-toggle-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

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

.dookaro-toggle-label {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 34px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.dookaro-toggle-label:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 2px;
    bottom: 2px;
    background: #fff;
    border-radius: 50%;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.dookaro-toggle-input:checked + .dookaro-toggle-label {
    background: linear-gradient(135deg, #dad864 0%, #b8b652 100%);
    border-color: #dad864;
    box-shadow: 0 0 20px rgba(218, 216, 100, 0.3);
}

.dookaro-toggle-input:checked + .dookaro-toggle-label:before {
    transform: translateX(26px);
    background: #1e1f23;
}

/* Review Section */
.dookaro-review-section {
    max-width: 800px;
    margin: 0 auto;
}

.dookaro-review-header {
    text-align: center;
    margin-bottom: 32px;
}

.dookaro-review-header h3 {
    font-size: 24px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 8px 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.dookaro-review-header p {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
}

.dookaro-review-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    margin-bottom: 32px;
}

@media (min-width: 768px) {
    .dookaro-review-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.dookaro-review-card h4 {
    font-size: 18px;
    font-weight: 600;
    color: #dad864;
    margin: 0 0 16px 0;
    text-shadow: 0 0 10px rgba(218, 216, 100, 0.3);
}

.dookaro-review-items {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.dookaro-review-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.dookaro-review-label {
    font-size: 14px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
}

.dookaro-review-value {
    font-size: 14px;
    color: #fff;
    text-align: right;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Privacy Notice */
.dookaro-privacy-notice {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: rgba(218, 216, 100, 0.1);
    border: 1px solid rgba(218, 216, 100, 0.2);
    border-radius: 16px;
    backdrop-filter: blur(10px);
}

.dookaro-privacy-icon {
    color: #dad864;
    flex-shrink: 0;
}

.dookaro-privacy-text h5 {
    font-size: 16px;
    font-weight: 600;
    color: #dad864;
    margin: 0 0 4px 0;
}

.dookaro-privacy-text p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
    line-height: 1.5;
}

/* Footer */
.dookaro-advanced-modal-footer {
    padding: 24px 32px;
    background: linear-gradient(135deg, #1e1f23 0%, #18191d 100%);
    border-top: 1px solid rgba(218, 216, 100, 0.1);
    box-shadow: 0 -1px 20px rgba(0, 0, 0, 0.3);
}

.dookaro-footer-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.dookaro-footer-spacer {
    flex: 1;
}

.dookaro-footer-btn {
    padding: 14px 24px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    min-width: 120px;
    justify-content: center;
}

.dookaro-footer-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s ease;
}

.dookaro-footer-btn:hover::before {
    left: 100%;
}

.dookaro-footer-btn.primary {
    background: linear-gradient(135deg, #dad864 0%, #b8b652 100%);
    color: #1e1f23;
    box-shadow: 0 4px 16px rgba(218, 216, 100, 0.3);
}

.dookaro-footer-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(218, 216, 100, 0.4);
}

.dookaro-footer-btn.secondary {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.dookaro-footer-btn.secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.dookaro-footer-btn.tertiary {
    background: transparent;
    color: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.dookaro-footer-btn.tertiary:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.2);
}

.dookaro-footer-btn.success {
    background: linear-gradient(135deg, #4ade80 0%, #22c55e 100%);
    color: #1e1f23;
    box-shadow: 0 4px 16px rgba(74, 222, 128, 0.3);
}

.dookaro-footer-btn.success:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(74, 222, 128, 0.4);
}

/* Loading States */
.dookaro-footer-btn.loading {
    position: relative;
    color: transparent;
    pointer-events: none;
}

.dookaro-footer-btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid transparent;
    border-top: 2px solid #1e1f23;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .dookaro-advanced-modal-container {
        width: 95%;
        height: 95vh;
        border-radius: 20px;
    }
    
    .dookaro-advanced-modal-header,
    .dookaro-advanced-modal-footer {
        padding: 20px 24px;
    }
    
    .dookaro-advanced-modal-body {
        padding: 24px;
    }
    
    .dookaro-step-indicators {
        gap: 20px;
    }
    
    .dookaro-step-icon {
        width: 48px;
        height: 48px;
    }
    
    .dookaro-step span {
        font-size: 12px;
    }
    
    .dookaro-modal-title {
        font-size: 24px;
    }
    
    .dookaro-modal-subtitle {
        font-size: 14px;
    }
    
    .dookaro-footer-actions {
        flex-direction: column;
        gap: 12px;
    }
    
    .dookaro-footer-btn {
        width: 100%;
    }
    
    .dookaro-footer-spacer {
        display: none;
    }
}

@media (max-width: 480px) {
    .dookaro-advanced-modal-container {
        width: 100%;
        height: 100vh;
        border-radius: 0;
    }
    
    .dookaro-step-indicators {
        gap: 16px;
    }
    
    .dookaro-step-icon {
        width: 40px;
        height: 40px;
    }
    
    .dookaro-step span {
        font-size: 11px;
    }
    
    .dookaro-modal-title {
        font-size: 20px;
    }
    
    .dookaro-avatar-image,
    .dookaro-avatar-placeholder {
        width: 100px;
        height: 100px;
    }
    
    .dookaro-avatar-placeholder {
        font-size: 40px;
    }
}

/* Animations for better UX */
@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.dookaro-avatar-card,
.dookaro-info-card {
    animation: fadeInUp 0.5s ease-out;
}

.dookaro-info-card {
    animation-delay: 0.1s;
}

.dookaro-bio-card {
    animation: fadeInUp 0.5s ease-out 0.2s both;
}

/* Focus states for accessibility */
.dookaro-footer-btn:focus,
.dookaro-action-btn:focus,
.dookaro-advanced-input:focus,
.dookaro-advanced-textarea:focus,
.dookaro-advanced-select:focus {
    outline: 2px solid #dad864;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .dookaro-advanced-modal-container {
        border: 2px solid #fff;
    }
    
    .dookaro-advanced-input,
    .dookaro-advanced-textarea,
    .dookaro-advanced-select {
        border: 2px solid #fff;
    }
    
    .dookaro-footer-btn.primary {
        background: #dad864;
        color: #000;
    }
}

/* Simple Modal Specific Styles */
.dookaro-modal-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.dookaro-modal-title svg {
    color: #dad864;
}

/* Modal Body */
.dookaro-simple-modal-body {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
    background: linear-gradient(135deg, #1e1f23 0%, #18191d 100%);
}

.dookaro-simple-modal-body::-webkit-scrollbar {
    width: 6px;
}

.dookaro-simple-modal-body::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

.dookaro-simple-modal-body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.dookaro-simple-modal-body::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Profile Sections */
.dookaro-profile-section {
    margin-bottom: 24px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 20px;
    transition: all 0.3s ease;
}

.dookaro-profile-section:hover {
    border-color: rgba(218, 216, 100, 0.2);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.dookaro-section-title {
    font-size: 16px;
    font-weight: 600;
    color: #dad864;
    margin: 0 0 16px 0;
    text-shadow: 0 0 10px rgba(218, 216, 100, 0.3);
    display: flex;
    align-items: center;
    gap: 8px;
}

.dookaro-required {
    color: #ff6b6b;
    font-weight: 700;
}

/* Modern Minimal Avatar Section */
.dookaro-avatar-profile-section {
    text-align: center;
    padding: 24px 20px !important;
    background: rgba(255, 255, 255, 0.02) !important;
}

.dookaro-modern-avatar-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.dookaro-avatar-wrapper {
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.dookaro-modern-avatar-image,
.dookaro-modern-avatar-placeholder {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center;
    border: 2px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 8px 25px rgba(0, 0, 0, 0.15),
        0 0 0 1px rgba(255, 255, 255, 0.05);
    max-width: 100px;
    max-height: 100px;
}

.dookaro-modern-avatar-placeholder {
    background: linear-gradient(135deg, #dad864 0%, #b8b652 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1e1f23;
    font-size: 36px;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Avatar Controls */
.dookaro-avatar-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
}

.dookaro-upload-btn {
    background: linear-gradient(135deg, #dad864 0%, #b8b652 100%);
    border: none;
    border-radius: 8px;
    color: #1e1f23;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(218, 216, 100, 0.2);
    min-width: 120px;
    justify-content: center;
}

.dookaro-upload-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(218, 216, 100, 0.3);
    background: linear-gradient(135deg, #e8e76e 0%, #c2c15c 100%);
}

.dookaro-upload-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(218, 216, 100, 0.2);
}

.dookaro-remove-avatar-link {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    font-size: 12px;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: all 0.3s ease;
    padding: 4px 0;
}

.dookaro-remove-avatar-link:hover {
    color: #ff6b6b;
    text-decoration-color: #ff6b6b;
    transform: translateY(-1px);
}

/* Touch interactions for mobile */
@media (hover: none) and (pointer: coarse) {
    .dookaro-upload-btn:active {
        transform: translateY(0) scale(0.98);
        box-shadow: 0 1px 4px rgba(218, 216, 100, 0.2);
    }
    
    .dookaro-remove-avatar-link:active {
        color: #ff6b6b;
        transform: scale(0.95);
    }
}

/* Focus states for accessibility */
.dookaro-upload-btn:focus-visible {
    outline: 2px solid #1e1f23;
    outline-offset: 2px;
}

.dookaro-remove-avatar-link:focus-visible {
    outline: 2px solid #dad864;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Form Styles */
.dookaro-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

@media (max-width: 600px) {
    .dookaro-form-row {
        grid-template-columns: 1fr;
    }
}

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

.dookaro-form-field label {
    font-size: 14px;
    font-weight: 600;
    color: #dad864;
    text-shadow: 0 0 8px rgba(218, 216, 100, 0.3);
}

.dookaro-input,
.dookaro-textarea {
    width: 100%;
    padding: 14px 18px;
    background: #222327 !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
    border-radius: 12px;
    color: #fff !important;
    font-size: 14px;
    transition: all 0.3s ease;
    box-shadow: none !important;
}

.dookaro-input:hover,
.dookaro-textarea:hover {
    background: #2a2b30 !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: none !important;
}

.dookaro-input:focus,
.dookaro-textarea:focus {
    outline: none !important;
    border: 1px solid rgba(255, 255, 255, 0.10) !important;
    background: #2e2f34 !important;
    box-shadow: none !important;
    transform: none;
}

.dookaro-input::placeholder,
.dookaro-textarea::placeholder {
    color: rgba(255, 255, 255, 0.6) !important;
    opacity: 1 !important;
}

/* Character Counter */
.dookaro-char-counter {
    text-align: right;
    margin-top: 6px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    order: 3;
}

.dookaro-current-chars {
    color: #dad864;
    font-weight: 600;
}



/* Modal Footer */
.dookaro-simple-modal-footer {
    padding: 20px 24px;
    background: linear-gradient(135deg, #1e1f23 0%, #18191d 100%);
    border-top: 1px solid rgba(218, 216, 100, 0.1);
    box-shadow: 0 -1px 10px rgba(0, 0, 0, 0.2);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.dookaro-btn {
    padding: 12px 20px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    min-width: 100px;
    justify-content: center;
}

.dookaro-btn.primary {
    background: linear-gradient(135deg, #dad864 0%, #b8b652 100%);
    color: #1e1f23;
    box-shadow: 0 4px 12px rgba(218, 216, 100, 0.3);
}

.dookaro-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(218, 216, 100, 0.4);
}

.dookaro-btn.secondary {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.dookaro-btn.secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

/* Loading State */
.dookaro-btn.loading {
    position: relative;
    color: transparent;
    pointer-events: none;
}

.dookaro-btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid transparent;
    border-top: 2px solid #1e1f23;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Mobile Responsive for Simple Modal */
@media (max-width: 768px) {
    .dookaro-simple-modal-container {
        width: 95%;
        max-width: none;
        margin: 20px;
    }
    
    .dookaro-modern-avatar-image,
    .dookaro-modern-avatar-placeholder {
        width: 90px;
        height: 90px;
    }
    
    .dookaro-modern-avatar-placeholder {
        font-size: 32px;
    }
    
    .dookaro-upload-btn {
        font-size: 13px;
        padding: 8px 14px;
        min-width: 110px;
    }
    
    .dookaro-upload-btn svg {
        width: 14px;
        height: 14px;
    }
    
    .dookaro-simple-modal-footer {
        flex-direction: column;
        gap: 10px;
    }
    
    .dookaro-btn {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .dookaro-simple-modal-container {
        width: 100vw !important;
        height: 100vh !important;
        max-width: 100vw !important;
        max-height: 100vh !important;
        border-radius: 0 !important;
        margin: 0 !important;
    }
    
    .dookaro-simple-modal {
        padding: 0 !important;
    }
    
    .dookaro-modern-avatar-image,
    .dookaro-modern-avatar-placeholder {
        width: 70px !important;
        height: 70px !important;
    }
    
    .dookaro-modern-avatar-placeholder {
        font-size: 24px !important;
    }
    
    .dookaro-upload-btn {
        font-size: 12px;
        padding: 6px 10px;
        min-width: 90px;
    }
    
    .dookaro-upload-btn svg {
        width: 12px;
        height: 12px;
    }
    
    .dookaro-remove-avatar-link {
        font-size: 11px;
    }
}





/* Responsive Design for Customization Modal */
@media (max-width: 768px) {
    #dookaro-customization-modal .dookaro-modal-content {
        width: 95%;
        max-height: 90vh;
    }
    
    .dookaro-customization-section {
        padding: 15px;
        margin-bottom: 16px;
    }
}

/* Image Generation Button Styles */
.dookaro-image-generation-button {
    background: none;
    border: none;
    outline: none;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 50%;
    color: #6c757d;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 5px;
    transition: all 0.2s ease;
}

.dookaro-image-generation-button:hover {
    background-color: rgba(102, 126, 234, 0.1);
    color: #667eea;
    transform: translateY(-1px);
}

.dookaro-image-generation-button:active {
    transform: translateY(0);
}

/* Image Generation Modal Styles */
#dookaro-image-generation-modal .dookaro-modal-content {
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
}

#dookaro-image-generation-modal .dookaro-modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-bottom: none;
    border-radius: 12px 12px 0 0;
}

#dookaro-image-generation-modal .dookaro-modal-header h3 {
    color: white;
    display: flex;
    align-items: center;
    gap: 8px;
}

#dookaro-image-generation-modal .dookaro-modal-header h3::before {
    content: "👑";
    font-size: 20px;
}

#dookaro-image-generation-modal .dookaro-modal-close {
    color: white;
    opacity: 0.8;
}

#dookaro-image-generation-modal .dookaro-modal-close:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.1);
}

.dookaro-image-generation-intro {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid #e9ecef;
    border-right: 4px solid #667eea;
}

.dookaro-image-generation-intro p {
    margin: 0;
    color: #495057;
    line-height: 1.6;
}

.dookaro-credits-info {
    background: rgba(102, 126, 234, 0.1);
    border-radius: 8px;
    padding: 15px;
    margin-top: 20px;
}

.dookaro-credits-info p {
    margin: 5px 0;
    color: #495057;
}

#dookaro-generated-image {
    transition: all 0.3s ease;
    border-radius: 4px;
}

#dookaro-generated-image:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design for Image Generation */
@media (max-width: 768px) {
    #dookaro-image-generation-modal .dookaro-modal-content {
        width: 95%;
        max-height: 90vh;
    }
    
    #dookaro-image-generation-modal .dookaro-modal-header {
        padding: 15px;
    }
    
    #dookaro-image-generation-modal .dookaro-modal-body {
        padding: 15px;
    }
    
    .dookaro-image-generation-intro {
        padding: 10px;
    }
    
    .dookaro-credits-info {
        padding: 10px;
    }
}

/* Help Modal Styles - Optimized */
.dookaro-help-intro {
    background: rgba(218, 216, 100, 0.1);
    border: 1px solid rgba(218, 216, 100, 0.3);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
}

.dookaro-help-intro p {
    margin: 0;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
    font-size: 0.95rem;
    text-align: center;
}

.dookaro-help-quick-steps {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.dookaro-quick-step {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.dookaro-quick-step:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(218, 216, 100, 0.3);
    transform: translateY(-1px);
}

.dookaro-step-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #dad864, #c7c45a);
    border-radius: 50%;
    color: #1a1a1a;
    font-weight: 700;
    font-size: 0.9rem;
    flex-shrink: 0;
    margin-top: 0.2rem;
}

.dookaro-step-content h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1rem;
    font-weight: 600;
    color: #ffffff;
}

.dookaro-step-content p {
    margin: 0;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.5;
    font-size: 0.9rem;
}



/* Tips List */
.dookaro-help-tips {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.dookaro-help-tip {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.dookaro-help-tip:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(218, 216, 100, 0.2);
}

.dookaro-tip-bullet {
    color: #dad864;
    font-weight: bold;
    font-size: 1.2rem;
    flex-shrink: 0;
    margin-top: 0.1rem;
}

.dookaro-help-tip p {
    margin: 0;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.5;
    font-size: 0.9rem;
}

/* Support Section */
.dookaro-support-info p {
    margin: 0 0 1rem 0;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.5;
}

.dookaro-contact-methods {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.dookaro-contact-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: rgba(218, 216, 100, 0.1);
    border: 1px solid rgba(218, 216, 100, 0.3);
    border-radius: 8px;
    color: #dad864;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.dookaro-contact-link:hover {
    background: rgba(218, 216, 100, 0.15);
    border-color: rgba(218, 216, 100, 0.5);
    color: #dad864;
    text-decoration: none;
    transform: translateY(-1px);
}

.dookaro-contact-link svg {
    flex-shrink: 0;
}

/* Help Modal Responsive */
@media (max-width: 768px) {
    .dookaro-help-intro {
        padding: 0.875rem 1rem;
        margin-bottom: 1.25rem;
    }
    
    .dookaro-help-intro p {
        font-size: 0.9rem;
    }
    
    .dookaro-quick-step {
        padding: 0.875rem;
        gap: 0.75rem;
    }
    
    .dookaro-step-number {
        width: 28px;
        height: 28px;
        font-size: 0.8rem;
    }
    
    .dookaro-step-content h4 {
        font-size: 0.95rem;
    }
    
    .dookaro-step-content p {
        font-size: 0.85rem;
    }
    
    .dookaro-help-tip {
        padding: 0.625rem 0.875rem;
        gap: 0.5rem;
    }
    
    .dookaro-help-tip p {
        font-size: 0.85rem;
    }
    
    .dookaro-contact-link {
        padding: 0.625rem 0.875rem;
        font-size: 0.85rem;
    }
}

/* Notification animations for Customization modal */
@keyframes slideInRight {
    0% {
        transform: translateX(100%);
        opacity: 0;
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    0% {
        transform: translateX(0);
        opacity: 1;
    }
    100% {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* My Subscription Modal - Simple Styling */
#dookaro-subscription-details-modal .dookaro-subscription-type,
#dookaro-subscription-details-modal .dookaro-subscription-status,
#dookaro-subscription-details-modal .dookaro-usage-count,
#dookaro-subscription-details-modal .dookaro-usage-remaining,
#dookaro-subscription-details-modal .dookaro-subscription-date,
#dookaro-subscription-details-modal .dookaro-subscription-renewal {
    color: #dad864;
    font-weight: 500;
}

#dookaro-subscription-details-modal .dookaro-subscription-error {
    text-align: center;
    padding: 40px 20px;
    color: rgba(255, 255, 255, 0.8);
}

#dookaro-subscription-details-modal .dookaro-subscription-error svg {
    color: #ff6b6b;
    margin-bottom: 16px;
}

#dookaro-subscription-details-modal .dookaro-subscription-error h4 {
    color: #fff;
    margin: 0 0 8px 0;
    font-size: 18px;
    font-weight: 600;
}

#dookaro-subscription-details-modal .dookaro-subscription-error p {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
}

#dookaro-subscription-details-modal .dookaro-loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
}

#dookaro-subscription-details-modal .dookaro-loading-spinner .spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(218, 216, 100, 0.2);
    border-top: 3px solid #dad864;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

/* CSS to hide/show user avatars based on admin setting */
.dookaro-hide-user-avatars .dookaro-user-message .dookaro-message-avatar {
    display: none !important;
}

.dookaro-hide-user-avatars .dookaro-user-message .dookaro-message-content {
    margin-right: 0 !important;
}

/* Subscription Restriction Styles */
.dookaro-subscription-restriction {
    background: linear-gradient(135deg, #f8f9fa 0%, #fff 100%);
    border: 2px solid #ff6b6b;
    border-radius: 12px;
    padding: 40px 30px;
    text-align: center;
    margin-bottom: 20px;
}

.dookaro-restriction-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.dookaro-restriction-icon {
    animation: pulseRestriction 2s ease-in-out infinite;
}

@keyframes pulseRestriction {
    0%, 100% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.1); opacity: 1; }
}

.dookaro-restriction-title {
    color: #ff6b6b;
    font-size: 24px;
    font-weight: 700;
    margin: 0;
}

.dookaro-restriction-message {
    color: #666;
    font-size: 16px;
    line-height: 1.6;
    margin: 0;
    max-width: 400px;
}

.dookaro-restriction-features {
    background: rgba(255, 107, 107, 0.05);
    border: 1px solid rgba(255, 107, 107, 0.2);
    border-radius: 8px;
    padding: 20px;
    text-align: right;
    width: 100%;
    max-width: 300px;
}

.dookaro-restriction-features h4 {
    color: #ff6b6b;
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 15px 0;
}

.dookaro-restriction-features ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.dookaro-restriction-features li {
    color: #555;
    font-size: 14px;
    padding: 5px 0;
    position: relative;
    padding-right: 20px;
}

.dookaro-restriction-features li:before {
    content: "✓";
    color: #4caf50;
    font-weight: bold;
    position: absolute;
    right: 0;
    top: 5px;
}

.dookaro-restriction-actions {
    display: flex;
    justify-content: center;
    width: 100%;
}

#upgrade-subscription-from-attachment {
    background: linear-gradient(135deg, #ff6b6b 0%, #ff8e8e 100%);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

#upgrade-subscription-from-attachment:hover {
    background: linear-gradient(135deg, #ff5252 0%, #ff7979 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.3);
}

#upgrade-subscription-from-attachment:active {
    transform: translateY(0);
}

@media (max-width: 768px) {
    .dookaro-subscription-restriction {
        padding: 30px 20px;
        margin-bottom: 15px;
    }
    
    .dookaro-restriction-title {
        font-size: 20px;
    }
    
    .dookaro-restriction-message {
        font-size: 14px;
    }
    
    .dookaro-restriction-features {
        padding: 15px;
        max-width: 100%;
    }
    
    .dookaro-restriction-features h4 {
        font-size: 14px;
        margin-bottom: 10px;
    }
    
    .dookaro-restriction-features li {
        font-size: 13px;
    }
    
    #upgrade-subscription-from-attachment {
        padding: 10px 25px;
        font-size: 14px;
    }
}