* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.container {
    max-width: 600px;
    margin: 50px auto;
    padding: 40px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    flex: 1;
    text-align: center; /* Center everything in container */
}

h1 {
    color: #667eea;
    font-size: 3em;
    margin-bottom: 10px;
}

.tagline {
    color: #666;
    margin-bottom: 30px;
}

.upload-box {
    background: #f9f9f9;
    padding: 30px;
    border-radius: 10px;
    margin: 20px 0;
    text-align: center;
}

.upload-area {
    border: 3px dashed #667eea;
    border-radius: 10px;
    padding: 40px;
    margin: 20px 0;
    cursor: pointer;
    transition: all 0.3s;
}

.upload-area:hover {
    background: #f0f0f0;
}

input[type="file"] {
    display: none;
}

.file-label {
    display: inline-block;
    padding: 12px 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 25px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: transform 0.3s, box-shadow 0.3s;
    margin: 10px 0;
}

.file-label:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.file-count {
    margin: 10px 0;
    font-size: 0.9em;
    color: #666;
    min-height: 20px;
}

.button {
    display: inline-block;
    padding: 12px 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: transform 0.3s, box-shadow 0.3s;
    text-decoration: none;
    text-align: center;
    margin: 10px 5px;
}

.button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.button:active {
    transform: translateY(0);
}

.info-box {
    background: #f0f4ff;
    padding: 20px;
    border-radius: 10px;
    border-left: 4px solid #667eea;
    margin: 20px 0;
    text-align: center;
}

.info-box h3 {
    color: #667eea;
    margin-bottom: 15px;
}

.info-box ol, .info-box ul {
    text-align: left;
    margin: 15px auto;
    max-width: 400px;
}

.results-box {
    background: #f5f5f5;
    padding: 20px;
    border-radius: 10px;
    margin: 20px 0;
    text-align: left;
}

.results-box h3 {
    color: #667eea;
    margin-bottom: 15px;
}

.results-box p {
    margin: 10px 0;
    font-size: 1.1em;
}

.confidence-box {
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
    border: 2px solid;
}

.confidence-high {
    background: #d4edda;
    border-color: #28a745;
    color: #155724;
}

.confidence-medium {
    background: #fff3cd;
    border-color: #ffc107;
    color: #856404;
}

.confidence-low {
    background: #f8d7da;
    border-color: #dc3545;
    color: #721c24;
}

.confidence-none, .confidence-insufficient {
    background: #e2e3e5;
    border-color: #6c757d;
    color: #383d41;
}

.medications-section {
    margin: 30px 0;
}

.medications-section h3 {
    color: #667eea;
    margin-bottom: 20px;
}

.medication-card {
    background: white;
    border: 2px solid #667eea;
    border-radius: 10px;
    padding: 20px;
    margin: 15px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.med-info {
    flex: 1;
    text-align: left;
}

.med-info h3, .med-info h4 {
    color: #333;
    margin-bottom: 10px;
    font-size: 1.3em;
}

.med-info p {
    margin: 5px 0;
    color: #666;
}

.strength {
    font-weight: bold;
    color: #667eea;
}

.med-image {
    margin-left: 20px;
}

.med-image img {
    max-width: 150px;
    max-height: 150px;
    border-radius: 5px;
}

.no-results {
    background: #fff3cd;
    border: 2px solid #ffc107;
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
}

.no-results h2, .no-results h3 {
    color: #856404;
    margin-bottom: 15px;
}

.no-results ul {
    text-align: left;
    margin: 15px 0;
    padding-left: 40px;
}

.no-results li {
    margin: 8px 0;
}

.disclaimer {
    background: #fff3cd;
    border: 2px solid #ffc107;
    border-radius: 8px;
    padding: 10px 15px;
    margin: 15px 0;
    font-size: 0.9em;
    color: #856404;
    text-align: center;
}

.disclaimer p {
    color: #856404;
    margin: 0;
    font-size: 0.95em;
}

.correction-trigger-btn {
    background: #ffc107;
    color: #333;
    border: none;
    padding: 12px 30px;
    font-size: 1em;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s;
}

.correction-trigger-btn:hover {
    background: #e0a800;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 193, 7, 0.4);
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: white;
    margin: 10% auto;
    padding: 30px;
    border-radius: 15px;
    width: 80%;
    max-width: 500px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    position: relative;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 20px;
}

.close:hover,
.close:focus {
    color: #000;
}

.modal-content h3 {
    color: #667eea;
    margin-bottom: 20px;
    margin-top: 0;
}

.form-group {
    margin: 15px 0;
    text-align: left;
}

.form-group label {
    display: block;
    font-weight: bold;
    margin-bottom: 5px;
    color: #333;
}

.form-group input {
    width: 100%;
    padding: 10px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 1em;
    box-sizing: border-box;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
}

.imprint-info {
    font-family: monospace;
    background: #f0f0f0;
    padding: 5px 10px;
    border-radius: 5px;
    display: inline-block;
}

.confirm-btn {
    background: #28a745;
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9em;
    transition: all 0.3s;
}

.confirm-btn:hover {
    background: #218838;
    transform: scale(1.05);
}

.no-match-btn {
    background: #dc3545;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1em;
    transition: all 0.3s;
}

.no-match-btn:hover {
    background: #c82333;
    transform: translateY(-2px);
}

.thank-you-box {
    background: #d4edda;
    border: 2px solid #28a745;
    border-radius: 10px;
    padding: 30px;
    margin: 30px 0;
    text-align: center;
}

.thank-you-box p {
    font-size: 1.1em;
    margin: 10px 0;
    color: #155724;
}

.stats-box {
    display: flex;
    justify-content: space-around;
    margin: 30px 0;
    gap: 20px;
}

.stat-item {
    background: white;
    border: 2px solid #667eea;
    border-radius: 10px;
    padding: 30px;
    flex: 1;
    text-align: center;
}

.stat-item h3 {
    font-size: 3em;
    color: #667eea;
    margin: 0;
}

.stat-item p {
    color: #666;
    margin: 10px 0 0 0;
    font-size: 1.1em;
}

.accuracy-highlight {
    border-color: #28a745;
}

.accuracy-highlight h3 {
    color: #28a745;
}

.actions {
    margin-top: 30px;
    text-align: center;
}

/* Footer Styles */
.footer {
    background-color: rgba(0, 0, 0, 0.1);
    padding: 20px 0;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    width: 100%;
    margin-top: auto;
}

.footer p {
    margin: 0;
    color: white;
    font-size: 14px;
}

.footer a {
    color: white;
    text-decoration: underline;
    font-weight: 600;
}

.footer a:hover {
    color: #f0f0f0;
}