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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #e4e4e7;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 25%, #2a1810 50%, #1a1a1a 75%, #0a0a0a 100%);
    min-height: 100vh;
}

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

header {
    text-align: center;
    margin-bottom: 2rem;
    color: white;
    position: relative;
}

header h1 {
    font-size: 2.8rem;
    margin-bottom: 0.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #00d4aa 0%, #ff6b6b 50%, #ffd93d 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 30px rgba(0, 212, 170, 0.3);
    letter-spacing: -0.02em;
}

header p {
    font-size: 1.2rem;
    opacity: 0.9;
    font-weight: 500;
    color: #d4d4d8;
}

main {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Upload Section */
.upload-section {
    background: rgba(24, 24, 27, 0.8);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(39, 39, 42, 0.5);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.upload-area {
    border: 2px dashed #00d4aa;
    border-radius: 16px;
    padding: 3rem 2rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    background: linear-gradient(135deg, rgba(0, 212, 170, 0.1) 0%, rgba(255, 107, 107, 0.05) 100%);
}

.upload-area:hover,
.upload-area.dragover {
    border-color: #ff6b6b;
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.15) 0%, rgba(0, 212, 170, 0.1) 100%);
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(255, 107, 107, 0.2);
}

.upload-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.upload-icon {
    color: #00d4aa;
    opacity: 0.9;
    filter: drop-shadow(0 0 8px rgba(0, 212, 170, 0.3));
}

.upload-content h3 {
    font-size: 1.5rem;
    color: #f4f4f5;
    margin: 0;
    font-weight: 600;
}

.upload-content p {
    color: #a1a1aa;
    margin: 0;
}

.browse-btn {
    background: linear-gradient(135deg, #00d4aa 0%, #ff6b6b 100%);
    border: none;
    color: white;
    text-decoration: none;
    cursor: pointer;
    font-size: inherit;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.browse-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 212, 170, 0.4);
}

.upload-content small {
    color: #71717a;
    font-size: 0.875rem;
}

/* Search Section */
.search-section {
    background: rgba(24, 24, 27, 0.8);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(39, 39, 42, 0.5);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.search-content {
    text-align: center;
}

.search-content h3 {
    font-size: 1.5rem;
    color: #f4f4f5;
    margin-bottom: 1.5rem;
    font-weight: 600;
    background: linear-gradient(135deg, #00d4aa 0%, #ff6b6b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.search-input-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    max-width: 400px;
    margin: 0 auto;
}

#searchInput {
    width: 100%;
    padding: 1rem 1.5rem;
    font-size: 1.1rem;
    font-weight: 500;
    background: rgba(39, 39, 42, 0.8);
    border: 2px solid rgba(0, 212, 170, 0.3);
    border-radius: 12px;
    color: #f4f4f5;
    text-align: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(8px);
}

#searchInput:focus {
    outline: none;
    border-color: #00d4aa;
    box-shadow: 0 0 20px rgba(0, 212, 170, 0.3);
    transform: translateY(-2px);
}

#searchInput::placeholder {
    color: #71717a;
    font-weight: 400;
}

#searchInput:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: rgba(39, 39, 42, 0.4);
}

.step-container {
    position: relative;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.step-container.disabled {
    opacity: 0.5;
    pointer-events: none;
}

.analyze-btn {
    margin-top: 1rem;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    background: linear-gradient(135deg, #00d4aa 0%, #ff6b6b 100%);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(0, 212, 170, 0.3);
}

.analyze-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(0, 212, 170, 0.4);
}

.analyze-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: 0 4px 15px rgba(0, 212, 170, 0.1);
}

.search-input-container small {
    color: #71717a;
    font-size: 0.875rem;
    text-align: center;
    max-width: 100%;
}

/* Status Section */
.status-section {
    background: rgba(24, 24, 27, 0.8);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(39, 39, 42, 0.5);
    border-radius: 20px;
    padding: 3rem 2rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.05);
    text-align: center;
}

.status-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid rgba(39, 39, 42, 0.3);
    border-top: 4px solid #00d4aa;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    filter: drop-shadow(0 0 8px rgba(0, 212, 170, 0.5));
}

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

#statusText {
    font-size: 1.1rem;
    color: #f4f4f5;
    margin: 0;
    font-weight: 500;
}

/* Results Section */
.results-section {
    background: rgba(24, 24, 27, 0.8);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(39, 39, 42, 0.5);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.results-content h2 {
    font-size: 2rem;
    color: #f4f4f5;
    margin-bottom: 1.5rem;
    text-align: center;
    font-weight: 700;
    background: linear-gradient(135deg, #00d4aa 0%, #ff6b6b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.summary-card {
    background: linear-gradient(135deg, rgba(0, 212, 170, 0.1) 0%, rgba(255, 107, 107, 0.05) 100%);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    border: 1px solid rgba(0, 212, 170, 0.3);
    backdrop-filter: blur(8px);
}

.summary-card h3 {
    font-size: 1.25rem;
    color: #00d4aa;
    margin-bottom: 1rem;
    font-weight: 600;
    text-shadow: 0 0 10px rgba(0, 212, 170, 0.3);
}

.summary-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
}

.summary-item .label {
    font-weight: 600;
    color: #a1a1aa;
}

.summary-item .value {
    font-weight: 700;
    color: #f4f4f5;
}

.total-amount {
    font-size: 1.25rem;
    color: #00d4aa !important;
    text-shadow: 0 0 10px rgba(0, 212, 170, 0.5);
}

/* Download Section */
.download-section {
    text-align: center;
    margin-bottom: 2rem;
}

.download-btn {
    background: linear-gradient(135deg, #00d4aa 0%, #ff6b6b 100%);
    color: white;
    border: none;
    padding: 0.875rem 2rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 8px 20px rgba(0, 212, 170, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.download-btn:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(255, 107, 107, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.15);
    filter: brightness(1.1);
}

.download-btn:disabled {
    background: rgba(82, 82, 91, 0.5);
    cursor: not-allowed;
    box-shadow: none;
    color: #71717a;
}

/* Transaction Details */
.transaction-details h3 {
    font-size: 1.25rem;
    color: #f4f4f5;
    margin-bottom: 1rem;
    font-weight: 600;
}

.transaction-item {
    background: rgba(39, 39, 42, 0.5);
    border: 1px solid rgba(0, 212, 170, 0.2);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(8px);
}

.transaction-item:hover {
    transform: translateY(-2px);
    border-color: rgba(0, 212, 170, 0.4);
    box-shadow: 0 8px 20px rgba(0, 212, 170, 0.1);
}

.transaction-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.page-number {
    font-weight: 600;
    color: #a1a1aa;
}

.transaction-item .amount {
    font-weight: 700;
    color: #00d4aa;
    font-size: 1.1rem;
    text-shadow: 0 0 8px rgba(0, 212, 170, 0.3);
}

.no-transactions {
    text-align: center;
    color: #a1a1aa;
    font-style: italic;
    padding: 2rem;
}

/* Error Section */
.error-section {
    background: rgba(24, 24, 27, 0.8);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 20px;
    padding: 3rem 2rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.05);
    text-align: center;
}

.error-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.error-icon {
    color: #ff6b6b;
    opacity: 0.9;
    filter: drop-shadow(0 0 8px rgba(255, 107, 107, 0.5));
}

.error-content h3 {
    font-size: 1.5rem;
    color: #ff6b6b;
    margin: 0;
    font-weight: 600;
    text-shadow: 0 0 10px rgba(255, 107, 107, 0.3);
}

.error-content p {
    color: #a1a1aa;
    margin: 0;
    max-width: 400px;
}

.retry-btn {
    background: linear-gradient(135deg, #ff6b6b 0%, #00d4aa 100%);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3);
}

.retry-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 107, 107, 0.5);
    filter: brightness(1.1);
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem 0;
    color: white;
    opacity: 0.8;
    font-size: 0.875rem;
}

/* Mobile-First Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }

    header h1 {
        font-size: 2.2rem;
        line-height: 1.1;
    }

    header p {
        font-size: 1.1rem;
        padding: 0 1rem;
    }

    .upload-area {
        padding: 2.5rem 1.5rem;
    }

    .upload-content h3 {
        font-size: 1.4rem;
    }

    .upload-icon {
        width: 56px;
        height: 56px;
    }

    .search-section {
        padding: 1.5rem;
    }

    .search-content h3 {
        font-size: 1.3rem;
        margin-bottom: 1.25rem;
    }

    .search-input-container {
        max-width: 100%;
    }

    #searchInput {
        font-size: 1rem;
        padding: 0.875rem 1.25rem;
    }

    .summary-details {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .summary-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
        padding: 1rem;
        background: rgba(0, 212, 170, 0.05);
        border-radius: 8px;
        border: 1px solid rgba(0, 212, 170, 0.1);
    }

    .transaction-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .download-btn {
        width: 100%;
        padding: 1rem 2rem;
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 2rem;
        margin-bottom: 1rem;
    }

    header p {
        font-size: 1rem;
        padding: 0 0.5rem;
    }

    .upload-area {
        padding: 2rem 1rem;
    }

    .upload-content h3 {
        font-size: 1.3rem;
    }

    .upload-icon {
        width: 48px;
        height: 48px;
    }

    .search-section {
        padding: 1.25rem;
    }

    .search-content h3 {
        font-size: 1.2rem;
        margin-bottom: 1rem;
    }

    #searchInput {
        font-size: 0.95rem;
        padding: 0.75rem 1rem;
    }

    .results-section,
    .status-section,
    .error-section {
        padding: 1.5rem;
    }

    .summary-item {
        padding: 0.75rem;
    }

    .transaction-item {
        padding: 0.875rem;
    }

    .browse-btn {
        padding: 0.75rem 1.25rem;
        font-size: 0.95rem;
    }
}