:root {
    --primary: #1a1a1a;
    --secondary: #2a2a2a;
    --accent: #ff4757;
    --gemini-color: #6e6eff;
    --tracemoe-color: #ff7b54;
    --googlelens-color: #4285F4;
    --text-primary: #ffffff;
    --text-secondary: #b3b3b3;
    --border: #333333;
    --card-bg: #222222;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--primary);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    flex: 1;
}

/* Header dengan layout yang lebih rapi */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: linear-gradient(135deg, rgba(255, 71, 87, 0.05), rgba(255, 107, 129, 0.05));
    border-radius: 12px;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
}

.logo i {
    font-size: 2rem;
    color: var(--accent);
}

.logo h1 {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0;
    background: linear-gradient(135deg, var(--accent), #ff6b81);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tagline-section {
    text-align: center;
    margin-bottom: 2rem;
}

.tagline {
    color: var(--text-secondary);
    margin: 0;
    font-size: 0.95rem;
    font-weight: 400;
}

.header-actions {
    display: flex;
    gap: 0.8rem;
    align-items: center;
}

.hamburger-btn {
    background-color: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border);
    padding: 0.8rem;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hamburger-btn:hover {
    background-color: var(--accent);
    border-color: var(--accent);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 71, 87, 0.2);
}

/* Sidebar Styles */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(2px);
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

.sidebar {
    position: fixed;
    top: 0;
    right: -350px;
    width: 350px;
    height: 100vh;
    background-color: var(--secondary);
    z-index: 999;
    transition: right 0.3s ease;
    box-shadow: -5px 0 20px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
}

.sidebar.active {
    right: 0;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border);
    background: linear-gradient(135deg, rgba(255, 71, 87, 0.1), rgba(255, 107, 129, 0.1));
}

.sidebar-header h3 {
    margin: 0;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
}

.sidebar-header h3 i {
    color: var(--accent);
}

.sidebar-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.sidebar-close:hover {
    background-color: var(--border);
    color: var(--text-primary);
}

.sidebar-content {
    flex: 1;
    padding: 1.5rem 0;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.sidebar-nav {
    padding: 0 1rem;
    margin-bottom: 2rem;
}

.sidebar-item {
    width: 100%;
    background: none;
    border: none;
    color: var(--text-primary);
    padding: 1rem 1.5rem;
    border-radius: 8px;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
    position: relative;
    text-align: left;
}

.sidebar-item:hover {
    background-color: var(--border);
    transform: translateX(5px);
}

.sidebar-item.active {
    background-color: var(--accent);
    color: white;
}

.sidebar-item i {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

.sidebar-item span {
    flex: 1;
    font-weight: 500;
}

.sidebar-item.secondary {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.sidebar-item.secondary:hover {
    color: var(--text-primary);
}

.sidebar-badge {
    background-color: var(--accent);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    min-width: 20px;
    text-align: center;
}

.sidebar-section {
    padding: 0 1rem;
    margin-bottom: 2rem;
}

.sidebar-section h4 {
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 1rem 1.5rem;
}

.sidebar-footer {
    margin-top: auto;
    padding: 1.5rem 2rem;
    border-top: 1px solid var(--border);
}

.app-info {
    text-align: center;
}

.app-info small {
    display: block;
    color: var(--text-secondary);
    font-size: 0.75rem;
    line-height: 1.4;
}

.app-info small:first-child {
    font-weight: 600;
    color: var(--accent);
}

/* Fallback untuk header lama */
header {
    text-align: center;
    margin-bottom: 2rem;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.logo i {
    font-size: 2.5rem;
    color: var(--accent);
}

h1 {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(45deg, var(--accent), #ff6b81);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.tagline {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.search-options {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.search-option {
    background-color: var(--secondary);
    color: var(--text-primary);
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.search-option.active {
    background-color: var(--accent);
}

.search-option:hover:not(.active) {
    background-color: var(--border);
}

.input-tabs {
    display: flex;
    justify-content: center;
    gap: 0;
    margin-bottom: 1rem;
    background-color: var(--secondary);
    border-radius: 8px;
    padding: 0.3rem;
}

.tab-btn {
    background-color: transparent;
    color: var(--text-secondary);
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    justify-content: center;
}

.tab-btn.active {
    background-color: var(--accent);
    color: white;
}

.tab-btn:hover:not(.active) {
    background-color: var(--border);
    color: var(--text-primary);
}

.url-container {
    background-color: var(--secondary);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    margin-bottom: 2rem;
}

.url-input-area {
    text-align: center;
}

.url-input-area i {
    font-size: 3rem;
    color: var(--accent);
    margin-bottom: 1rem;
}

.url-input-area h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.url-input-area p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.url-input-group {
    display: flex;
    gap: 1rem;
    max-width: 600px;
    margin: 0 auto;
}

#urlInput {
    flex: 1;
    padding: 1rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    background-color: var(--primary);
    color: var(--text-primary);
    font-size: 1rem;
}

#urlInput:focus {
    outline: none;
    border-color: var(--accent);
}

.url-btn {
    background-color: var(--accent);
    color: white;
    border: none;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.url-btn:hover {
    background-color: #ff6b81;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 71, 87, 0.3);
}

.upload-options {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 1rem;
}

.upload-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

.upload-option:hover {
    color: var(--text-primary);
}

.upload-option input[type="radio"] {
    accent-color: var(--accent);
}

.upload-container {
    background-color: var(--secondary);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    margin-bottom: 2rem;
}

.upload-area {
    border: 2px dashed var(--border);
    border-radius: 8px;
    padding: 3rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.upload-area:hover {
    border-color: var(--accent);
    background-color: rgba(255, 71, 87, 0.05);
}

.upload-area i {
    font-size: 3rem;
    color: var(--accent);
    margin-bottom: 1rem;
}

.upload-area h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.upload-area p {
    color: var(--text-secondary);
}

#fileInput {
    display: none;
}

.preview-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.image-preview {
    width: 100%;
    max-width: 500px;
    height: 300px;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.image-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.search-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    width: 100%;
}

button {
    background-color: var(--accent);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 71, 87, 0.3);
}

.gemini-btn {
    background-color: var(--gemini-color);
}

.gemini-btn:hover {
    background-color: #8585ff;
    box-shadow: 0 5px 15px rgba(110, 110, 255, 0.3);
}

.tracemoe-btn {
    background-color: var(--tracemoe-color);
}

.tracemoe-btn:hover {
    background-color: #ff926b;
    box-shadow: 0 5px 15px rgba(255, 123, 84, 0.3);
}

.google-lens-btn {
    background-color: var(--googlelens-color);
}

.google-lens-btn:hover {
    background-color: #3367D6;
    box-shadow: 0 5px 15px rgba(66, 133, 244, 0.3);
}

.change-btn {
    background-color: transparent;
    border: 1px solid var(--border);
    color: var(--text-primary);
}

.change-btn:hover {
    background-color: var(--border);
    transform: none;
    box-shadow: none;
}

.crop-btn {
    background-color: var(--accent);
    color: white;
}

.crop-btn:hover {
    background-color: #ff6b81;
    box-shadow: 0 5px 15px rgba(255, 71, 87, 0.3);
}

.crop-btn.apply-crop {
    background-color: #4bb543;
}

.crop-btn.apply-crop:hover {
    background-color: #45a049;
    box-shadow: 0 5px 15px rgba(75, 181, 67, 0.3);
}

.crop-btn.reset-crop {
    background-color: var(--tracemoe-color);
}

.crop-btn.reset-crop:hover {
    background-color: #ff926b;
    box-shadow: 0 5px 15px rgba(255, 123, 84, 0.3);
}

.crop-btn.cancel-crop {
    background-color: transparent;
    border: 1px solid var(--border);
    color: var(--text-primary);
}

.crop-btn.cancel-crop:hover {
    background-color: var(--border);
    transform: none;
    box-shadow: none;
}

.crop-controls {
    background-color: var(--card-bg);
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1rem 0;
    border: 2px solid var(--accent);
}

.crop-header {
    text-align: center;
    margin-bottom: 1rem;
}

.crop-header h4 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.crop-header h4 i {
    color: var(--accent);
}

.crop-header p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.crop-area {
    position: relative;
    display: flex;
    justify-content: center;
    margin: 1rem 0;
    background-color: var(--primary);
    border-radius: 8px;
    overflow: hidden;
}

#cropCanvas {
    max-width: 100%;
    max-height: 400px;
    display: block;
}

.crop-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.crop-selection {
    position: absolute;
    border: 2px solid var(--accent);
    background-color: rgba(255, 71, 87, 0.1);
    cursor: move;
    pointer-events: all;
    min-width: 50px;
    min-height: 50px;
}

.crop-selection::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 1px dashed rgba(255, 255, 255, 0.5);
    pointer-events: none;
}

.crop-handle {
    position: absolute;
    width: 12px;
    height: 12px;
    background-color: var(--accent);
    border: 2px solid white;
    border-radius: 50%;
    pointer-events: all;
}

.crop-handle.top-left {
    top: -6px;
    left: -6px;
    cursor: nw-resize;
}

.crop-handle.top-right {
    top: -6px;
    right: -6px;
    cursor: ne-resize;
}

.crop-handle.bottom-left {
    bottom: -6px;
    left: -6px;
    cursor: sw-resize;
}

.crop-handle.bottom-right {
    bottom: -6px;
    right: -6px;
    cursor: se-resize;
}

.crop-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.results-container {
    background-color: var(--secondary);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 2rem;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.error {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 2rem;
    text-align: center;
}

.error i {
    font-size: 3rem;
    color: var(--accent);
}

.results {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.api-used {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.api-badge {
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.gemini-badge {
    background-color: rgba(110, 110, 255, 0.2);
    color: var(--gemini-color);
}

.tracemoe-badge {
    background-color: rgba(255, 123, 84, 0.2);
    color: var(--tracemoe-color);
}

.googlelens-badge {
    background-color: rgba(66, 133, 244, 0.2);
    color: var(--googlelens-color);
}

.confidence-badge {
    background-color: rgba(75, 181, 67, 0.2);
    color: #4bb543;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.result-card {
    background-color: var(--card-bg);
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

.result-image {
    width: 250px;
    flex-shrink: 0;
}

.result-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.result-info {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.meta-info {
    display: flex;
    gap: 1.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.meta-info span {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.synopsis {
    line-height: 1.6;
    color: var(--text-secondary);
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: auto;
}

.tag {
    background-color: rgba(255, 71, 87, 0.2);
    color: var(--accent);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.time-tag {
    background-color: rgba(101, 103, 107, 0.2);
    color: var(--text-secondary);
}

.confidence-tag {
    font-weight: 700;
}

.confidence-tag.high {
    background-color: rgba(75, 181, 67, 0.2);
    color: #4bb543;
}

.confidence-tag.medium {
    background-color: rgba(255, 165, 0, 0.2);
    color: #ffa500;
}

.confidence-tag.low {
    background-color: rgba(255, 107, 107, 0.2);
    color: #ff6b6b;
}

.method-tag {
    background-color: rgba(66, 133, 244, 0.2);
    color: var(--googlelens-color);
    font-weight: 700;
}

/* Enhanced Multi-Database Tags */
.sources-tag {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.2), rgba(118, 75, 162, 0.2));
    color: #667eea;
    border: 1px solid rgba(102, 126, 234, 0.3);
    font-weight: 600;
}

.studios-tag {
    background: linear-gradient(135deg, rgba(240, 147, 251, 0.2), rgba(245, 87, 108, 0.2));
    color: #f093fb;
    border: 1px solid rgba(240, 147, 251, 0.3);
    font-weight: 600;
}

.score-tag {
    font-weight: 700;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.score-tag.high {
    background: linear-gradient(135deg, rgba(75, 181, 67, 0.2), rgba(46, 125, 50, 0.2));
    color: #4bb543;
    border-color: rgba(75, 181, 67, 0.3);
}

.score-tag.medium {
    background: linear-gradient(135deg, rgba(255, 165, 0, 0.2), rgba(255, 143, 0, 0.2));
    color: #ffa500;
    border-color: rgba(255, 165, 0, 0.3);
}

.score-tag.low {
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.2), rgba(229, 62, 62, 0.2));
    color: #ff6b6b;
    border-color: rgba(255, 107, 107, 0.3);
}

/* Tag hover effects */
.tag {
    transition: all 0.3s ease;
    cursor: default;
}

.tag:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: var(--secondary);
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border);
}

.modal-header h3 {
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
}

.modal-header h3 i {
    color: var(--accent);
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background-color: var(--border);
    color: var(--text-primary);
}

.modal-body {
    padding: 2rem;
    max-height: 60vh;
    overflow-y: auto;
}

.modal-footer {
    padding: 1rem 2rem;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-secondary);
}

.empty-state i {
    font-size: 3rem;
    color: var(--accent);
    margin-bottom: 1rem;
}

.empty-state p {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.empty-state small {
    font-size: 0.9rem;
}

/* Settings Styles */
.settings-section {
    margin-bottom: 2rem;
}

.settings-section h4 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
}

.setting-item {
    margin-bottom: 1rem;
}

.setting-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    color: var(--text-primary);
}

.setting-label select {
    background-color: var(--primary);
    color: var(--text-primary);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 0.5rem;
    min-width: 150px;
}

.setting-label input[type="checkbox"] {
    accent-color: var(--accent);
    transform: scale(1.2);
}

.setting-label {
    flex-direction: column;
    align-items: flex-start;
}

.setting-label > div {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.setting-label small {
    color: var(--text-secondary);
    font-size: 0.75rem;
    margin-top: 0.25rem;
    font-weight: normal;
    font-style: italic;
}

/* Mature Content Section */
.mature-content-section {
    border: 2px solid rgba(255, 193, 7, 0.3);
    border-radius: 8px;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.05), rgba(255, 152, 0, 0.05));
}

.mature-content-section h4 {
    color: #ffc107;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.mature-content-section h4 i {
    color: #ff9800;
}

/* Age Verification Modal */
.age-verification-modal {
    max-width: 500px;
    border: 2px solid #ff9800;
}

.age-verification-content {
    text-align: center;
}

.warning-icon {
    margin-bottom: 1rem;
}

.warning-icon i {
    font-size: 3rem;
    color: #ff9800;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

.age-verification-content h4 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.age-verification-form {
    margin: 2rem 0;
    text-align: left;
}

.age-verification-form label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-weight: 600;
}

.age-verification-form input[type="date"] {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    background-color: var(--primary);
    color: var(--text-primary);
    font-size: 1rem;
    margin-bottom: 1.5rem;
}

.verification-checkboxes {
    margin-top: 1rem;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
    margin-bottom: 1rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.checkbox-label:hover {
    background-color: rgba(255, 152, 0, 0.1);
}

.checkbox-label input[type="checkbox"] {
    margin: 0;
    transform: scale(1.2);
    accent-color: #ff9800;
}

.checkbox-label span {
    color: var(--text-primary);
    font-size: 0.9rem;
    line-height: 1.4;
}

.verification-warning {
    background-color: rgba(255, 193, 7, 0.1);
    border: 1px solid rgba(255, 193, 7, 0.3);
    border-radius: 6px;
    padding: 1rem;
    margin-top: 1.5rem;
}

.verification-warning p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.85rem;
    line-height: 1.4;
}

.verification-warning strong {
    color: #ff9800;
}

.btn-primary {
    background-color: var(--accent);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary:hover:not(:disabled) {
    background-color: #e53e3e;
    transform: translateY(-2px);
}

.btn-primary:disabled {
    background-color: var(--border);
    color: var(--text-secondary);
    cursor: not-allowed;
    transform: none;
}

/* Enhanced Mature Content Tags */
.content-warning-tag {
    background: linear-gradient(135deg, #ff6b6b, #ee5a52);
    color: white;
    font-weight: 700;
    border: 1px solid rgba(255, 255, 255, 0.3);
    animation: warningPulse 3s infinite;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mature-content-tag {
    background: linear-gradient(135deg, #ff9800, #f57c00);
    color: white;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.3);
    animation: maturePulse 4s infinite;
}

.adult-tags-tag {
    background: linear-gradient(135deg, #e91e63, #c2185b);
    color: white;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.3);
    font-size: 0.75rem;
}

@keyframes warningPulse {
    0%, 100% {
        box-shadow: 0 0 5px rgba(255, 107, 107, 0.5);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 15px rgba(255, 107, 107, 0.8);
        transform: scale(1.05);
    }
}

@keyframes maturePulse {
    0%, 100% {
        box-shadow: 0 0 3px rgba(255, 152, 0, 0.4);
    }
    50% {
        box-shadow: 0 0 10px rgba(255, 152, 0, 0.7);
    }
}

.mature-content-indicator {
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.2), rgba(238, 90, 82, 0.2));
    border: 1px solid rgba(255, 107, 107, 0.4);
    border-radius: 8px;
    padding: 0.8rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.mature-content-indicator i {
    color: #ff6b6b;
    font-size: 1.2rem;
}

.mature-content-indicator span {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.9rem;
}

/* Notification System */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background-color: var(--card-bg);
    border-radius: 8px;
    padding: 1rem 1.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    transform: translateX(400px);
    opacity: 0;
    transition: all 0.3s ease;
    border-left: 4px solid var(--accent);
    max-width: 400px;
}

.notification.show {
    transform: translateX(0);
    opacity: 1;
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.notification-content i {
    font-size: 1.2rem;
}

.notification-success {
    border-left-color: #4bb543;
}

.notification-success .notification-content i {
    color: #4bb543;
}

.notification-error {
    border-left-color: #ff6b6b;
}

.notification-error .notification-content i {
    color: #ff6b6b;
}

.notification-info {
    border-left-color: #3498db;
}

.notification-info .notification-content i {
    color: #3498db;
}

.notification-content span {
    color: var(--text-primary);
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Jikan API Styling */
.jikan-badge {
    background: linear-gradient(135deg, #2e51a2, #1e3a8a);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.jikan-tag {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    font-weight: 600;
}

.jikan-seasonal-tag {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    font-weight: 600;
    animation: seasonalPulse 2s infinite;
}

@keyframes seasonalPulse {
    0%, 100% {
        box-shadow: 0 0 3px rgba(16, 185, 129, 0.4);
    }
    50% {
        box-shadow: 0 0 8px rgba(16, 185, 129, 0.7);
    }
}

.jikan-rating-tag {
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.jikan-rating-rx {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    color: white;
    animation: warningPulse 3s infinite;
}

.jikan-rating-r-plus {
    background: linear-gradient(135deg, #ea580c, #c2410c);
    color: white;
}

.jikan-rating-r {
    background: linear-gradient(135deg, #d97706, #b45309);
    color: white;
}

.jikan-members-tag {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    color: white;
    font-weight: 600;
}

.jikan-rank-tag {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    font-weight: 700;
}

/* Enhanced History Styling */
.history-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-bottom: 1rem;
    background-color: var(--card-bg);
    transition: all 0.3s ease;
}

.history-item:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.item-image {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    border-radius: 6px;
    overflow: hidden;
    background-color: var(--secondary);
}

.item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.item-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.item-title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
}

.item-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.method-tag, .date-tag, .confidence-tag {
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
}

.method-tag {
    background-color: var(--accent);
    color: white;
}

.date-tag {
    background-color: var(--secondary);
    color: var(--text-secondary);
}

.confidence-tag {
    background-color: #4bb543;
    color: white;
}

.item-synopsis {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.4;
    margin: 0.5rem 0;
}

.item-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: auto;
}

.item-btn {
    padding: 0.4rem 0.8rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    background-color: var(--primary);
    color: var(--text-primary);
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.item-btn:hover {
    background-color: var(--secondary);
    border-color: var(--accent);
}

.item-btn.favorite:hover {
    background-color: #e91e63;
    color: white;
    border-color: #e91e63;
}

.item-btn.delete:hover {
    background-color: #f44336;
    color: white;
    border-color: #f44336;
}

.history-badge {
    background: linear-gradient(135deg, #9c27b0, #673ab7);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Mature Content & Manual Search Styling */
.mature-badge {
    background: linear-gradient(135deg, #e91e63, #ad1457);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    animation: maturePulse 3s infinite;
}

.manual-badge {
    background: linear-gradient(135deg, #ff9800, #f57c00);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

@keyframes maturePulse {
    0%, 100% {
        box-shadow: 0 0 5px rgba(233, 30, 99, 0.4);
    }
    50% {
        box-shadow: 0 0 15px rgba(233, 30, 99, 0.8);
    }
}

.manual-search-section {
    margin-top: 2rem;
    padding: 1.5rem;
    background-color: var(--secondary);
    border-radius: 8px;
    border: 1px solid var(--border);
}

.manual-search-section h4 {
    margin: 0 0 1rem 0;
    color: var(--text-primary);
    font-size: 1.1rem;
}

.manual-search-buttons {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.manual-search-btn {
    padding: 0.6rem 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.manual-search-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.search-tips {
    background-color: var(--card-bg);
    padding: 1rem;
    border-radius: 6px;
    border-left: 4px solid var(--accent);
}

.search-tips p {
    margin: 0 0 0.5rem 0;
    color: var(--text-primary);
    font-weight: 600;
}

.search-tips ul {
    margin: 0;
    padding-left: 1.2rem;
    color: var(--text-secondary);
}

.search-tips li {
    margin-bottom: 0.3rem;
    line-height: 1.4;
}

/* Enhanced Manual Search (Phase 2) */
.manual-search-section.enhanced {
    background: linear-gradient(135deg, #2a2a2a, #1a1a1a);
    border: 2px solid var(--accent);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.detected-keywords {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    border-left: 4px solid #4bb543;
}

.detected-keywords p {
    margin: 0 0 0.8rem 0;
    color: var(--text-primary);
    font-weight: 600;
}

.keyword-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.keyword-tag {
    padding: 0.3rem 0.8rem;
    background: linear-gradient(135deg, #4bb543, #45a049);
    color: white;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, 0.2);
    animation: keywordPulse 2s infinite;
}

@keyframes keywordPulse {
    0%, 100% {
        box-shadow: 0 0 3px rgba(75, 181, 67, 0.4);
    }
    50% {
        box-shadow: 0 0 8px rgba(75, 181, 67, 0.8);
    }
}

.search-tips.enhanced {
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    border-left: 4px solid #4bb543;
}

.search-tips.enhanced ul li {
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.search-tips.enhanced strong {
    color: #4bb543;
}

/* Enhanced button styling */
.manual-search-section.enhanced .manual-search-btn {
    position: relative;
    overflow: hidden;
}

.manual-search-section.enhanced .manual-search-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;
}

.manual-search-section.enhanced .manual-search-btn:hover::before {
    left: 100%;
}

/* Mobile responsiveness for manual search */
@media (max-width: 768px) {
    .manual-search-buttons {
        flex-direction: column;
    }

    .manual-search-btn {
        justify-content: center;
        width: 100%;
    }

    .manual-search-section {
        padding: 1rem;
    }

    .keyword-tags {
        justify-content: center;
    }

    .keyword-tag {
        font-size: 0.75rem;
        padding: 0.25rem 0.6rem;
    }
}

/* Mobile responsiveness for history */
@media (max-width: 768px) {
    .history-item {
        flex-direction: column;
        gap: 0.8rem;
    }

    .item-image {
        width: 100%;
        height: 120px;
    }

    .item-actions {
        justify-content: center;
    }

    .item-btn {
        flex: 1;
        justify-content: center;
        min-width: 0;
    }
}

.btn-secondary {
    background-color: var(--border);
    color: var(--text-primary);
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-secondary:hover {
    background-color: var(--accent);
    color: white;
    transform: translateY(-2px);
}

/* History and Favorites Items */
.history-item, .favorite-item {
    background-color: var(--card-bg);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    display: flex;
    gap: 1rem;
    transition: all 0.3s ease;
}

.history-item:hover, .favorite-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.item-image {
    width: 80px;
    height: 80px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
}

.item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.item-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.item-title {
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.item-meta {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.item-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: auto;
}

.item-btn {
    background: none;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: 0.3rem 0.8rem;
    border-radius: 4px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.item-btn:hover {
    background-color: var(--accent);
    border-color: var(--accent);
    color: white;
}

.item-btn.favorite {
    color: var(--accent);
    border-color: var(--accent);
}

.item-btn.favorite:hover {
    background-color: var(--accent);
    color: white;
}

.result-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
}

.video-btn {
    background-color: var(--tracemoe-color);
}

.video-btn:hover {
    background-color: #ff926b;
    box-shadow: 0 5px 15px rgba(255, 123, 84, 0.3);
}

.new-search-btn, .try-again-btn {
    align-self: center;
}

.favorite-btn {
    background-color: transparent;
    color: var(--accent);
    border: 2px solid var(--accent);
}

.favorite-btn:hover {
    background-color: var(--accent);
    color: white;
    box-shadow: 0 5px 15px rgba(255, 71, 87, 0.3);
}

.favorite-btn.favorited {
    background-color: var(--accent);
    color: white;
}

.favorite-btn.favorited i {
    animation: heartBeat 0.6s ease-in-out;
}

@keyframes heartBeat {
    0% { transform: scale(1); }
    25% { transform: scale(1.2); }
    50% { transform: scale(1); }
    75% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.tips-section {
    background-color: var(--secondary);
    border-radius: 12px;
    padding: 2rem;
    margin: 2rem 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.tips-section h3 {
    text-align: center;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.tips-section h3 i {
    color: var(--accent);
}

.tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.tip-card {
    background-color: var(--card-bg);
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    transition: transform 0.3s ease;
}

.tip-card:hover {
    transform: translateY(-5px);
}

.tip-card i {
    font-size: 2rem;
    color: var(--accent);
    margin-bottom: 1rem;
}

.tip-card h4 {
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.tip-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.4;
}

footer {
    text-align: center;
    margin-top: 3rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.disclaimer {
    font-size: 0.8rem;
    margin-top: 0.5rem;
    opacity: 0.7;
}

.hidden {
    display: none !important;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .app-header {
        padding: 0.8rem 0;
    }

    .logo h1 {
        font-size: 1.6rem;
    }

    .header-actions {
        gap: 0.6rem;
    }

    .header-btn {
        font-size: 0.8rem;
        padding: 0.5rem 0.8rem;
    }

    .header-btn span {
        display: none;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }

    .search-options {
        flex-direction: column;
    }

    .result-card {
        flex-direction: column;
    }

    .result-image {
        width: 100%;
        height: 200px;
    }

    .meta-info {
        flex-wrap: wrap;
        gap: 1rem;
    }

    .search-buttons, .result-actions {
        flex-direction: column;
        width: 100%;
    }

    button {
        width: 100%;
        justify-content: center;
    }

    .tips-grid {
        grid-template-columns: 1fr;
    }

    .tip-card {
        padding: 1rem;
    }

    .crop-controls {
        padding: 1rem;
    }

    .crop-buttons {
        flex-direction: column;
    }

    .crop-btn {
        width: 100%;
        justify-content: center;
    }

    #cropCanvas {
        max-height: 300px;
    }

    .crop-handle {
        width: 16px;
        height: 16px;
    }

    .crop-handle.top-left {
        top: -8px;
        left: -8px;
    }

    .crop-handle.top-right {
        top: -8px;
        right: -8px;
    }

    .crop-handle.bottom-left {
        bottom: -8px;
        left: -8px;
    }

    .crop-handle.bottom-right {
        bottom: -8px;
        right: -8px;
    }

    /* Header responsive fixes */
    .app-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
        padding: 1rem 0;
    }

    .logo h1 {
        font-size: 1.4rem;
    }

    .logo i {
        font-size: 1.6rem;
    }

    .header-actions {
        justify-content: center;
        gap: 0.5rem;
        flex-wrap: wrap;
    }

    .header-btn {
        font-size: 0.75rem;
        padding: 0.4rem 0.6rem;
        min-width: auto;
    }

    .header-btn span {
        display: none;
    }

    .tagline {
        font-size: 0.9rem;
    }

    /* Sidebar responsive */
    .sidebar {
        width: 100%;
        right: -100%;
    }

    .sidebar-content {
        padding: 1rem 0;
    }

    .sidebar-nav {
        padding: 0 0.5rem;
    }

    .sidebar-item {
        padding: 0.8rem 1rem;
        font-size: 0.9rem;
    }

    .sidebar-footer {
        padding: 1rem;
    }
}
