/* 
   EPOCH TIMESTAMP CONVERTER - EXPERT WEB TOOLS
   Theme: 2026 Glassmorphism (Mobile Anti-Scroll)
*/

@font-face { font-family: 'Inter'; src: url('/fonts/inter-v20-latin-regular.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Orbitron'; src: url('/fonts/orbitron-v35-latin-700.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Roboto Mono'; src: url('/fonts/roboto-mono-v31-latin-regular.woff2') format('woff2'); font-weight: 400; font-display: swap; }

:root {
    --bg-dark: #0a0a0f;
    --primary-accent: #3b82f6;
    --secondary-accent: #8b5cf6;
    --text-main: #ffffff;
    --text-muted: #94a3b8;
    --card-bg: rgba(25, 25, 35, 0.6);
    --card-border: rgba(255, 255, 255, 0.08);
    --input-bg: rgba(255, 255, 255, 0.05);
    
    --font-heading: 'Orbitron', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-code: 'Roboto Mono', monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

/* CRITICAL MOBILE FIX: Lock overflow to prevent horizontal stretching */
html, body {
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-body);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.background-glow {
    position: fixed; top: -50%; left: -50%; width: 200%; height: 200%;
    background: radial-gradient(circle at center, rgba(59, 130, 246, 0.08) 0%, rgba(10, 10, 15, 0) 50%);
    z-index: -1; pointer-events: none;
}

/* --- Header --- */
.tool-header { display: flex; justify-content: space-between; align-items: center; padding: 1.5rem 5%; max-width: 1400px; margin: 0 auto; width: 100%; }
.back-btn { color: var(--text-muted); text-decoration: none; display: flex; align-items: center; gap: 8px; transition: color 0.3s; }
.back-btn:hover { color: var(--primary-accent); }
.logo { font-family: var(--font-heading); font-size: 1.2rem; }
.logo span { color: var(--primary-accent); }

/* --- Main Layout --- */
.main-content { flex-grow: 1; padding: 2rem 5%; max-width: 1200px; margin: 0 auto; width: 100%; }

.tool-intro { text-align: center; margin-bottom: 2rem; }
.tool-intro h1 { font-family: var(--font-heading); font-size: 2rem; margin-bottom: 0.5rem; }
.tool-intro p { color: var(--text-muted); }

.card {
    background: var(--card-bg); border: 1px solid var(--card-border);
    border-radius: 16px; padding: 2rem; backdrop-filter: blur(10px); width: 100%;
}

/* Live Clock Hero */
.live-clock-card { text-align: center; margin-bottom: 2rem; padding: 2.5rem 1rem; border-color: rgba(59, 130, 246, 0.3); }
.live-clock-card h3 { color: var(--text-muted); font-size: 1rem; text-transform: uppercase; letter-spacing: 2px; margin-bottom: 15px; }
.clock-display-wrapper { display: flex; align-items: center; justify-content: center; gap: 15px; }
.live-clock {
    font-family: var(--font-code); font-size: 3rem; color: #fff; font-weight: bold;
    text-shadow: 0 0 20px rgba(59, 130, 246, 0.5); letter-spacing: 2px;
}

/* Tool Layout Grid */
.tool-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: start; }

.card-header { margin-bottom: 1.5rem; border-bottom: 1px solid var(--card-border); padding-bottom: 1rem; }
.card-header h2 { font-family: var(--font-heading); font-size: 1.2rem; display: flex; align-items: center; gap: 10px; }
.card-header i { color: var(--secondary-accent); }

/* Inputs */
.input-group { margin-bottom: 1.5rem; }
.input-group label { display: block; margin-bottom: 8px; color: var(--text-muted); font-size: 0.9rem; }

.input-wrapper { display: flex; gap: 10px; }
input[type="number"] {
    width: 100%; background: var(--input-bg); border: 1px solid var(--card-border);
    color: #fff; padding: 12px 15px; border-radius: 8px; font-size: 1.1rem;
    font-family: var(--font-code); outline: none; transition: 0.2s;
}
input[type="number"]:focus { border-color: var(--primary-accent); }

/* Buttons */
.primary-btn {
    background: var(--primary-accent); color: #fff; border: none; padding: 12px 20px;
    border-radius: 8px; font-weight: 600; cursor: pointer; transition: background 0.2s;
    font-size: 1rem; width: 100%; display: flex; align-items: center; justify-content: center; gap: 8px;
}
.primary-btn:hover { background: #2563eb; }
.shrink-btn { width: auto; }

.icon-btn { background: rgba(255,255,255,0.05); border: 1px solid var(--card-border); color: var(--text-muted); width: 45px; height: 45px; border-radius: 8px; cursor: pointer; transition: all 0.2s; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; }
.icon-btn:hover { color: #fff; border-color: var(--primary-accent); background: rgba(59, 130, 246, 0.1); }
.icon-btn.mini { width: 35px; height: 35px; font-size: 1rem; border: none; background: transparent; }
.icon-btn.mini:hover { background: rgba(255,255,255,0.1); }

/* Results Box */
.results-box {
    margin-top: 1.5rem; background: rgba(0,0,0,0.3); border: 1px solid var(--card-border);
    border-radius: 12px; padding: 1.5rem; display: flex; flex-direction: column; gap: 1rem;
    animation: fadeIn 0.3s ease;
}
@keyframes fadeIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }

.result-row { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px dashed rgba(255,255,255,0.05); padding-bottom: 0.5rem; }
.result-row:last-child { border-bottom: none; padding-bottom: 0; }
.result-label { font-size: 0.9rem; color: var(--text-muted); }
.result-val { font-family: var(--font-code); font-size: 1rem; color: #cbd5e1; text-align: right;}
.result-val.highlight { color: #fff; font-weight: bold; }
.result-val.muted { color: #64748b; font-size: 0.9rem;}
.value-group { display: flex; align-items: center; gap: 10px; }

/* Date Builder Grid */
.date-builder-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.date-builder-grid .input-group { margin-bottom: 0; }
.date-builder-grid input { padding: 10px; font-size: 1rem; text-align: center;}

.timezone-toggle { display: flex; gap: 1.5rem; margin-top: 1.5rem; justify-content: center; }
.radio-label { display: flex; align-items: center; gap: 8px; color: var(--text-muted); cursor: pointer; user-select: none; font-size: 0.95rem; }
.radio-label input { accent-color: var(--primary-accent); cursor: pointer; width: 16px; height: 16px; }

/* Utilities */
.hidden { display: none !important; }
.mt-1 { margin-top: 1rem; }

/* Toast */
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: #1e1e24; border: 1px solid var(--primary-accent); color: #fff; padding: 10px 20px; border-radius: 8px; z-index: 2000; box-shadow: 0 4px 12px rgba(0,0,0,0.5); transition: opacity 0.3s; font-size: 0.9rem; pointer-events: none;}

/* Info Section */
.info-section { margin-top: 4rem; padding: 0 1rem; }
.info-section h2 { font-family: var(--font-heading); color: var(--text-main); margin-bottom: 2rem; font-size: 1.5rem; text-align: center; }
.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 2rem; margin-bottom: 2rem; }
.info-grid h3 { color: var(--primary-accent); font-family: var(--font-heading); font-size: 1.1rem; margin-bottom: 0.5rem; }
.info-grid i { margin-right: 8px; }
.info-grid p { color: var(--text-muted); font-size: 0.95rem; line-height: 1.6; }
.info-grid code { background: rgba(0,0,0,0.3); padding: 2px 6px; border-radius: 4px; font-family: var(--font-code); color: #cbd5e1; }

.faq-container { margin-top: 2rem; }
.faq-container h3 { font-family: var(--font-heading); color: var(--text-main); margin: 1.5rem 0 1rem; }
.faq-container h4 { color: var(--secondary-accent); font-size: 1rem; margin-bottom: 0.5rem; margin-top: 1.5rem; }
.faq-container p { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 1rem; line-height: 1.6; }

footer { text-align: center; padding: 3rem 0; color: var(--text-muted); font-size: 0.9rem; border-top: 1px solid var(--card-border); margin-top: 3rem; }
footer a { color: #fff; text-decoration: none; }

/* Responsive */
@media (max-width: 900px) {
    .tool-layout { grid-template-columns: 1fr; }
    .live-clock { font-size: 2.2rem; }
}

@media (max-width: 600px) {
    .tool-header, .main-content { padding: 1.5rem 1rem; }
    .card { padding: 1.5rem 1rem; }
    .date-builder-grid { grid-template-columns: repeat(2, 1fr); }
    .live-clock { font-size: 1.8rem; }
    .result-row { flex-direction: column; align-items: flex-start; gap: 5px; }
    .result-val { text-align: left; }
    .value-group { width: 100%; justify-content: space-between; }
}