/*──────────────────────────────────────────────────────────────────────────────
    GLOBAL STYLES
──────────────────────────────────────────────────────────────────────────────*/

/*── Import Fonts ─────────────────────────────────────────────────────────────*/
@import url('https://fonts.googleapis.com/css2?family=Public+Sans:wght@300;400;600;700&family=DM+Sans:wght@300;400;500;700&display=swap');

:root {
    --font-sans: 'Public Sans', sans-serif;
    --font-heading: 'DM Sans', sans-serif;
}

/*──────────────────────────────────────────────────────────────────────────────
  Base Styles
──────────────────────────────────────────────────────────────────────────────*/
body {
    font-family: var(--font-sans);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    margin: 0;
    background: #F5F1EC;
    color: #34312D;
    line-height: 1.5;
}

/*──────────────────────────────────────────────────────────────────────────────
  Header Styles
──────────────────────────────────────────────────────────────────────────────*/
h1, h2, h3, h4, .box-header {
    font-family: var(--font-heading);
    font-weight: 500;
}

/*──────────────────────────────────────────────────────────────────────────────
  Card Container
──────────────────────────────────────────────────────────────────────────────*/
.box {
    border: 1px solid #E2D8CC;
    margin: 2rem auto;
    width: 90%;
    max-width: 500px;
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.04);
    transition: box-shadow 0.2s ease;
}

.box:hover {
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.06);
}

/*──────────────────────────────────────────────────────────────────────────────
  Box Header Styles
──────────────────────────────────────────────────────────────────────────────*/
.box-header {
    font-size: 1.875rem;
    font-weight: 500;
    text-align: center;
    margin-bottom: 1rem;
    color: #34312D;
}

/*──────────────────────────────────────────────────────────────────────────────
  Center Elements Styles
──────────────────────────────────────────────────────────────────────────────*/
.center_elements {
    text-align: center;
}

.digit-buttons {
    display: grid;
    grid-template-columns: repeat(3, 4.5rem);
    grid-template-rows: repeat(3, 4.5rem);
    gap: 0.75rem;
    justify-content: center;
    margin-bottom: 1.5rem;
}

/*──────────────────────────────────────────────────────────────────────────────
  Button Base
──────────────────────────────────────────────────────────────────────────────*/
.btn1,
.btn2 {
    border: none;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}

/*──────────────────────────────────────────────────────────────────────────────
  Digit Buttons
──────────────────────────────────────────────────────────────────────────────*/
.btn1 {
    background-color: #E8DECF;
    color: #34312D;
    font-size: 1.5rem;
    width: 4.5rem;
    height: 4.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.btn1:hover:not([disabled]) {
    background-color: #B99A70;
    transform: translateY(-2px);
}

.btn1:active:not([disabled]) {
    background-color: #8C6E4F;
}

.btn1[disabled] {
    opacity: 0.4;
}

/*──────────────────────────────────────────────────────────────────────────────
  Action Buttons
──────────────────────────────────────────────────────────────────────────────*/
.btn2 {
    background-color: #B99A70;
    color: #FFFFFF;
    padding: 0.5rem 1rem;
    font-size: 1.125rem;
    border-radius: 0.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.btn2:hover:not([disabled]) {
    background-color: #8C6E4F;
}

.btn2[disabled] {
    background-color: #DDD0C0;
    color: #999;
    opacity: 0.5;
}

/*──────────────────────────────────────────────────────────────────────────────
  Digit Input Styles
──────────────────────────────────────────────────────────────────────────────*/
#digit_input {
    width: 16rem;
    font-size: 1.5rem;
    text-align: center;
    border: 1px solid #E2D8CC;
    border-radius: 6px;
    padding: 0.5rem;
    background: #FAF6F0;
    transition: background 0.2s, border-color 0.2s;
}

#digit_input:focus {
    background: #FFFFFF;
    border-color: #B99A70;
}

/*──────────────────────────────────────────────────────────────────────────────
  Number Display Box Styles
──────────────────────────────────────────────────────────────────────────────*/
#border {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 4.5rem;
    height: 4.5rem;
    border: 2px solid #B99A70;
    border-radius: 8px;
    margin: 1rem 0;
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.03);
}

#arrPrint {
    font-size: 2.5rem;
    line-height: 1;
    color: #34312D;
}

/*──────────────────────────────────────────────────────────────────────────────
  Modal Styles
──────────────────────────────────────────────────────────────────────────────*/
.modal {
    display: none;
    position: fixed;
    z-index: 1;
    padding-top: 5rem;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.4);
}

.modal-content {
    background-color: #FFFFFF;
    margin: auto;
    padding: 2rem;
    border-radius: 10px;
    border: 1px solid #E2D8CC;
    width: 90%;
    max-width: 800px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.close {
    color: #6D685F;
    font-size: 1.75rem;
}

.close:hover,
.close:focus {
    color: #34312D;
}

/*──────────────────────────────────────────────────────────────────────────────
  Card Body Text
──────────────────────────────────────────────────────────────────────────────*/
.card-body {
    text-align: justify;
    color: #6D685F;
}

/*──────────────────────────────────────────────────────────────────────────────
  Hidden Round Span
──────────────────────────────────────────────────────────────────────────────*/
#round_span {
    visibility: hidden;
}
