/* X-Ray Scanner App Theme Stylesheet */
:root {
    --bg-color: #ffffff;
    --app-color: #009688;
    --app-color-dark: #00796b;
    --text-color: #000000;
    --text-muted: #575757;
    --border-color: #e0e0e0;
    --card-bg: #f9f9f9;
    --active-border: #009688;
    --active-bg: rgba(0, 150, 136, 0.08);
}

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

body {
    background-color: #f5f5f5;
    color: var(--text-color);
    font-family: 'Rajdhani', 'Poppins', sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-x: hidden;
}

.container {
    width: 100%;
    max-width: 480px;
    background-color: var(--bg-color);
    padding: 0 15px 20px 15px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    min-height: 100vh;
    box-shadow: 0 0 20px rgba(0,0,0,0.08);
}

header {
    text-align: center;
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
    background: #ffffff;
    position: sticky;
    top: 0;
    z-index: 100;
    width: 100%;
}

h1 {
    font-family: 'Orbitron', 'Poppins', sans-serif;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: #000000;
}

h1 span {
    color: var(--app-color);
}

/* Nav bar / Top Bar */
.top-nav-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0px;
    border-bottom: 1px solid var(--border-color);
}

.nav-title {
    color: var(--text-color);
    font-weight: 700;
    font-size: 16px;
    text-transform: uppercase;
}

.back-link {
    color: var(--app-color);
    text-decoration: none;
    font-size: 15px;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Ad Banner */
.ad-banner {
    width: 100%;
    min-height: 80px;
    background: #fafafa;
    border: 1px dashed #dcdcdc;
    border-radius: 6px;
    text-align: center;
    color: var(--text-muted);
    font-size: 12px;
    text-transform: uppercase;
    overflow: hidden;
    padding: 10px 0;
}

/* Panels */
.panel {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px 15px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.panel-title {
    font-size: 16px;
    font-weight: 700;
    color: #000000;
    border-bottom: 2px solid var(--app-color);
    padding-bottom: 5px;
    display: inline-block;
    width: fit-content;
}

/* Welcome Screen Graphic */
.welcome-hero {
    width: 100%;
    max-height: 250px;
    object-fit: contain;
    margin: 15px 0;
}

/* Card Selection list (vertical and grid options) */
.option-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 15px 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.card:hover {
    border-color: var(--app-color);
}

.card.active {
    background: var(--active-bg);
    border-color: var(--active-border);
}

.card img {
    width: 90px;
    height: 90px;
    object-fit: contain;
}

.card-label {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-color);
}

/* Body Portion Selection Rows */
.portion-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.portion-row {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: all 0.2s;
}

.portion-row:hover {
    border-color: var(--app-color);
}

.portion-row.active {
    background: var(--active-bg);
    border-color: var(--active-border);
}

.portion-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.portion-left img {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.portion-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-color);
}

.portion-row .arrow-next {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

/* Body parts grid */
.bodyparts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.part-btn {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 12px 5px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
    text-align: center;
    transition: all 0.2s;
    color: var(--text-muted);
}

.part-btn:hover {
    border-color: var(--app-color);
    color: var(--app-color);
}

.part-btn.active {
    background: var(--app-color);
    border-color: var(--app-color);
    color: #ffffff;
}

/* App Button Styling */
.btn-action {
    background: var(--app-color);
    border: none;
    color: #ffffff;
    padding: 14px 20px;
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 8px;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    display: block;
    width: 100%;
    box-shadow: 0 4px 6px rgba(0, 150, 136, 0.2);
    transition: all 0.2s;
}

.btn-action:hover {
    background: var(--app-color-dark);
}

.btn-action:active {
    transform: scale(0.98);
}

/* Bottom App Utils */
.app-utils-row {
    display: flex;
    justify-content: space-around;
    gap: 10px;
    margin: 10px 0;
}

.app-util-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #ffffff;
    border: 1px solid var(--border-color);
    padding: 10px 5px;
    border-radius: 6px;
    text-decoration: none;
    color: var(--text-color);
    font-size: 13px;
    font-weight: 700;
}

.app-util-btn img {
    width: 100%;
    max-height: 40px;
    object-fit: contain;
    margin-bottom: 5px;
}

/* Scanner Screen (Camera View Prank) */
.scanner-view {
    position: relative;
    width: 100%;
    height: 320px;
    background: #000;
    border: 2px solid var(--app-color);
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.scanner-camera-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.75;
}

.scanner-laser {
    position: absolute;
    left: 0;
    width: 100%;
    height: 3px;
    background: #00ff00;
    box-shadow: 0 0 10px 2px #00ff00;
    z-index: 10;
    animation: scan-line 2.5s linear infinite;
}

@keyframes scan-line {
    0% { top: 0%; }
    50% { top: 100%; }
    100% { top: 0%; }
}

.scanner-status {
    position: absolute;
    bottom: 12px;
    left: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.75);
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 13px;
    color: #ffffff;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.scanner-status .blink {
    color: #00ff00;
    animation: blinker 1s linear infinite;
}

@keyframes blinker {
    50% { opacity: 0; }
}

/* Result Screen */
.result-box {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.result-image {
    width: 100%;
    max-height: 280px;
    object-fit: contain;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: #000000;
}

.result-details {
    width: 100%;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 12px;
    background: #fafafa;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
}

.detail-row span {
    color: var(--text-muted);
}

.detail-row strong {
    color: var(--text-color);
}

/* Info and Disclaimers */
.info-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.info-section h3 {
    font-size: 15px;
    color: var(--app-color);
}

.info-list {
    list-style: none;
    padding-left: 5px;
}

.info-list li {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 6px;
    position: relative;
    padding-left: 15px;
}

.info-list li::before {
    content: "•";
    color: var(--app-color);
    position: absolute;
    left: 0;
    font-weight: bold;
}

.disclaimer-text {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.5;
    border-top: 1px solid var(--border-color);
    padding-top: 10px;
    text-align: justify;
}

/* Footer */
footer {
    margin-top: auto;
    width: 100%;
    padding: 15px 0;
    border-top: 1px solid var(--border-color);
    text-align: center;
    background: #ffffff;
}

footer p {
    font-size: 12px;
    color: var(--text-muted);
}

footer a {
    color: var(--app-color);
    text-decoration: none;
}

/* Gender Selection Styles */
.gender-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}

.gender-option {
    border: 2px solid transparent;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #ffffff;
    display: flex;
}

.gender-option:hover {
    border-color: var(--app-color);
}

.gender-option.active {
    border-color: var(--app-color);
    box-shadow: 0 4px 12px rgba(0, 150, 136, 0.15);
}

.gender-option img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
}
