/* SimuSoul Plugin Styles - Updated for Caption Generation */

/* ===== FULLPAGE BODY STYLES ===== */
body.simusoul-fullpage {
    margin: 0 !important;
    padding: 0 !important;
    background: #f5f5f5 !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    min-height: 100vh;
}

body.simusoul-fullpage * {
    box-sizing: border-box;
}

/* ===== HEADER STYLES ===== */
#simusoul-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px 0;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.simusoul-header-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.simusoul-logo h1 {
    color: white;
    margin: 0;
    font-size: 32px;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    letter-spacing: 1px;
    transition: transform 0.3s ease;
}

.simusoul-logo .tagline {
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    font-weight: 400;
    display: block;
    margin-top: 5px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.simusoul-user-info {
    color: white;
    font-size: 16px;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.15);
    padding: 8px 16px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Logout Button Styles */
.logout-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.logout-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-1px);
}

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

/* ===== MAIN CONTAINER ===== */
#simusoul-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px 20px 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ===== LOGIN & REGISTER FORMS ===== */
#simusoul-login-form,
#simusoul-register-form {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

#simusoul-login-form::before {
    content: "Welcome back! Please login to continue.";
    display: block;
    text-align: center;
    color: #666;
    font-size: 14px;
    margin-bottom: 20px;
    font-style: italic;
}

#simusoul-register-form::before {
    content: "Join SimuSoul and start creating amazing captions!";
    display: block;
    text-align: center;
    color: #666;
    font-size: 14px;
    margin-bottom: 20px;
    font-style: italic;
}

#simusoul-login-form input,
#simusoul-register-form input {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    box-sizing: border-box;
}

#simusoul-login-form button,
#simusoul-register-form button {
    width: 100%;
    padding: 12px;
    background: #0073aa;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
}

#simusoul-login-form button:hover,
#simusoul-register-form button:hover {
    background: #005a87;
}

#simusoul-login-form p,
#simusoul-register-form p {
    text-align: center;
    margin-top: 15px;
}

#simusoul-login-form a,
#simusoul-register-form a {
    color: #0073aa;
    text-decoration: none;
    cursor: pointer;
}

#simusoul-login-form a:hover,
#simusoul-register-form a:hover {
    text-decoration: underline;
}

/* ===== DASHBOARD ===== */
#simusoul-dashboard {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* ===== CAPTION GENERATION FORM ===== */
#simusoul-create-request {
    background: linear-gradient(135deg, #f8f9ff 0%, #e8f4f8 100%);
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 30px;
    border: 1px solid #e1e8ed;
}

#simusoul-create-request h4 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 20px;
    font-weight: 600;
}

#simusoul-create-request p {
    margin: 0 0 20px 0;
    color: #666;
    font-size: 14px;
}

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

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

#simusoul-caption-form input[type="file"],
#simusoul-caption-form select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    font-size: 16px;
    background: white;
    transition: border-color 0.3s ease;
}

#simusoul-caption-form input[type="file"]:focus,
#simusoul-caption-form select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

#simusoul-caption-form select {
    cursor: pointer;
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: #888;
    font-size: 12px;
}

#simusoul-caption-form button {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

#simusoul-caption-form button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

#simusoul-caption-form button:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ===== CAPTION REQUESTS LIST ===== */
#simusoul-caption-requests h4 {
    margin-bottom: 20px;
    color: #333;
    border-bottom: 2px solid #667eea;
    padding-bottom: 10px;
    font-size: 18px;
    font-weight: 600;
}

#requests-list {
    display: grid;
    gap: 25px;
}

.caption-request-item {
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.caption-request-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

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

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

.purpose-personal_sharing {
    background: #e3f2fd;
    color: #1976d2;
}

.purpose-promotional {
    background: #fff3e0;
    color: #f57c00;
}

.purpose-informational {
    background: #e8f5e8;
    color: #388e3c;
}

.purpose-humorous {
    background: #fff8e1;
    color: #f9a825;
}

.purpose-emotional {
    background: #fce4ec;
    color: #c2185b;
}

.request-header small {
    color: #999;
    font-size: 12px;
}

.request-image {
    width: 100%;
    max-height: 300px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* ===== CAPTIONS CONTAINER ===== */
.captions-container {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.captions-container h5 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 16px;
    font-weight: 600;
}

.caption-option {
    background: white;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 12px;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

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

.caption-option:last-child {
    margin-bottom: 0;
}

.caption-text {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 14px;
    line-height: 1.5;
    font-style: italic;
}

.copy-caption {
    background: #28a745;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.copy-caption:hover {
    background: #218838;
    transform: translateY(-1px);
}

.copy-caption:active {
    transform: translateY(0);
}

/* ===== STATUS MESSAGES ===== */
.captions-container.processing {
    border-left-color: #ffc107;
    background: #fff9c4;
}

.captions-container.error {
    border-left-color: #dc3545;
    background: #f8d7da;
}

.captions-container.pending {
    border-left-color: #6c757d;
    background: #f8f9fa;
}

.status-message {
    margin: 0;
    font-size: 14px;
    text-align: center;
    padding: 20px;
}

.no-captions {
    color: #999;
    font-style: italic;
    text-align: center;
    margin: 0;
}

/* ===== MESSAGES ===== */
#simusoul-message {
    margin-top: 20px;
    padding: 15px;
    border-radius: 8px;
    display: none;
    font-weight: 500;
}

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

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

/* ===== LOADING SPINNER ===== */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-radius: 50%;
    border-top-color: #667eea;
    animation: spin 1s ease-in-out infinite;
}

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

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .simusoul-header-content {
        padding: 0 10px;
        flex-direction: column;
        gap: 10px;
    }

    .simusoul-logo h1 {
        font-size: 28px;
    }

    .simusoul-user-info {
        font-size: 14px;
        padding: 6px 12px;
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }

    .logout-btn {
        font-size: 12px;
        padding: 4px 8px;
    }

    #simusoul-container {
        padding: 0 10px 20px 10px;
    }

    #simusoul-login-form,
    #simusoul-register-form,
    #simusoul-dashboard {
        padding: 20px;
    }

    #simusoul-create-request {
        padding: 20px;
    }

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

    .caption-option {
        padding: 12px;
    }

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

/* ===== UTILITY CLASSES ===== */
.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

.mb-20 {
    margin-bottom: 20px;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.caption-request-item {
    animation: fadeInUp 0.5s ease-out;
}

/* ===== COPY FEEDBACK ===== */
.copy-caption.copied {
    background: #17a2b8 !important;
    animation: pulse 0.6s ease-in-out;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* ===== GUEST USER STYLES ===== */

/* Guest Notice Banner */
#guest-notice {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 25px;
    border: 1px solid #90caf9;
    text-align: center;
}

#guest-notice h3 {
    margin: 0 0 10px 0;
    color: #1565c0;
    font-size: 20px;
    font-weight: 600;
}

#guest-notice p {
    margin: 0;
    color: #1976d2;
    font-size: 14px;
}

#guest-notice a {
    color: #0d47a1;
    font-weight: 600;
    text-decoration: none;
}

#guest-notice a:hover {
    text-decoration: underline;
}

/* Login Button in Header */
.login-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    display: inline-block;
}

.login-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-1px);
    color: white;
    text-decoration: none;
}

/* Temporary Results Section */
#temporary-results {
    background: #fff;
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 25px;
    border: 2px solid #4caf50;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.1);
}

#temporary-results h4 {
    margin: 0 0 20px 0;
    color: #2e7d32;
    border-bottom: 2px solid #4caf50;
    padding-bottom: 10px;
    font-size: 18px;
    font-weight: 600;
}

/* Temporary Caption Item */
.temp-caption-item {
    background: #f8fffe;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #c8e6c9;
    animation: fadeInUp 0.5s ease-out;
}

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

.temp-request-header small {
    color: #2e7d32;
    font-size: 12px;
    font-weight: 500;
    background: rgba(76, 175, 80, 0.1);
    padding: 3px 8px;
    border-radius: 10px;
}

/* Save Notice */
.save-notice {
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    padding: 15px 20px;
    border-radius: 8px;
    margin-top: 20px;
    border: 1px solid #ffcc02;
    text-align: center;
}

.save-notice p {
    margin: 0;
    color: #f57c00;
    font-size: 14px;
}

.save-notice a {
    color: #e65100;
    font-weight: 600;
    text-decoration: none;
}

.save-notice a:hover {
    text-decoration: underline;
}

/* Copy Button Enhanced */
.copy-caption.copied {
    background: #4caf50 !important;
    animation: pulse 0.6s ease-in-out;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* Mobile Responsive for Guest Elements */
@media (max-width: 768px) {
    #guest-notice {
        padding: 15px;
        margin-bottom: 20px;
    }
    
    #guest-notice h3 {
        font-size: 18px;
    }
    
    #guest-notice p {
        font-size: 13px;
    }
    
    .temp-request-header {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
    
    .temp-request-header small {
        align-self: flex-end;
    }
    
    .save-notice {
        padding: 12px 15px;
    }
    
    .save-notice p {
        font-size: 13px;
    }
}

/* Guest User Indicator */
.simusoul-user-info span:contains("Guest User") {
    background: rgba(255, 255, 255, 0.1);
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Warning Notice for Temporary Content */
.temp-warning {
    background: #fff8e1;
    border: 1px solid #ffcc02;
    border-radius: 8px;
    padding: 10px 15px;
    margin-bottom: 15px;
    font-size: 13px;
    color: #f57c00;
    text-align: center;
}

.temp-warning::before {
    content: "⚠️ ";
    font-size: 14px;
}

/* Enhanced Animation for Guest Results */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#temporary-results {
    animation: slideInUp 0.6s ease-out;
}

/* ===== GUEST USER STYLES - Add to END of style.css ===== */

/* Guest Notice Banner */
#guest-notice {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 25px;
    border: 1px solid #90caf9;
    text-align: center;
}

#guest-notice h3 {
    margin: 0 0 10px 0;
    color: #1565c0;
    font-size: 20px;
    font-weight: 600;
}

#guest-notice p {
    margin: 0;
    color: #1976d2;
    font-size: 14px;
}

#guest-notice a {
    color: #0d47a1;
    font-weight: 600;
    text-decoration: none;
}

#guest-notice a:hover {
    text-decoration: underline;
}

/* Login Button in Header */
.login-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    display: inline-block;
}

#temporary-results {
    background: #fff;
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 25px;
    border: 2px solid #4caf50;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.1);
    animation: slideInUp 0.6s ease-out;
}

.temp-caption-item {
    background: #f8fffe;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #c8e6c9;
}

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

.save-notice {
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    padding: 15px 20px;
    border-radius: 8px;
    margin-top: 20px;
    border: 1px solid #ffcc02;
    text-align: center;
}

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