@import url('https://fonts.googleapis.com/css2?family=Padauk:wght@400;700&family=Pyidaungsu&display=swap');

:root {
    --bg-gradient: linear-gradient(45deg, #1A2980, #26D0CE);
    --panel-bg: rgba(20, 25, 40, 0.85);
    --gold: #FFD700;
    --accent: #00E5FF;
    --text: #ffffff;
    --input-bg: rgba(255, 255, 255, 0.1);
    --border-light: rgba(255, 255, 255, 0.2);
}

body {
    background: linear-gradient(-45deg, #ee7752, #e73c7e, #23a6d5, #23d5ab);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
    color: var(--text);
    font-family: 'Pyidaungsu', sans-serif;
    margin: 0;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 15px;
}

@keyframes gradientBG { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }

.container {
    width: 100%; max-width: 600px; background: var(--panel-bg);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border-radius: 20px; border: 1px solid var(--border-light);
    box-shadow: 0 15px 35px rgba(0,0,0,0.5); overflow: hidden; padding-bottom: 30px;
}

.header { text-align: center; padding: 25px; background: rgba(0,0,0,0.2); border-bottom: 1px solid var(--border-light); }
h1 { margin: 0; color: var(--gold); font-size: 1.8rem; text-shadow: 0 0 10px rgba(250, 204, 21, 0.6); }
p { margin: 8px 0 0; font-size: 0.95rem; color: #cbd5e1; }

.tabs { display: flex; background: rgba(0,0,0,0.3); border-bottom: 1px solid var(--border-light); }
.tab-btn {
    flex: 1; padding: 18px; background: none; border: none; color: #94a3b8; font-size: 1rem; 
    cursor: pointer; font-family: 'Pyidaungsu', sans-serif; transition: 0.3s; font-weight: bold; border-bottom: 4px solid transparent;
}
.tab-btn.active { color: var(--gold); border-bottom-color: var(--gold); background: rgba(250, 204, 21, 0.1); }

.input-card { padding: 25px; }
label { display: block; margin: 12px 0 6px; font-size: 0.9rem; color: var(--accent); font-weight: bold; }
input, select {
    width: 100%; padding: 12px; background: var(--input-bg); border: 1px solid var(--border-light);
    border-radius: 10px; color: white; font-size: 1rem; outline: none; transition: 0.3s; box-sizing: border-box;
}
input[type="file"] { padding: 10px; background: rgba(0,0,0,0.2); font-size: 0.85rem; }
input:focus, select:focus { border-color: var(--gold); box-shadow: 0 0 10px rgba(250, 204, 21, 0.3); background: rgba(255,255,255,0.15); }
.city-select option { background: #1e293b; color: white; }

button {
    width: 100%; padding: 15px; margin-top: 20px; border: none; border-radius: 12px;
    font-size: 1.1rem; font-weight: bold; cursor: pointer; transition: transform 0.2s, box-shadow 0.2s;
    font-family: 'Pyidaungsu', sans-serif; color: white; text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}
.btn-ai { background: linear-gradient(135deg, #a855f7, #ec4899); box-shadow: 0 4px 15px rgba(236, 72, 153, 0.4); }
.btn-calc { background: linear-gradient(135deg, #00c6ff, #0072ff); box-shadow: 0 4px 15px rgba(0, 114, 255, 0.4); }
.btn-match { background: linear-gradient(135deg, #facc15, #ff512f); box-shadow: 0 4px 15px rgba(255, 81, 47, 0.4); }
button:active { transform: scale(0.98); }

.toggle-box { display: flex; background: rgba(0,0,0,0.4); margin: 25px; padding: 5px; border-radius: 12px; border: 1px solid var(--border-light); }
.t-btn { flex: 1; text-align: center; padding: 10px; cursor: pointer; border-radius: 8px; font-size: 0.9rem; color: #cbd5e1; transition: 0.3s; }
.t-btn.active { background: linear-gradient(90deg, #00c6ff, #0072ff); color: white; font-weight: bold; }

.sub-tabs { display: flex; justify-content: center; gap: 15px; margin-bottom: 25px; }
.sub-btn { background: rgba(255,255,255,0.05); border: 1px solid var(--border-light); padding: 10px 25px; border-radius: 20px; color: #cbd5e1; cursor: pointer; font-size: 0.95rem; transition: 0.3s; }
.sub-btn.active { background: var(--gold); color: #1a1a1a; font-weight: bold; border-color: var(--gold); box-shadow: 0 0 15px rgba(250, 204, 21, 0.4); }

.row-container { display: flex; gap: 15px; padding: 0 20px; }
.side-box { flex: 1; background: rgba(255,255,255,0.05); padding: 15px; border-radius: 15px; border: 1px solid var(--border-light); }
.side-title { display: block; font-weight: bold; margin-bottom: 15px; font-size: 1rem; border-bottom: 1px solid var(--border-light); padding-bottom: 8px; }
.male { color: #60a5fa; } .female { color: #f472b6; }

.result-box { margin: 25px; padding: 25px; background: rgba(255, 255, 255, 0.08); border-radius: 15px; border: 1px solid var(--gold); line-height: 1.8; animation: fadeIn 0.5s; font-size: 1rem; }
.analysis-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin: 25px; }
.analysis-item { background: rgba(255,255,255,0.05); padding: 12px; border-radius: 10px; border-left: 4px solid var(--accent); }
.analysis-label { font-size: 0.8rem; color: var(--accent); display: block; margin-bottom: 5px; text-transform: uppercase; }
.analysis-val { font-weight: bold; color: var(--gold); font-size: 1.1rem; }

.hidden { display: none !important; }
#loading, #palmLoading { text-align: center; color: var(--gold); padding: 30px; font-style: italic; }
.spinner { width: 40px; height: 40px; border: 4px solid rgba(250, 204, 21, 0.2); border-top-color: var(--gold); border-radius: 50%; animation: spin 1s linear infinite; margin: 0 auto 15px; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fadeIn { from { opacity: 0; transform: translateY(15px); } to { opacity: 1; transform: translateY(0); } }
.score-circle { width: 100px; height: 100px; border-radius: 50%; border: 6px solid var(--gold); display: flex; align-items: center; justify-content: center; font-size: 32px; font-weight: bold; color: var(--gold); margin: 0 auto 20px; background: rgba(250, 204, 21, 0.1); }

@media (max-width: 480px) {
    .row-container { flex-direction: column; }
    .tabs { flex-direction: column; }
    .tab-btn { border-bottom: 1px solid var(--border-light); padding: 12px; }
}
