/* Enhanced Browser History Map Explorer Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header Styles */
header {
    text-align: center;
    color: white;
    margin-bottom: 40px;
    padding: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

header h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

header p {
    font-size: 1.2rem;
    margin-bottom: 20px;
    opacity: 0.9;
}

.header-badges {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 16px;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Upload Section */
.upload-section {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

/* Quick Access Section */
.quick-access-section {
    margin-bottom: 40px;
}

.quick-access-section h3 {
    text-align: center;
    margin-bottom: 25px;
    color: #333;
    font-weight: 600;
    font-size: 1.5rem;
}

.access-methods {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.method-card {
    background: linear-gradient(135deg, #f8f9ff, #e8f0ff);
    border: 2px solid #e0e7ff;
    border-radius: 16px;
    padding: 25px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.method-card.featured {
    background: linear-gradient(135deg, #e8f5e8, #f0fff0);
    border-color: #28a745;
    transform: scale(1.02);
}

.method-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.2);
    border-color: #667eea;
}

.method-card.featured:hover {
    box-shadow: 0 15px 40px rgba(40, 167, 69, 0.2);
}

.method-icon {
    font-size: 3rem;
    margin-bottom: 15px;
    display: block;
}

.method-card h4 {
    color: #333;
    margin-bottom: 10px;
    font-weight: 600;
    font-size: 1.2rem;
}

.method-card p {
    color: #666;
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.method-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    width: 100%;
    max-width: 200px;
}

.method-card.featured .method-btn {
    background: linear-gradient(135deg, #28a745, #20c997);
}

.method-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.method-card.featured .method-btn:hover {
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.4);
}

.method-note {
    display: block;
    margin-top: 10px;
    font-size: 0.8rem;
    color: #888;
    font-style: italic;
}

/* URL Paste Section */
.url-paste-section {
    background: #f8f9ff;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
    border: 2px dashed #667eea;
}

.url-paste-section h3 {
    color: #333;
    margin-bottom: 20px;
    text-align: center;
}

.smart-paste-tools {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

.smart-btn {
    background: linear-gradient(135deg, #17a2b8, #138496);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.smart-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(23, 162, 184, 0.3);
}

.browser-suggestion {
    background: linear-gradient(135deg, #fff3cd, #fef8e1);
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 15px;
    border-left: 4px solid #ffc107;
}

.browser-suggestion p {
    margin: 0;
    font-size: 0.9rem;
}

#urlTextarea {
    width: 100%;
    height: 200px;
    padding: 15px;
    border: 2px solid #e0e7ff;
    border-radius: 10px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    resize: vertical;
    margin-bottom: 15px;
    line-height: 1.5;
}

#urlTextarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.paste-controls {
    display: flex;
    gap: 10px;
    justify-content: center;
}

/* Upload Area */
.upload-area {
    border: 3px dashed #d1d5db;
    border-radius: 15px;
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 30px;
    background: linear-gradient(135deg, #f9fafb, #f3f4f6);
}

.upload-area:hover, .upload-area.dragover {
    border-color: #667eea;
    background: linear-gradient(135deg, #f8f9ff, #e8f0ff);
    transform: translateY(-2px);
}

.upload-content h3 {
    color: #333;
    margin-bottom: 10px;
    font-weight: 600;
}

.upload-content p {
    color: #666;
    margin-bottom: 20px;
}

.upload-icon {
    color: #9ca3af;
    margin-bottom: 15px;
}

#fileInput {
    display: none;
}

.file-format-info {
    margin-top: 15px;
    color: #6b7280;
}

/* Demo Section */
.demo-section {
    text-align: center;
    margin-bottom: 30px;
}

.demo-btn {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 0 10px 10px 0;
}

.demo-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.4);
}

.cancel-btn {
    background: #6c757d;
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cancel-btn:hover {
    background: #5a6268;
    transform: translateY(-1px);
}

/* Controls Section */
.controls-section {
    background: white;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.controls {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    align-items: end;
}

.filter-group {
    display: flex;
    flex-direction: column;
}

.filter-group label {
    margin-bottom: 5px;
    font-weight: 500;
    color: #333;
    font-size: 0.9rem;
}

.filter-group select,
.filter-group input {
    padding: 10px 15px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 0.9rem;
    font-family: 'Poppins', sans-serif;
    transition: border-color 0.3s ease;
}

.filter-group select:focus,
.filter-group input:focus {
    outline: none;
    border-color: #667eea;
}

.control-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    margin: 0 5px;
}

.control-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* Map Container */
.map-container {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.map-header {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 20px;
    text-align: center;
}

.map-header h2 {
    margin-bottom: 10px;
    font-weight: 600;
}

.stats {
    font-size: 0.9rem;
    opacity: 0.9;
}

#map {
    height: 500px;
    width: 100%;
}

/* Legend */
.legend {
    padding: 20px;
    background: #f8f9fa;
}

.legend h4 {
    margin-bottom: 15px;
    color: #333;
    font-weight: 600;
}

.legend-item {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.legend-color {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    margin-right: 10px;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Instructions Section */
.instructions {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.instructions h3 {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
    font-weight: 600;
    font-size: 1.8rem;
}

/* Tab System */
.method-tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
    gap: 10px;
    flex-wrap: wrap;
}

.tab-btn {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    padding: 12px 24px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.tab-btn.active {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-color: #667eea;
}

.tab-btn:hover:not(.active) {
    background: #e9ecef;
    border-color: #667eea;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Extension Tab Styles */
.extension-info h4 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.3rem;
}

.extension-benefits {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.benefit-card {
    display: flex;
    align-items: flex-start;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9ff, #e8f0ff);
    border-radius: 12px;
    border-left: 4px solid #667eea;
}

.benefit-icon {
    font-size: 2rem;
    margin-right: 15px;
    flex-shrink: 0;
}

.benefit-text strong {
    display: block;
    color: #333;
    margin-bottom: 5px;
    font-weight: 600;
}

.benefit-text p {
    color: #666;
    font-size: 0.9rem;
    margin: 0;
    line-height: 1.4;
}

.installation-guide {
    background: #e8f5e8;
    padding: 25px;
    border-radius: 12px;
    border-left: 4px solid #28a745;
}

.installation-guide h4 {
    color: #155724;
    margin-bottom: 15px;
}

.install-steps {
    margin: 0;
    padding-left: 20px;
}

.install-steps li {
    margin-bottom: 10px;
    color: #155724;
    line-height: 1.5;
}

.install-steps code {
    background: #f8f9fa;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
}

.download-link {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    text-decoration: none;
    font-weight: 500;
    display: inline-block;
    margin-left: 10px;
    transition: all 0.3s ease;
}

.download-link:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

/* Manual Tab Styles */
.easy-methods {
    margin-bottom: 30px;
}

.easy-method-card {
    background: linear-gradient(135deg, #fff3e0, #ffe0b2);
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 20px;
    border-left: 4px solid #ff9800;
}

.easy-method-card h4 {
    color: #e65100;
    margin-bottom: 15px;
    font-weight: 600;
}

.easy-method-card ul {
    margin: 0;
    padding-left: 20px;
}

.easy-method-card li {
    color: #bf360c;
    margin-bottom: 8px;
    line-height: 1.5;
}

.traditional-methods h4 {
    color: #333;
    margin-bottom: 20px;
    font-weight: 600;
}

.browser-instructions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.browser-card {
    background: #f8f9ff;
    padding: 20px;
    border-radius: 12px;
    border: 2px solid #e0e7ff;
}

.browser-card h4 {
    color: #667eea;
    margin-bottom: 15px;
}

.browser-card ol {
    margin: 0;
    padding-left: 20px;
}

.browser-card li {
    margin-bottom: 8px;
    color: #333;
    line-height: 1.4;
}

/* Upload Tab Styles */
.upload-instructions h4 {
    color: #333;
    margin-bottom: 15px;
}

.file-formats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.format-card {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    border: 2px solid #e9ecef;
}

.format-card h5 {
    color: #333;
    margin-bottom: 10px;
}

.format-card p {
    color: #666;
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.format-card code {
    background: #e9ecef;
    padding: 8px 12px;
    border-radius: 6px;
    display: block;
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
    color: #333;
    overflow-x: auto;
}

/* Privacy Note */
.privacy-note {
    background: linear-gradient(135deg, #e8f5e8, #f0fff0);
    padding: 25px;
    border-radius: 15px;
    border-left: 5px solid #28a745;
    margin-top: 30px;
    text-align: center;
}

.privacy-note h4 {
    color: #155724;
    margin-bottom: 15px;
    font-weight: 600;
}

.privacy-note p {
    color: #155724;
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    header {
        padding: 30px 20px;
    }
    
    header h1 {
        font-size: 2.2rem;
    }
    
    header p {
        font-size: 1rem;
    }
    
    .upload-section,
    .instructions {
        padding: 25px;
    }
    
    .access-methods {
        grid-template-columns: 1fr;
    }
    
    .controls {
        grid-template-columns: 1fr;
    }
    
    .method-tabs {
        flex-direction: column;
        align-items: center;
    }
    
    .tab-btn {
        width: 100%;
        max-width: 250px;
    }
    
    .extension-benefits {
        grid-template-columns: 1fr;
    }
    
    .browser-instructions {
        grid-template-columns: 1fr;
    }
    
    .file-formats {
        grid-template-columns: 1fr;
    }
    
    .smart-paste-tools {
        flex-direction: column;
        align-items: center;
    }
    
    .smart-btn {
        width: 100%;
        max-width: 250px;
    }
    
    .paste-controls {
        flex-direction: column;
        align-items: center;
    }
    
    .demo-btn,
    .cancel-btn {
        width: 100%;
        max-width: 250px;
        margin: 5px 0;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.8rem;
    }
    
    .upload-section,
    .instructions {
        padding: 20px;
    }
    
    .upload-area {
        padding: 30px 20px;
    }
    
    #map {
        height: 350px;
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #5a6fd8, #6a4190);
}

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

.upload-section,
.instructions,
.map-container {
    animation: fadeInUp 0.6s ease-out;
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    border: 2px solid #667eea;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    transform: translate(-50%, -50%);
}

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

/* Extension Detection Styles */
.extension-detected {
    margin-top: 15px;
    padding: 15px;
    background: linear-gradient(135deg, #e8f5e8, #f0fff0);
    border-radius: 10px;
    border-left: 4px solid #28a745;
    text-align: center;
}

/* Enhanced Button Styles */
.btn-primary {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    font-size: 0.9rem;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.4);
}

.btn-secondary {
    background: #6c757d;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-1px);
}