* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background: white;
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header Styles */
.header {
    text-align: center;
    margin-bottom: 30px;
    background: rgba(255, 255, 255, 0.95);
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 10px;
}

.logo i {
    font-size: 2.5rem;
    color: #ff6b35;
}

.logo h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #ff6b35;
}

.subtitle {
    color: #666;
    font-size: 1.1rem;
    font-weight: 400;
}

/* Navigation Menu */
.nav-menu {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.nav-btn {
    background: rgba(255, 255, 255, 0.9);
    border: none;
    padding: 15px 25px;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.nav-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.nav-btn.active {
    background: #ff6b35;
    color: white;
}

.nav-btn i {
    font-size: 1.2rem;
}

/* Main Content */
.main-content {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    min-height: 500px;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Chat Styles */
.chat-container {
    height: 500px;
    display: flex;
    flex-direction: column;
}

.chat-header {
    display: flex;
    justify-content: flex-end;
    padding: 10px 0;
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 10px;
}

.clear-history-btn {
    background: #ff4757;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
}

.clear-history-btn:hover {
    background: #ff3742;
    transform: translateY(-1px);
}

.clear-history-btn i {
    font-size: 11px;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px 0;
    margin-bottom: 20px;
}

.message {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    animation: fadeInUp 0.3s ease;
}

.message-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.bot-message .message-avatar {
    background: #ff6b35;
    color: white;
}

.user-message {
    flex-direction: row-reverse;
}

.user-message .message-avatar {
    background: #f0f0f0;
    color: #333;
}

.message-content {
    background: #f8f9fa;
    padding: 15px 20px;
    border-radius: 20px;
    max-width: 70%;
    word-wrap: break-word;
    color: #333;
}

.user-message .message-content {
    background: #ff6b35;
    color: white;
}

.bot-message .message-content {
    color: #333;
}

.chat-input-container {
    display: flex;
    gap: 10px;
    align-items: center;
}

#chatInput {
    flex: 1;
    padding: 15px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s ease;
}

#chatInput:focus {
    border-color: #ff6b35;
}

#sendBtn {
    background: #ff6b35;
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

#sendBtn:hover {
    transform: scale(1.1);
}

/* Image Analysis Styles */
.upload-section {
    margin-bottom: 30px;
}

.upload-area {
    border: 3px dashed #ff6b35;
    border-radius: 20px;
    padding: 60px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(255, 107, 53, 0.05);
}

.upload-area:hover {
    background: rgba(255, 107, 53, 0.1);
    transform: translateY(-2px);
}

.upload-area i {
    font-size: 3rem;
    color: #ff6b35;
    margin-bottom: 15px;
}

.upload-area h3 {
    color: #333;
    margin-bottom: 10px;
}

.upload-area p {
    color: #666;
}

.image-preview {
    position: relative;
    display: inline-block;
    margin-top: 20px;
}

.image-preview img {
    max-width: 300px;
    max-height: 300px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.remove-btn {
    position: absolute;
    top: -10px;
    right: -10px;
    background: #ff4757;
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.analysis-options {
    margin-bottom: 30px;
}

.analysis-options h3 {
    margin-bottom: 20px;
    color: #333;
}

.option-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.option-btn {
    background: rgba(255, 107, 53, 0.1);
    border: 2px solid #ff6b35;
    padding: 15px 25px;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
}

.option-btn:hover,
.option-btn.active {
    background: #ff6b35;
    color: white;
}

.analyze-btn {
    background: #ff6b35;
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 15px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    margin-bottom: 30px;
}

.analyze-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.analyze-btn:disabled.btn-loading {
    background: #ff6b35;
    cursor: not-allowed;
}

.analyze-btn:not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.analysis-result {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 15px;
    border-left: 5px solid #ff6b35;
    line-height: 1.6;
}

.analysis-result h3 {
    margin-bottom: 15px;
    color: #333;
}

.analysis-result .result-title {
    font-weight: bold;
    font-size: 1.2rem;
    color: #ff6b35;
    margin: 20px 0 10px 0;
    display: block;
}

.analysis-result .section-title {
    font-weight: bold;
    color: #333;
    margin: 15px 0 8px 0;
    display: block;
}

.analysis-result .content-item {
    margin: 8px 0;
    padding-left: 15px;
    position: relative;
}

.analysis-result .content-item:before {
    content: "•";
    color: #ff6b35;
    font-weight: bold;
    position: absolute;
    left: 0;
}

.analysis-result .highlight {
    font-weight: bold;
    color: #333;
}

/* UGC Generator Styles */
.ugc-form {
    margin-bottom: 30px;
}

.ugc-form h3 {
    margin-bottom: 25px;
    color: #333;
    font-size: 1.5rem;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
    border-color: #ff6b35;
}

.platform-options {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.checkbox-label:hover {
    border-color: #ff6b35;
}

.checkbox-label input:checked + i {
    color: #ff6b35;
}

.platform-checkbox {
    display: none;
}

.checkbox-label i {
    font-size: 1.2rem;
}

.generate-btn {
    background: #ff6b35;
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 15px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.generate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.ugc-result {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 15px;
    border-left: 5px solid #ff6b35;
}

.ugc-result h3 {
    margin-bottom: 20px;
    color: #333;
}

.result-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.result-tab {
    background: rgba(255, 107, 53, 0.1);
    border: 2px solid #ff6b35;
    padding: 10px 20px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.result-tab.active {
    background: #ff6b35;
    color: white;
}

.result-content-ugc {
    background: white;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    white-space: pre-wrap;
    line-height: 1.6;
}

.copy-btn {
    background: #28a745;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.copy-btn:hover {
    background: #218838;
}

/* Button Loading Animations */
.btn-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

.btn-loading::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid transparent;
    border-top: 2px solid #fff;
    border-radius: 50%;
    animation: btn-spin 1s linear infinite;
    z-index: 1;
}

.btn-loading .btn-text {
    opacity: 0;
}

@keyframes btn-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Specific button loading styles */
#sendBtn.btn-loading::before,
.analyze-btn.btn-loading::before,
.generate-btn.btn-loading::before {
    border-top-color: #fff;
}

.option-btn.btn-loading::before {
    border-top-color: #ff6b35;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .header {
        padding: 20px;
    }
    
    .logo h1 {
        font-size: 2rem;
    }
    
    .nav-menu {
        flex-direction: column;
        align-items: center;
    }
    
    .nav-btn {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }
    
    .main-content {
        padding: 20px;
    }
    
    .option-buttons {
        flex-direction: column;
    }
    
    .option-btn {
        justify-content: center;
    }
    
    .platform-options {
        flex-direction: column;
    }
    
    .result-tabs {
        flex-direction: column;
    }
    
    .message-content {
        max-width: 85%;
    }
}

@media (max-width: 480px) {
    .logo {
        flex-direction: column;
        gap: 10px;
    }
    
    .logo h1 {
        font-size: 1.8rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .chat-container {
        height: 400px;
    }
    
    .upload-area {
        padding: 40px 15px;
    }
    
    .upload-area i {
        font-size: 2rem;
    }
    
    .footer {
        padding: 20px 15px;
        margin-top: 30px;
    }
    
    .footer-content p {
        font-size: 0.9rem;
    }
    
    .footer-subtitle {
        font-size: 0.8rem;
    }
}

/* UGC Image Upload Styles */
.ugc-upload-section {
    margin-top: 10px;
}

.ugc-upload-area {
    border: 2px dashed #ff6b35;
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(255, 107, 53, 0.05);
}

.ugc-upload-area:hover {
    border-color: #e55a2b;
    background: rgba(255, 107, 53, 0.1);
    transform: translateY(-2px);
}

.ugc-upload-area i {
    font-size: 2.5rem;
    color: #ff6b35;
    margin-bottom: 15px;
}

.ugc-upload-area h4 {
    color: #333;
    margin-bottom: 8px;
    font-weight: 600;
}

.ugc-upload-area p {
    color: #666;
    font-size: 0.9rem;
}

.ugc-image-preview {
    position: relative;
    margin-top: 15px;
    border-radius: 15px;
    overflow: hidden;
    background: #f8f9fa;
    padding: 15px;
}

.ugc-image-preview img {
    width: 100%;
    max-height: 300px;
    object-fit: contain;
    border-radius: 10px;
    margin-bottom: 15px;
}

.analyze-ugc-btn {
    background: linear-gradient(135deg, #ff6b35, #f7931e);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 10px auto 0;
    font-size: 0.95rem;
}

.analyze-ugc-btn:hover {
    background: linear-gradient(135deg, #e55a2b, #e8851a);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 107, 53, 0.3);
}

.analyze-ugc-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.analyze-ugc-btn.btn-loading {
    background: #ccc;
    cursor: not-allowed;
}

.analyze-ugc-btn.btn-loading .btn-text {
    opacity: 0.7;
}

.analyze-ugc-btn.btn-loading::after {
        content: '';
        position: absolute;
        width: 16px;
        height: 16px;
        border: 2px solid transparent;
        border-top: 2px solid #fff;
        border-radius: 50%;
        animation: btn-spin 1s linear infinite;
        margin-left: 10px;
    }

/* Footer Styles */
.footer {
    background: white;
    color: #333;
    text-align: center;
    padding: 30px 20px;
    margin-top: 50px;
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.1);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-content p {
    margin: 0;
    font-size: 1rem;
    font-weight: 500;
}

.footer-content a {
    color: #ff6b35;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.footer-content a:hover {
    color: #f7931e;
    text-shadow: 0 0 10px rgba(255, 107, 53, 0.3);
}

.footer-subtitle {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-top: 8px !important;
    font-weight: 400;
}

/* Chat Message Formatting */
.section-header {
    font-weight: 700;
    color: #ff6b35;
    margin: 10px 0 6px 0;
    font-size: 1.05rem;
    border-left: 3px solid #ff6b35;
    background: rgba(255, 107, 53, 0.05);
    padding: 8px 12px;
    border-radius: 6px;
    display: block;
}

.section-subheader {
    font-weight: 600;
    color: #333;
    margin: 8px 0 4px 0;
    font-size: 0.95rem;
    padding: 4px 8px;
    background: rgba(51, 51, 51, 0.05);
    border-radius: 4px;
    display: block;
}

.content-item {
    margin: 6px 0;
    padding: 6px 10px;
    background: #f8f9fa;
    border-radius: 4px;
    border-left: 2px solid #e9ecef;
    display: block;
    line-height: 1.5;
}

.content-item .label {
    font-weight: 600;
    color: #495057;
    display: inline;
}

.bullet-item {
    margin: 4px 0;
    padding: 2px 0 2px 16px;
    color: #495057;
    line-height: 1.5;
    display: block;
    position: relative;
}

.bullet-item::before {
    content: "•";
    position: absolute;
    left: 0;
    color: #ff6b35;
    font-weight: bold;
}

.list-item {
    margin: 6px 0;
    padding: 4px 0;
    color: #333;
    line-height: 1.5;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.list-item i {
    color: #28a745;
    font-size: 12px;
    margin-top: 3px;
    flex-shrink: 0;
}

.list-item .label {
    font-weight: 600;
    color: #495057;
    margin-right: 4px;
}

.content-text {
    margin: 6px 0;
    line-height: 1.5;
    color: #333;
    display: block;
    padding: 2px 0;
}

/* Add spacing for message content */
.message-content {
    line-height: 1.5;
}

.message-content > div:first-child {
    margin-top: 0;
}

.message-content > div:last-child {
    margin-bottom: 0;
}

/* ------------------------------------------------------------------
   WordPress Theme Guard: pastikan gaya tidak ditimpa tema WordPress
   Dengan meningkatkan spesifisitas pada .container dan memberi !important
   ------------------------------------------------------------------ */
.container * {
    font-family: 'Poppins', sans-serif !important;
}

/* Preserve Font Awesome icon fonts inside the container */
.container .fas,
.container .fa-solid,
.container i.fas,
.container i.fa-solid {
    font-family: 'Font Awesome 6 Free' !important;
    font-weight: 900 !important;
}

.container .far,
.container .fa-regular,
.container i.far,
.container i.fa-regular {
    font-family: 'Font Awesome 6 Free' !important;
    font-weight: 400 !important;
}

.container .fab,
.container .fa-brands,
.container i.fab,
.container i.fa-brands {
    font-family: 'Font Awesome 6 Brands' !important;
    font-weight: 400 !important;
}

.container .nav-btn {
    background: rgba(255, 255, 255, 0.9) !important;
    border: none !important;
    padding: 15px 25px !important;
    border-radius: 15px !important;
    color: #333 !important;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1) !important;
}
.container .nav-btn:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15) !important;
}
.container .nav-btn.active {
    background: #ff6b35 !important;
    color: #fff !important;
}

.container .clear-history-btn {
    background: #ff4757 !important;
    color: #fff !important;
    border: none !important;
    border-radius: 6px !important;
}

.container #chatInput {
    background: #fff !important;
    color: #333 !important;
    border: 2px solid #e0e0e0 !important;
    border-radius: 25px !important;
}
.container #chatInput:focus {
    border-color: #ff6b35 !important;
}

.container #sendBtn {
    background: #ff6b35 !important;
    color: #fff !important;
    border: none !important;
}

.container .message-content {
    background: #f8f9fa !important;
    color: #333 !important;
}
.container .user-message .message-content {
    background: #ff6b35 !important;
    color: #fff !important;
}
.container .bot-message .message-content {
    color: #333 !important;
}

.container .option-btn {
    background: rgba(255, 107, 53, 0.1) !important;
    border: 2px solid #ff6b35 !important;
    color: #333 !important;
}
.container .option-btn:hover,
.container .option-btn.active {
    background: #ff6b35 !important;
    color: #fff !important;
}

.container .analyze-btn,
.container .generate-btn,
.container .copy-btn {
    background: #ff6b35 !important;
    color: #fff !important;
    border: none !important;
}
.container .copy-btn {
    background: #28a745 !important;
}

.container .result-tab {
    background: rgba(255, 107, 53, 0.1) !important;
    border: 2px solid #ff6b35 !important;
    color: #333 !important;
}
.container .result-tab.active {
    background: #ff6b35 !important;
    color: #fff !important;
}

.container .list-item,
.container .content-text,
.container .content-item,
.container .bullet-item {
    color: #333 !important;
}
.container .bullet-item::before {
    color: #ff6b35 !important;
}