/*
  ****************************************************
  *  Author: Armin Silatani
  *  Date: 2026-05-23
  *  Version: 1.0.0
  ****************************************************
*/

/* =========================== FONTS ============================ */
@font-face {
    font-family: "Kalameh";
    src: url("../../assets/fonts/KalamehWeb-Regular.woff2") format("woff2"),
         url("../../assets/fonts/KalamehWeb-Regular.woff") format("woff");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Kalameh";
    src: url("../../assets/fonts/KalamehWeb-Black.woff2") format("woff2"),
         url("../../assets/fonts/KalamehWeb-Black.woff") format("woff");
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}

/* =========================== VARIABLES ============================ */
:root {
    --accent: #00E5FF;
    --text: #f5f5f5;
    --border: rgba(255, 255, 255, 0.08);
}

/* =========================== RESET ============================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* =========================== BODY ============================ */
body {
    font-family: "Kalameh", sans-serif;
    background: #0d0d0d;
    color: var(--text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 16px;
}

/* =========================== HEADER ============================ */
/* ------------------------- GLASS HEADER ------------------------- */
.glass-header {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    width: 100%;
    max-width: 800px;
    padding: 24px 20px 20px;
    margin-top: 0;
    border-radius: 0 0 16px 16px;
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 9px;
    flex-wrap: wrap;
}

.header-logo {
    height: 40px;
    width: auto;
}

.header-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.tool-name {
    font-weight: 900;
    font-size: 22px;
    line-height: 22px;
    margin-top: 7px;
    color: var(--text);
}

.tool-tagline {
    font-weight: 400;
    font-size: 16px;
    line-height: 18px;
    color: var(--text);
    opacity: 0.7;
}

.tool-description {
    margin-top: 12px;
    font-size: 13px;
    color: rgba(245, 245, 245, 0.65);
    line-height: 1.5;
}

/* =========================== CONVERTER ============================ */
.converter {
    width: 100%;
    max-width: 800px;
    margin: 40px 0;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

/* ------------------------- INPUT PANEL ------------------------- */
.input-panel {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.input-group label,
.field label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: rgba(245, 245, 245, 0.6);
    font-weight: 400;
}

select,
input {
    font-family: "Kalameh", sans-serif;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
    width: 100%;
    height: 44px;
    line-height: 1.2;
    box-sizing: border-box;
    appearance: none;
}

select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' fill='none'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23f5f5f5' stroke-width='1.5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}

input[type="number"] {
    -moz-appearance: textfield;
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

select:focus,
input:focus {
    border-color: var(--accent);
}

select option {
    background: #1a1a1a;
    color: #f5f5f5;
}

.date-fields {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.field {
    flex: 1 1 100px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.btn-row {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.btn-accent {
    font-family: "Kalameh", sans-serif;
    background: var(--accent);
    color: #0d0d0d;
    border: none;
    padding: 12px 28px;
    border-radius: 10px;
    font-weight: 900;
    font-size: 15px;
    cursor: pointer;
    transition: opacity 0.2s, box-shadow 0.2s;
    height: 44px;
    display: flex;
    align-items: center;
}

.btn-accent:hover {
    opacity: 0.85;
    box-shadow: 0 0 20px rgba(0, 229, 255, 0.25);
}

.btn-today {
    font-family: "Kalameh", sans-serif;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text);
    padding: 0 20px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    height: 44px;
    display: flex;
    align-items: center;
}

.btn-today:hover {
    border-color: var(--accent);
    background: rgba(0, 229, 255, 0.05);
}

.error {
    font-size: 12px;
    color: #ff6b6b;
    min-height: 18px;
}

/* ------------------------- OUTPUT PANEL ------------------------- */
.output-panel {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
}

.date-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 18px 14px 32px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    transition: border-color 0.2s;
    position: relative;
    cursor: pointer;
}

.date-card:hover {
    border-color: rgba(0, 229, 255, 0.3);
}

.card-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(245, 245, 245, 0.5);
}

.card-date {
    font-size: 16px;
    font-weight: 900;
    color: var(--text);
    word-break: break-word;
    direction: ltr;
}

.copy-indicator {
    position: absolute;
    bottom: 8px;
    right: 10px;
    font-size: 11px;
    color: var(--accent);
    opacity: 0;
    transition: opacity 0.2s;
    pointer-events: none;
    letter-spacing: 0.03em;
}

.copy-indicator.visible {
    opacity: 1;
}

/* =========================== FOOTER ============================ */
.footer {
    padding: 30px 16px;
    display: flex;
    justify-content: center;
    border-top: 1px solid var(--border);
    max-width: none;
    margin-left: -16px;
    margin-right: -16px;
    width: calc(100% + 32px);
    margin-top: auto;
}

.footer-signature {
    display: flex;
    align-items: center;
    gap: 3px;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.footer-signature:hover {
    opacity: 1;
}

.crafted {
    font-size: 10px;
    color: #7a7a7a;
    letter-spacing: 0.08em;
}

.signature {
    height: 20px;
    transform: translateY(-2px);
    opacity: 0.85;
    filter: brightness(0.9) contrast(1.05);
}

/* ------------------------- FOOTER LINK OVERRIDE ------------------------- */
.footer-signature a {
    display: contents;
    text-decoration: none;
    color: inherit;
}

.footer-signature a:hover {
    text-decoration: none;
}

/* =========================== MEDIA QUERIES ============================ */
@media (max-width: 500px) {
    .date-fields {
        flex-direction: column;
    }

    .btn-accent,
    .btn-today {
        width: 100%;
        justify-content: center;
    }

    .btn-row {
        flex-direction: column;
    }

    .tool-name {
        font-size: 20px;
    }
}