/* CSS Custom Properties */
:root {
    --primary-color: #6366f1;
    --primary-hover: #4f46e5;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --error-color: #ef4444;
    --warning-color: #f59e0b;
    --background-color: #ffffff;
    --surface-color: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    --border-radius: 16px;
    --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-accent: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

/* Scroll Animation Classes */
.scroll-animate {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.scroll-animate.animate {
    opacity: 1;
    transform: translateY(0);
}

.scroll-animate-delay-1 {
    transition-delay: 0.1s;
}

.scroll-animate-delay-2 {
    transition-delay: 0.2s;
}

.scroll-animate-delay-3 {
    transition-delay: 0.3s;
}

.scroll-animate-delay-4 {
    transition-delay: 0.4s;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    height: 100%;
    overflow-x: hidden;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--background-color);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    width: 100%;
    margin: 0;
    padding: 0;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    padding: 1rem 0;
    width: 100%;
}

.nav-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.nav-brand i {
    font-size: 1.75rem;
}

.nav-brand-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--primary-color);
    transition: var(--transition);
}

.nav-brand-link:hover {
    color: var(--primary-color);
    transform: scale(1.02);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--primary-color);
}

/* User Authentication Styles */
.nav-user {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.user-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.user-name {
    font-weight: 600;
    color: var(--text-primary);
}

.guest-badge {
    background: var(--secondary-color);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.subscription-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.subscription-badge.free {
    background: var(--success-color);
    color: white;
}

.subscription-badge.paid {
    background: var(--primary-color);
    color: white;
}

.tries-left {
    color: var(--text-secondary);
    font-size: 0.75rem;
}

.auth-buttons {
    display: flex;
    gap: 0.5rem;
}

.auth-buttons .btn {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

/* Subscription Info Styles */
.subscription-info {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

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

.subscription-card h3 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
}

.subscription-card p {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.subscription-card.premium {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    margin: -1.5rem;
    margin-bottom: 1rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.subscription-card.premium h3,
.subscription-card.premium p {
    color: white;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.subscription-card.premium h3 {
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.subscription-card.premium p {
    font-weight: 500;
    opacity: 0.95;
}

.subscription-card.premium .btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    backdrop-filter: blur(10px);
    font-weight: 500;
    transition: all 0.3s ease;
}

.subscription-card.premium .btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    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: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    backdrop-filter: blur(5px);
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: var(--surface-color);
    border-radius: var(--border-radius);
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    position: relative;
}

.close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-secondary);
    transition: var(--transition);
}

.close:hover {
    color: var(--text-primary);
}

.modal-content h2 {
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    text-align: center;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.subscription-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 1rem;
}

.subscription-option {
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    text-align: center;
    transition: var(--transition);
}

.subscription-option:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
}

.subscription-option.premium {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05) 0%, rgba(99, 102, 241, 0.1) 100%);
}

.subscription-option h3 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.subscription-option p {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.subscription-option .price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.subscription-option.premium .price {
    color: var(--primary-color);
}

.error-message {
    color: var(--error-color);
    background: #fef2f2;
    border: 1px solid #fecaca;
    padding: 0.75rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

.btn-demo {
    background: var(--gradient-primary);
    color: white !important;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 600;
}

.btn-demo:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Layout */
.container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 2rem;
    width: 100%;
}

.app-container {
    padding-top: 8rem;
    padding-bottom: 8rem;
}

/* Hero Section */
.hero {
    padding: 6rem 0 4rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    position: relative;
    overflow: hidden;
    width: 100vw;
    min-height: 80vh;
    display: flex;
    align-items: center;
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6rem;
    align-items: center;
    position: relative;
    z-index: 1;
    width: 100%;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 2rem;
}

.gradient-text {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: clamp(1.125rem, 2.5vw, 1.375rem);
    margin-bottom: 3rem;
    opacity: 0.9;
    line-height: 1.6;
}

.hero-cta {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 4rem;
    flex-wrap: wrap;
}

.btn-large {
    padding: 1.25rem 2.5rem;
    font-size: 1.125rem;
    font-weight: 600;
}

.hero-stats {
    display: flex;
    gap: 3rem;
    flex-wrap: wrap;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: clamp(2rem, 4vw, 2.5rem);
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 1rem;
    opacity: 0.8;
}

.hero-visual {
    position: relative;
    width: 100%;
}

.hero-image-container {
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    width: 100%;
}

.hero-image {
    width: 100%;
    height: auto;
    display: block;
    max-width: 100%;
}

.floating-card {
    position: absolute;
    top: 20px;
    right: 20px;
    background: white;
    color: var(--text-primary);
    padding: 1rem;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

/* Section Headers */
.section-header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 0 1rem;
}

.section-header h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.section-header p {
    font-size: clamp(1.125rem, 2.5vw, 1.25rem);
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto;
}

/* Features Section */
.features {
    padding: 5rem 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    position: relative;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 3rem;
    width: 100%;
}

.feature-card {
    background: white;
    padding: 3rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: var(--transition);
    text-align: center;
    width: 100%;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    width: 5rem;
    height: 5rem;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 2rem;
    color: white;
    font-size: 2rem;
}

.feature-card h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.feature-card p {
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: 1.125rem;
}

/* How It Works Section */
.how-it-works {
    padding: 5rem 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    position: relative;
}

.steps-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 3rem;
    width: 100%;
}

/* Pricing Section */
.pricing-section {
    padding: 5rem 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    position: relative;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    align-items: center;
    width: 100%;
}

.pricing-card {
    background: white;
    padding: 3rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: var(--transition);
    text-align: center;
    width: 100%;
}

.pricing-card.premium {
    transform: scale(1.05);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-color);
}

.pricing-card h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.pricing-card .price {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.pricing-card .price span {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.pricing-card ul {
    list-style: none;
    margin-bottom: 2rem;
    text-align: left;
}

.pricing-card ul li {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pricing-card ul li i {
    color: var(--success-color);
}

.step {
    display: flex;
    align-items: flex-start;
    gap: 2rem;
    padding: 3rem;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: var(--transition);
    width: 100%;
}

.step:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.step-number {
    width: 4rem;
    height: 4rem;
    background: var(--gradient-primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.step-content h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.step-content p {
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: 1.125rem;
}

/* Demo Section */
.demo-section {
    padding: 4rem 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    width: 100vw;
    min-height: 80vh;
    position: relative;
    overflow: hidden;
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
}

.demo-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    z-index: -1;
}

.demo-section .section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.demo-section .section-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: white;
}

.demo-section .section-header p {
    font-size: 1.1rem;
    opacity: 1;
    max-width: 600px;
    margin: 0 auto;
    color: white;
    font-weight: 500;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* Demo Container */
.demo-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 1rem;
    position: relative;
    z-index: 1;
}

/* Demo Card */
.demo-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.demo-card-header {
    text-align: center;
    margin-bottom: 2rem;
}

.demo-card-header i {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #ffd700;
}

.demo-card-header h3 {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: white;
}

.demo-card-header p {
    font-size: 1rem;
    opacity: 0.8;
    margin: 0;
}

/* Demo Sections - Initial States and Transitions */
.demo-upload-section,
.demo-preview-section,
.demo-loading-section,
.demo-results-section,
.demo-error-section {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.demo-upload-section.hidden,
.demo-preview-section.hidden,
.demo-loading-section.hidden,
.demo-results-section.hidden,
.demo-error-section.hidden {
    display: none;
}

/* Demo Upload Section */
.demo-upload-section .drop-zone {
    background: rgba(255, 255, 255, 0.05);
    border: 2px dashed rgba(255, 255, 255, 0.3);
    border-radius: 15px;
    padding: 3rem 2rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.demo-upload-section .drop-zone:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
}

.demo-upload-section .drop-zone-content h4 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: white;
}

.demo-upload-section .drop-zone-content p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 0.5rem;
}

.demo-upload-section .browse-link {
    color: #ffd700;
    text-decoration: underline;
    cursor: pointer;
}

.demo-upload-section .file-info {
    font-size: 0.9rem;
    opacity: 0.7;
}

/* Demo Preview Section */
.demo-preview-section .image-preview {
    text-align: center;
}

.demo-preview-section .image-preview img {
    max-width: 100%;
    max-height: 300px;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.demo-preview-section .preview-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Demo Loading Section */
.demo-loading-section .loading-container {
    text-align: center;
    padding: 2rem 0;
}

.demo-loading-section .spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid #ffd700;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1.5rem;
}

.demo-loading-section .loading-container p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
}

/* Demo Results Section */
.demo-results-section .results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.demo-results-section .result-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.demo-results-section .result-card h4 {
    color: #ffd700;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.demo-results-section .map-container {
    margin-bottom: 2rem;
}

.demo-results-section .map-container h4 {
    color: #ffd700;
    margin-bottom: 1rem;
    text-align: center;
}

.demo-results-section #map {
    height: 300px;
    border-radius: 15px;
    overflow: hidden;
}

.demo-results-section .result-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Demo Error Section */
.demo-error-section .error-container {
    text-align: center;
    padding: 2rem 0;
}

.demo-error-section .error-container p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

/* Responsive Design for Demo */
@media (max-width: 768px) {
    .demo-card {
        padding: 1.5rem;
    }
    
    .demo-upload-section .drop-zone {
        padding: 2rem 1rem;
    }
    
    .demo-results-section .results-grid {
        grid-template-columns: 1fr;
    }
    
    .demo-results-section .result-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .demo-preview-section .preview-actions {
        flex-direction: column;
        align-items: center;
    }
}

/* CTA Section */
.cta-section {
    padding: 5rem 0;
    background: var(--gradient-primary);
    color: white;
    text-align: center;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
}

.cta-content h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.cta-content p {
    font-size: clamp(1.125rem, 2.5vw, 1.25rem);
    margin-bottom: 3rem;
    opacity: 0.9;
}

/* Buttons */
.btn {
    padding: 0.875rem 2rem;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

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

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: var(--secondary-color);
    color: white;
    border: 2px solid var(--secondary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

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

/* Main Content */
.main {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 3rem;
    width: 100%;
}

/* Sections */
.section {
    background: var(--surface-color);
    border-radius: var(--border-radius);
    padding: 3rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: var(--transition);
    width: 100%;
}

.section.hidden {
    display: none;
}

/* Upload Section */
.upload-container {
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
}

.drop-zone {
    border: 2px dashed var(--border-color);
    border-radius: var(--border-radius);
    padding: 4rem 3rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    background: var(--background-color);
    position: relative;
    overflow: hidden;
    width: 100%;
}

.drop-zone::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-primary);
    opacity: 0;
    transition: var(--transition);
    z-index: -1;
}

.drop-zone:hover,
.drop-zone.drag-over {
    border-color: var(--primary-color);
    transform: scale(1.02);
}

.drop-zone:hover::before,
.drop-zone.drag-over::before {
    opacity: 0.05;
}

.drop-zone-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    position: relative;
    z-index: 1;
}

.upload-icon {
    font-size: 4rem;
    color: var(--primary-color);
}

.drop-zone h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.browse-link {
    color: var(--primary-color);
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
}

.browse-link:hover {
    color: var(--primary-hover);
}

.file-info {
    font-size: 1rem;
    color: var(--text-secondary);
}

/* Image Preview */
.preview-container {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    width: 100%;
}

.preview-container h3 {
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 2rem;
    color: var(--text-primary);
}

.image-preview {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    width: 100%;
}

.image-preview img {
    max-width: 100%;
    max-height: 500px;
    object-fit: contain;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    width: 100%;
}

.preview-actions {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Loading */
.loading-container {
    text-align: center;
    padding: 3rem;
    width: 100%;
}

.spinner {
    width: 4rem;
    height: 4rem;
    border: 3px solid var(--border-color);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 2rem;
}

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

.loading-container h3 {
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.loading-container p {
    color: var(--text-secondary);
    font-size: 1.125rem;
}

/* Results */
.results-container h3 {
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 3rem;
    color: var(--text-primary);
    text-align: center;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
    width: 100%;
}

.result-card {
    background: var(--background-color);
    border-radius: var(--border-radius);
    padding: 2rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    width: 100%;
}

.result-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.result-card h4 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

.uploaded-image-container {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    text-align: center;
}

.uploaded-image-container img {
    width: 100%;
    height: auto;
    max-height: 250px;
    object-fit: contain;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    display: block;
    margin: 0 auto;
}

.coordinates {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 1rem;
    flex-wrap: wrap;
}

.coordinates span {
    background: var(--surface-color);
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-weight: 500;
}

.confidence-bar {
    width: 100%;
    height: 0.75rem;
    background: var(--border-color);
    border-radius: 0.25rem;
    overflow: hidden;
    margin-bottom: 1rem;
}

.confidence-fill {
    height: 100%;
    background: var(--gradient-primary);
    transition: width 0.5s ease-in-out;
}

.map-container {
    margin-bottom: 3rem;
    width: 100%;
}

.map-container h4 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

#map {
    height: 500px;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    width: 100%;
}

.result-actions {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Error */
.error-container {
    text-align: center;
    padding: 3rem;
    width: 100%;
}

.error-icon {
    font-size: 4rem;
    margin-bottom: 2rem;
}

.error-container h3 {
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--error-color);
}

.error-container p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-size: 1.125rem;
}

/* App Page Specific Styles */
.app-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 8rem 0 4rem;
    text-align: center;
    margin-top: 80px;
}

.app-header-content h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #ffffff 0%, #f0f0f0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.app-header-content p {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* App-specific container adjustments */
.app-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* App page main content */
.app-main {
    background: var(--surface-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    padding: 2rem;
    margin-top: 2rem;
}

/* Footer */
.footer {
    background: var(--text-primary);
    color: white;
    padding: 4rem 0 2rem;
    margin-top: 6rem;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
    flex-wrap: wrap;
    gap: 2rem;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 700;
}

.footer-links {
    display: flex;
    gap: 3rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover {
    color: white;
}

.footer-social {
    display: flex;
    gap: 1.5rem;
}

.footer-social a {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.5rem;
    transition: var(--transition);
}

.footer-social a:hover {
    color: white;
    transform: translateY(-2px);
}

.footer-bottom {
    text-align: center;
    padding-top: 3rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
    font-size: 1rem;
}

/* Responsive Design */
@media (max-width: 1400px) {
    .container {
        max-width: 1400px;
        padding: 0 2rem;
    }
    
    .nav-container {
        padding: 0 2rem;
    }
}

@media (max-width: 1200px) {
    .container {
        max-width: 1200px;
        padding: 0 2rem;
    }
    
    .nav-container {
        padding: 0 2rem;
    }
    
    .hero-content {
        gap: 4rem;
    }
    
    .features-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 2rem;
    }
    
    .steps-container {
        grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 1.5rem;
    }
    
    .nav-container {
        padding: 0 1.5rem;
    }
    
    .nav-links {
        display: none;
    }
    
    .nav-user {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-end;
    }
    
    .user-status {
        justify-content: flex-end;
    }
    
    .auth-buttons {
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .auth-buttons .btn {
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
    }
    
    .subscription-options {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        padding: 1.5rem;
        margin: 1rem;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
    }
    
    .hero-cta {
        flex-direction: column;
        align-items: center;
    }
    
    .hero-stats {
        justify-content: center;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .steps-container {
        grid-template-columns: 1fr;
    }
    
    .step {
        flex-direction: column;
        text-align: center;
    }
    
    .section {
        padding: 2rem;
    }
    
    .preview-actions,
    .result-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .results-grid {
        grid-template-columns: 1fr;
    }
    
    .coordinates {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    #map {
        height: 350px;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }
    
    .nav-container {
        padding: 0 1rem;
    }
    
    .drop-zone {
        padding: 3rem 2rem;
    }
    
    .upload-icon {
        font-size: 3rem;
    }
    
    .drop-zone h3 {
        font-size: 1.25rem;
    }
    
    .hero {
        padding: 8rem 0 4rem;
    }
    
    .section {
        padding: 1.5rem;
    }
    
    .hero-content {
        padding: 0 1rem;
    }
    
    .section-header {
        padding: 0 0.5rem;
    }
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.mb-1 {
    margin-bottom: 0.5rem;
}

.mb-2 {
    margin-bottom: 1rem;
}

.mb-3 {
    margin-bottom: 1.5rem;
}

.mt-1 {
    margin-top: 0.5rem;
}

.mt-2 {
    margin-top: 1rem;
}

.mt-3 {
    margin-top: 1.5rem;
}
