/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: #FAFAFA;
    background: #0B1F3A;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 40px;
    color: #FAFAFA;
}

.header h1 {
    font-family: 'Cormorant Garamond', 'Georgia', serif;
    font-size: 3.5rem;
    margin-bottom: 10px;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    font-weight: 400;
}

/* Main content */
.main-content {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

/* Cards */
.upload-card, .loading-card, .results-card, .error-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 40px;
    backdrop-filter: blur(10px);
    max-width: 600px;
    width: 100%;
    text-align: center;
}

.upload-card h2, .loading-card h2, .results-card h2, .error-card h2 {
    font-family: 'Cormorant Garamond', 'Georgia', serif;
    color: #FAFAFA;
    margin-bottom: 20px;
    font-size: 2rem;
    font-weight: 600;
}

.upload-card i, .loading-card i, .results-card i, .error-card i {
    color: #C9A84C;
    margin-right: 10px;
}

/* Upload section */
.upload-description {
    color: rgba(250, 250, 250, 0.8);
    margin-bottom: 30px;
    font-size: 1.1rem;
}

.upload-area {
    margin-bottom: 30px;
}

.file-input-wrapper {
    position: relative;
    margin-bottom: 20px;
}

#fileInput {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.file-input-label {
    display: block;
    padding: 40px 20px;
    border: 2px dashed #C9A84C;
    border-radius: 8px;
    background: rgba(201, 168, 76, 0.05);
    cursor: pointer;
    transition: all 0.3s ease;
}

.file-input-label:hover {
    border-color: #FAFAFA;
    background: rgba(201, 168, 76, 0.1);
}

.file-input-label i {
    font-size: 3rem;
    color: #C9A84C;
    margin-bottom: 15px;
    display: block;
}

#fileLabel {
    color: #FAFAFA;
    font-weight: 500;
}

.file-info {
    text-align: left;
    background: rgba(255, 255, 255, 0.05);
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.file-info p {
    margin-bottom: 5px;
    color: rgba(250, 250, 250, 0.8);
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

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

.btn-primary {
    background: #C9A84C;
    color: #0B1F3A;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(201, 168, 76, 0.4);
    background: #D4B45C;
}

.btn-success {
    background: #C9A84C;
    color: #0B1F3A;
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(201, 168, 76, 0.4);
    background: #D4B45C;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #FAFAFA;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

/* Loading section */
.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(201, 168, 76, 0.2);
    border-top: 4px solid #C9A84C;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 30px;
}

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

/* Results section */
.summary-stats {
    display: flex;
    justify-content: space-around;
    margin: 30px 0;
    background: rgba(255, 255, 255, 0.05);
    padding: 20px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-family: 'Cormorant Garamond', 'Georgia', serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: #C9A84C;
}

.stat-label {
    color: rgba(250, 250, 250, 0.8);
    font-size: 0.9rem;
}

.table-container {
    margin: 30px 0;
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
}

.transactions-table {
    width: 100%;
    border-collapse: collapse;
}

.transactions-table th {
    background: #0B1F3A;
    color: #C9A84C;
    padding: 12px;
    text-align: left;
    position: sticky;
    top: 0;
    z-index: 10;
    font-family: 'Cormorant Garamond', 'Georgia', serif;
    font-weight: 600;
    border-bottom: 2px solid #C9A84C;
}

.transactions-table td {
    padding: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: #FAFAFA;
}

.transactions-table tbody tr:hover {
    background: rgba(201, 168, 76, 0.05);
}

.confidence-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

.confidence-high {
    background: rgba(201, 168, 76, 0.2);
    color: #C9A84C;
}

.confidence-medium {
    background: rgba(255, 255, 255, 0.1);
    color: #FAFAFA;
}

.confidence-low {
    background: rgba(255, 255, 255, 0.05);
    color: rgba(250, 250, 250, 0.6);
}

.action-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Error section */
.error-card {
    border-left: 4px solid #dc3545;
}

.error-card i {
    color: #dc3545;
    font-size: 3rem;
    margin-bottom: 20px;
}

/* Footer */
.footer {
    text-align: center;
    padding: 20px 0;
    color: rgba(250, 250, 250, 0.6);
    font-size: 0.9rem;
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .header h1 {
        font-size: 2.5rem;
    }
    
    .upload-card, .loading-card, .results-card, .error-card {
        padding: 20px;
        margin: 10px;
    }
    
    .summary-stats {
        flex-direction: column;
        gap: 15px;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .table-container {
        font-size: 0.9rem;
    }
    
    .transactions-table th,
    .transactions-table td {
        padding: 8px;
    }
}
