* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 40px;
    text-align: center;
}

header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
}

.subtitle {
    font-size: 1.1em;
    opacity: 0.9;
}

main {
    padding: 40px;
}

.upload-section {
    margin-bottom: 40px;
}

.upload-box {
    border: 3px dashed #667eea;
    border-radius: 15px;
    padding: 60px 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f8f9ff;
}

.upload-box:hover {
    border-color: #764ba2;
    background: #f0f2ff;
    transform: translateY(-2px);
}

.upload-box.dragover {
    border-color: #764ba2;
    background: #e8ebff;
    transform: scale(1.02);
}

.upload-icon {
    font-size: 4em;
    margin-bottom: 20px;
}

.upload-text {
    font-size: 1.3em;
    color: #333;
    margin-bottom: 10px;
}

.upload-subtext {
    color: #666;
    font-size: 0.9em;
}

.receipts-section {
    margin-top: 40px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #eee;
}

.section-header h2 {
    color: #333;
    font-size: 1.8em;
}

.actions {
    display: flex;
    gap: 10px;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #f0f0f0;
    color: #333;
}

.btn-secondary:hover {
    background: #e0e0e0;
}

.receipts-list {
    display: grid;
    gap: 15px;
}

.receipt-card {
    background: #f9f9f9;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.receipt-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

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

.receipt-title {
    font-weight: 600;
    color: #333;
    font-size: 1.1em;
}

.receipt-remove {
    background: #ff4444;
    color: white;
    border: none;
    border-radius: 5px;
    padding: 6px 12px;
    cursor: pointer;
    font-size: 0.9em;
}

.receipt-remove:hover {
    background: #cc0000;
}

.receipt-data {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.data-field {
    background: white;
    padding: 10px;
    border-radius: 5px;
    border-left: 3px solid #667eea;
}

.data-label {
    font-size: 0.85em;
    color: #666;
    margin-bottom: 5px;
    font-weight: 600;
}

.data-input {
    width: 100%;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 8px;
    font-size: 0.95em;
    transition: border-color 0.3s;
}

.data-input:focus {
    outline: none;
    border-color: #667eea;
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    color: white;
}

.spinner {
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid white;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

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

footer {
    background: #f5f5f5;
    padding: 20px;
    text-align: center;
    color: #666;
    font-size: 0.9em;
}

.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: 500;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

@media (max-width: 768px) {
    header h1 {
        font-size: 2em;
    }
    
    main {
        padding: 20px;
    }
    
    .section-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .receipt-data {
        grid-template-columns: 1fr;
    }
}

/* Landing Page Styles */
.navbar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: transparent;
    box-shadow: none;
    padding: 0 20px;
    max-width: 1200px;
    border-radius: 0;
}

.hero .container,
.features .container,
.use-cases .container,
.stats .container,
footer .container {
    background: transparent;
    box-shadow: none;
    border-radius: 0;
    padding: 0 20px;
}

.logo {
    color: white;
    font-size: 1.5em;
    font-weight: bold;
}

.nav-links {
    display: flex;
    gap: 20px;
    align-items: center;
}

.nav-links a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.3s;
}

.nav-links a:hover {
    opacity: 0.8;
}

.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 80px 20px;
    text-align: center;
}

.hero h1 {
    font-size: 2.8em;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero .subtitle {
    font-size: 1.3em;
    margin-bottom: 30px;
    opacity: 0.95;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

.cta-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 20px;
}

.btn-large {
    padding: 16px 32px;
    font-size: 1.1em;
}

.trial-info {
    font-size: 0.95em;
    opacity: 0.9;
}

.features, .use-cases, .stats {
    padding: 80px 20px;
    background: white;
}

.features h2, .use-cases h2, .stats h2 {
    text-align: center;
    font-size: 2.5em;
    margin-bottom: 50px;
    color: #333;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.feature-card {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    text-align: center;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.2);
}

.feature-icon {
    font-size: 3em;
    margin-bottom: 15px;
}

.feature-card h3 {
    font-size: 1.4em;
    margin-bottom: 15px;
    color: #333;
}

.feature-card p {
    color: #666;
    line-height: 1.6;
}

.use-cases {
    background: #f9f9f9;
}

.stats {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.stats .feature-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.stats .feature-card h3 {
    color: white;
    font-size: 2em;
}

.stats .feature-card p {
    color: rgba(255, 255, 255, 0.9);
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2em;
    }
    
    .hero .subtitle {
        font-size: 1.1em;
    }
    
    .cta-buttons {
        flex-direction: column;
    }
    
    .feature-grid {
        grid-template-columns: 1fr;
    }
    
    .navbar .container {
        flex-direction: column;
        gap: 15px;
    }
    
    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* Auth Pages (Login/Register) Styles */
.auth-container {
    min-height: calc(100vh - 80px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.auth-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 50px 40px;
    max-width: 450px;
    width: 100%;
}

.auth-card h2 {
    color: #333;
    font-size: 2em;
    margin-bottom: 10px;
    text-align: center;
}

.auth-card .subtitle {
    color: #666;
    text-align: center;
    margin-bottom: 30px;
    font-size: 1em;
}

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

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

.auth-card .form-group input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1em;
    transition: all 0.3s ease;
    background: #f9f9f9;
}

.auth-card .form-group input:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.auth-card .btn-full {
    width: 100%;
    padding: 16px;
    font-size: 1.1em;
    margin-top: 10px;
    border: none;
    cursor: pointer;
}

.auth-card .btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 10px;
    font-weight: 600;
    transition: transform 0.2s, box-shadow 0.2s;
}

.auth-card .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.auth-footer {
    text-align: center;
    margin-top: 25px;
    color: #666;
    font-size: 0.95em;
}

.auth-footer a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.auth-footer a:hover {
    color: #764ba2;
    text-decoration: underline;
}

.alert {
    padding: 14px 18px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 0.95em;
    border-left: 4px solid;
}

.alert-error {
    background: #fee;
    border-color: #c33;
    color: #c33;
}

.alert-success {
    background: #efe;
    border-color: #3c3;
    color: #2a7;
}

.alert-info {
    background: #e8f4fd;
    border-color: #2196F3;
    color: #0c5c99;
}

.logo a {
    color: white;
    text-decoration: none;
}

.logo a:hover {
    opacity: 0.9;
}

@media (max-width: 480px) {
    .auth-card {
        padding: 40px 25px;
    }
    
    .auth-card h2 {
        font-size: 1.6em;
    }
}
