/* static/styles.css */
body {
    text-align: center;
    font-family: Arial, Helvetica, sans-serif;
    background-color: #f8f9fa;
    margin: 0;
    padding: 40px 20px;
    min-height: 100vh;
}

h1 {
    color: #333;
}

img {
    max-width: 300px;
    margin: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

form {
    margin: 30px 0;
}

input[type="file"] {
    margin: 10px;
}

/* Drag and Drop Upload Zone */
.upload-zone {
    border: 2px dashed #ccc;
    border-radius: 8px;
    padding: 40px 20px;
    margin: 20px 0;
    background-color: #fafafa;
    transition: all 0.3s ease;
    cursor: pointer;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.upload-zone:hover,
.upload-zone.dragover {
    border-color: #0066cc;
    background-color: #f0f8ff;
}

.upload-zone.dragover {
    border-color: #28a745;
    background-color: #f8fff8;
    transform: scale(1.02);
}

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

.upload-icon {
    font-size: 3em;
    margin-bottom: 10px;
}

.upload-text {
    font-size: 1.1em;
    color: #666;
    line-height: 1.4;
}

.upload-link {
    color: #0066cc;
    cursor: pointer;
    text-decoration: underline;
}

.upload-link:hover {
    color: #004499;
}

.upload-zone.selected .upload-text {
    color: #28a745;
    font-weight: bold;
}

/* Font Imports */
@font-face {
    font-family: '0xProto';
    src: url('/static/fonts/0xProto-Regular.woff2') format('woff2'),
         url('/static/fonts/0xProto-Regular.woff') format('woff');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

/* Button Styles */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    font-family: '0xProto', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    font-size: 14px;
    font-weight: 400;
    text-decoration: none;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    text-align: center;
    min-width: 120px;
    box-sizing: border-box;
}

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

.btn:active {
    transform: translateY(0);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.htmx-request.btn {
    opacity: 0.7;
    pointer-events: none;
}

.htmx-request.uploadButton {
    opacity: 0.7;
    pointer-events: none;
}

.htmx-request select {
    opacity: 0.7;
    pointer-events: none;
}

/* Custom Upload Button */
.uploadButton {
	background-color:#44c767;
	border-radius:28px;
	border:1px solid #18ab29;
	display:inline-block;
	cursor:pointer;
	color:#ffffff;
	font-family:Arial;
	font-size:17px;
	padding:16px 31px;
	text-decoration:none;
	text-shadow:0px 1px 0px #2f6627;
}
.uploadButton:hover {
	background-color:#5cbf2a;
}
.uploadButton:active {
	position:relative;
	top:1px;
}

select {
    box-sizing: border-box;
}

.btn-primary {
    background: #0066cc;
    color: white;
}

.btn-primary:hover {
    background: #0052a3;
}

.btn-secondary {
    background: #666;
    color: white;
}

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

.btn-success {
    background: #28a745;
    color: white;
}

.btn-success:hover {
    background: #218838;
}

.btn-warning {
    background: #ff9900;
    color: white;
}

.btn-warning:hover {
    background: #e68900;
}

.btn-info {
    background: #17a2b8;
    color: white;
}

.btn-info:hover {
    background: #138496;
}

/* Loading indicators */
.htmx-indicator {
    opacity: 0;
    transition: opacity 0.3s ease-in;
}

.htmx-request .htmx-indicator {
    opacity: 1;
}

.htmx-request.htmx-indicator {
    opacity: 1;
}

.loading-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
    margin-right: 8px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Button groups */
.btn-group {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    align-items: center;
}

#result {
    min-height: 50px;
    margin-top: 20px;
    font-size: 1.1em;
}

/* Optional: nice max-width for the text block */
p.info {
    max-width: 600px;
    margin: 20px auto;
    color: #555;
    font-size: 0.9em;
}

.content-narrow {
    max-width: 900px;
    margin: 20px auto;
    text-align: left;
    line-height: 1.6;
}

.content-narrow h2 {
    margin-top: 24px;
}

.content-narrow p {
    margin: 12px 0;
}

.guideline-text {
    white-space: normal;
}

.reading-page {
    font-size: 16px;
    line-height: 1.75;
}

.reading-section {
    padding: 18px 20px;
    margin: 18px 0;
    background: #ffffff;
    border: 1px solid #e5e5e5;
    border-radius: 10px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.reading-title {
    margin: 0 0 12px;
    font-size: 20px;
    color: #2b2b2b;
}

.reading-paragraph {
    margin: 10px 0;
    color: #333;
}

/* Header with navigation */
.header {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 20px 0;
}

.home-btn {
    margin-right: 20px;
}

.about-btn {
    margin-left: 20px;
}

/* Custom MyButton style for Home and About */
.myButton {
	box-shadow: 0px 0px 0px 2px #9fb4f2;
	background:linear-gradient(to bottom, #7892c2 5%, #476e9e 100%);
	background-color:#7892c2;
	border-radius:10px;
	border:1px solid #4e6096;
	display:inline-block;
	cursor:pointer;
	color:#ffffff;
	font-family:Arial;
	font-size:19px;
	padding:12px 37px;
	text-decoration:none;
	text-shadow:0px 1px 0px #283966;
}
.myButton:hover {
	background:linear-gradient(to bottom, #476e9e 5%, #7892c2 100%);
	background-color:#476e9e;
}
.myButton:active {
	position:relative;
	top:1px;
}
