@font-face {
    font-family: 'Sahel';
    src: url('../fonts/Sahel.woff') format('woff');
    font-weight: 400;
}

@font-face {
    font-family: 'Sahel';
    src: url('./fonts/Sahel-Bold.woff') format('woff');
    font-weight: 700;
}

@font-face {
    font-family: 'Sahel';
    src: url('./fonts/Sahel-Black.woff') format('woff');
    font-weight: 900;
}

:root {
    --persian-blue: #0f4c81;
    --royal-blue: #155e95;
    --tile-blue: #1f7bb6;
    --turquoise: #28b7a3;
    --green: #35a97a;
    --light-green: #dff7ee;
    --gold: #d8b46b;
    --white-glass: rgba(255, 255, 255, 0.22);
    --dark: #173535;
    --shadow: 0 6px 18px rgba(0, 0, 0, 0.10);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Sahel, Tahoma;
    min-height: 100vh;
    overflow-x: hidden;
    color: var(--dark);
    text-align: center;
    background:
        radial-gradient(circle at top right, rgba(31, 123, 182, 0.28), transparent 30%),
        radial-gradient(circle at left, rgba(40, 183, 163, 0.24), transparent 35%),
        radial-gradient(circle at bottom, rgba(53, 169, 122, 0.18), transparent 40%),
        linear-gradient(135deg, #f4fff9, #e7f7f3, #e7f3ff);
    padding: 25px 18px 40px;
}

/* decorative pattern */
.bg-pattern {
    position: fixed;
    inset: 0;
    background-image: radial-gradient(rgba(21, 94, 149, 0.05) 1px, transparent 1px);
    background-size: 22px 22px;
    pointer-events: none;
    z-index: -1;
}

/* hero */
.hero {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 35px;
    margin-bottom: 45px;
}

/* title */
.hero-content {
    position: relative;
    overflow: hidden;
    padding: 35px 50px;
    border-radius: 30px;
    background: var(--white-glass);
    backdrop-filter: blur(12px);
    box-shadow: var(--shadow);
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.hero-glow {
    position: absolute;
    width: 220px;
    height: 220px;
    background: rgba(40, 183, 163, 0.25);
    border-radius: 50%;
    top: -80px;
    right: -60px;
    filter: blur(18px);
}

h1 {
    margin: 0;
    font-size: 72px;
    font-weight: 900;
    color: var(--persian-blue);
    letter-spacing: 1px;
    text-shadow: 0 2px 8px rgba(15, 76, 129, 0.18);
}

.subtitle {
    margin-top: 10px;
    font-size: 16px;
    font-weight: 700;
    color: #4f6b6b;
}

/* images */
.frame {
    width: 130px;
    height: 190px;
    padding: 6px;
    border-radius: 20px;
    background: linear-gradient(180deg, var(--persian-blue), var(--tile-blue), var(--turquoise));
    box-shadow: 0 8px 20px rgba(15, 76, 129, 0.22);
    position: relative;
}

.frame::before {
    content: "";
    position: absolute;
    inset: -3px;
    border-radius: 22px;
    background: linear-gradient(135deg, rgba(216, 180, 107, 0.9), rgba(255, 255, 255, 0.3));
    z-index: -1;
}

.frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 14px;
}

/* cards */
.cards {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 30px;
    margin-bottom: 45px;
}

.card {
    position: relative;
    overflow: hidden;
    width: 350px;
    max-width: 90vw;
    min-height: 210px;
    padding: 28px 20px;
    border-radius: 28px;
    backdrop-filter: blur(12px);
    background: var(--white-glass);
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: var(--shadow);
    transition: 0.3s;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.card::before {
    content: "";
    position: absolute;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    top: -50px;
    left: -40px;
    opacity: 0.35;
}

.total-card::before { background: #1f7bb6; }
.today-card::before { background: #28b7a3; }
.week-card::before { background: #35a97a; }

.card:hover {
    transform: translateY(-8px) scale(1.02);
}

.card-title {
    font-size: 16px;
    color: #446565;
    margin-bottom: 18px;
    line-height: 1.8;
}

/* ---------- number display (clean, one line) ---------- */
.num {
    font-size: clamp(40px, 6vw, 64px);   /* larger because numbers are now short */
    font-weight: 900;
    color: var(--persian-blue);
    line-height: 1.2;
    direction: ltr;
    white-space: nowrap;                 /* always one line */
    text-shadow: 0 4px 10px rgba(15, 76, 129, 0.18);
}

/* form */
.form-container {
    position: relative;
    overflow: hidden;
    max-width: 520px;
    margin: auto;
    padding: 35px;
    border-radius: 30px;
    background: var(--white-glass);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: var(--shadow);
}

.form-glow {
    position: absolute;
    width: 200px;
    height: 200px;
    background: rgba(31, 123, 182, 0.2);
    border-radius: 50%;
    left: -70px;
    bottom: -70px;
    filter: blur(18px);
}

form {
    position: relative;
    z-index: 2;
}

label {
    display: block;
    margin-bottom: 15px;
    font-size: 18px;
    font-weight: bold;
    color: var(--persian-blue);
}

/* input */
input {
    width: 100%;
    padding: 18px;
    border: none;
    border-radius: 18px;
    font-family: Sahel, Tahoma;
    font-size: 18px;
    background: rgba(255, 255, 255, 0.8);
    color: var(--dark);
    margin-bottom: 18px;
    outline: none;
    transition: 0.25s;
    box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.05);
}

input:focus {
    transform: scale(1.01);
    box-shadow: 0 0 0 3px rgba(40, 183, 163, 0.18);
}

/* button */
button {
    width: 100%;
    border: none;
    border-radius: 18px;
    padding: 18px;
    font-family: Sahel, Tahoma;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    color: white;
    background: linear-gradient(135deg, var(--green), var(--turquoise), var(--tile-blue));
    box-shadow: 0 6px 16px rgba(31, 123, 182, 0.22);
    transition: 0.3s;
}

button:hover {
    transform: translateY(-2px) scale(1.01);
}

/* record styles */
.record-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.record-count {
    white-space: nowrap;
}

/* mobile */
@media(max-width:600px) {
    body {
        padding-top: 18px;
    }

    .hero {
        flex-wrap: wrap;
        justify-content: space-between;
        align-items: flex-start;
    }

    .hero-content {
        order: 3;
        width: 100%;
        margin-top: 10px;
    }

    .frame {
        width: 90px;
        height: 130px;
        margin-top: 0;
    }

    h1 {
        font-size: 42px;
    }

    .subtitle {
        font-size: 14px;
    }

    .cards {
        gap: 18px;
    }

    .card {
        width: 100%;
        max-width: 340px;
        min-height: 190px;
    }

    .num {
        font-size: 56px;      /* slightly smaller on mobile */
    }

    .card-title {
        font-size: 17px;
    }

    .form-container {
        padding: 25px 18px;
    }

    input,
    button {
        font-size: 17px;
    }

    .record-item.record-row {
        grid-template-columns: 1fr;
        text-align: right;
        gap: 6px;
    }

    .record-col {
        white-space: normal;
    }
}

/* records list */
.records-list {
    max-width: 760px;
    margin: 30px auto;
    background-color: rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 10px 0;
    backdrop-filter: blur(4px);
}

.record-item.record-row:nth-child(odd) {
    background-color: rgba(40, 167, 69, 0.14);
}

.record-item.record-row:nth-child(even) {
    background-color: rgba(0, 0, 0, 0.12);
}

.record-item.record-row {
    display: grid;
    grid-template-columns: 1fr 1.2fr 1fr;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    margin: 6px 12px;
    border-radius: 8px;
    transition: background-color 0.25s ease, transform 0.2s ease;
    text-align: center;
}

.record-item.record-row:hover {
    background-color: rgba(255, 255, 255, 0.16);
    transform: scale(1.01);
}

.record-col {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.record-count {
    font-weight: 700;
    color: #28a745;
    font-size: 16px;
    direction: ltr;
    text-align: left;
    justify-self: end;
    min-width: 90px;
}

/* ----- Modern Ribbon Footer ----- */
.ribbon {
    margin-top: 50px;
    position: relative;
    text-align: center;
}

.ribbon-body {
    display: inline-block;
    background: linear-gradient(135deg, var(--persian-blue), var(--tile-blue));
    color: #fff;
    padding: 12px 40px;
    border-radius: 0 0 16px 16px;
    position: relative;
    max-width: 90vw;
    box-shadow:
        0 8px 18px rgba(15, 76, 129, 0.3),
        inset 0 1px 0 rgba(255,255,255,0.25);
    font-family: Sahel, Tahoma;
    font-size: 14px;
    font-weight: 700;
    transition: 0.3s;
}

/* ribbon tails */
.ribbon-body::before,
.ribbon-body::after {
    content: "";
    position: absolute;
    top: 100%;
    width: 20px;
    height: 20px;
    background: inherit;
    clip-path: polygon(0 0, 100% 0, 0 100%);
    z-index: -1;
}

.ribbon-body::before {
    left: 0;
    transform: translateX(-100%) rotate(0deg);
}

.ribbon-body::after {
    right: 0;
    transform: translateX(100%) scaleX(-1);
}

/* subtle gold line above */
.ribbon-text {
    display: block;
    border-top: 2px solid var(--gold);
    padding-top: 6px;
    margin-top: 4px;
    font-size: 12px;
    opacity: 0.95;
}

/* mobile adjustments for ribbon */
@media (max-width: 600px) {
    .ribbon-body {
        padding: 10px 24px;
        font-size: 12px;
    }
    .ribbon-body::before,
    .ribbon-body::after {
        width: 14px;
        height: 14px;
    }
}

/* Desktop expansion for the ribbon */
@media (min-width: 768px) {
    .ribbon-body {
        max-width: 800px;        /* wider */
        padding: 18px 60px;
        font-size: 16px;
        border-radius: 0 0 24px 24px;
    }
    .ribbon-text {
        font-size: 14px;
    }
    .ribbon-body::before,
    .ribbon-body::after {
        width: 24px;
        height: 24px;
    }
}