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

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

.container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

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

header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

main {
    padding: 30px;
}

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

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

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
}

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

.camera-section {
    margin: 30px 0;
    padding: 20px;
    background: #f7f9fc;
    border-radius: 10px;
}

.camera-section h2 {
    margin-bottom: 15px;
    color: #667eea;
    font-size: 1.5rem;
}

.camera-controls {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

#receiptImage {
    flex: 1;
    padding: 10px;
    border: 2px dashed #667eea;
    border-radius: 8px;
    background: white;
}

.btn-scan {
    padding: 12px 24px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-scan:hover {
    background: #764ba2;
}

.image-preview {
    margin-top: 15px;
    min-height: 200px;
    border: 2px dashed #e1e8ed;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
}

.image-preview img {
    max-width: 100%;
    max-height: 400px;
    border-radius: 8px;
}

.ocr-results {
    margin-top: 15px;
    padding: 15px;
    background: white;
    border-radius: 8px;
    min-height: 50px;
}

.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.btn-submit {
    flex: 1;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s;
}

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

.btn-clear {
    padding: 15px 30px;
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-clear:hover {
    background: #667eea;
    color: white;
}

.receipts-list {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid #e1e8ed;
}

.receipts-list h2 {
    margin-bottom: 20px;
    color: #667eea;
    font-size: 1.8rem;
}

#receiptsList {
    display: grid;
    gap: 15px;
}

.receipt-card {
    padding: 20px;
    background: #f7f9fc;
    border-radius: 10px;
    border-left: 4px solid #667eea;
    transition: transform 0.2s;
}

.receipt-card:hover {
    transform: translateX(5px);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.receipt-card h3 {
    color: #333;
    margin-bottom: 10px;
}

.receipt-card p {
    margin: 5px 0;
    color: #666;
}

.loading {
    text-align: center;
    padding: 20px;
    color: #667eea;
    font-size: 18px;
}

.error {
    padding: 15px;
    background: #fee;
    color: #c33;
    border-radius: 8px;
    margin-bottom: 15px;
}

.success {
    padding: 15px;
    background: #efe;
    color: #3c3;
    border-radius: 8px;
    margin-bottom: 15px;
}

/* Mobile-specific styles */
@media (max-width: 768px) {
    .btn-scan {
        width: 100%;
        padding: 20px;
        font-size: 20px;
        margin-bottom: 20px;
    }
    
    .camera-section {
        padding: 25px;
    }
}

#receiptImage {
    display: none !important;
}

.btn-scan {
    display: block !important;
    width: 100%;
}

.btn-scan-large {
    width: 100%;
    padding: 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 15px;
    font-size: 24px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s;
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
    margin: 20px 0;
}

.btn-scan-large:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(102, 126, 234, 0.5);
}

.btn-scan-large:active {
    transform: translateY(-1px);
}


.hidden {
    display: none !important;
}

.visible {
    display: block !important;
}

/* Scan Status Styling */
.scan-status {
    margin: 20px 0;
    padding: 20px;
    border-radius: 8px;
    font-size: 18px;
    font-weight: bold;
    text-align: center;
    display: none;
}

.scan-status.processing {
    background-color: #e3f2fd;
    color: #1976d2;
    border: 2px solid #1976d2;
}

.scan-status.success {
    background-color: #e8f5e9;
    color: #2e7d32;
    border: 2px solid #4caf50;
    font-size: 20px;
    padding: 30px;
}

.scan-status.error {
    background-color: #ffebee;
    color: #c62828;
    border: 2px solid #f44336;
    font-size: 20px;
    padding: 30px;
}

/* Scan Another Button */
.btn-scan-another {
    width: 100%;
    padding: 15px;
    background-color: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn-scan-another:hover {
    background-color: #5568d3;
}

.btn-scan-another:active {
    background-color: #4451b8;
}

/* Login Page Styling */
.login-container {
    max-width: 400px;
    margin: 50px auto;
    padding: 30px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.error-message {
    padding: 12px;
    margin: 15px 0;
    background-color: #ffebee;
    color: #c62828;
    border-radius: 6px;
    text-align: center;
}

/* Logout Button */
.btn-logout {
    position: absolute;
    top: 20px;
    right: 20px;
    padding: 8px 16px;
    background-color: #ff5252;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn-logout:hover {
    background-color: #e33e3e;
}

header {
    position: relative;
}
