/* ==========================================================================
   Fonts
   ========================================================================== */

   @font-face {
    font-display: swap;
    font-family: "yekan-bakh";
    src: url("../../../font/yekan-bakh/YekanBakhFaNum-Fat.woff2") format('woff2');
    font-weight: 900;
    font-style: normal;
}

@font-face {
    font-display: swap;
    font-family: "yekan-bakh";
    src: url("../../../font/yekan-bakh/YekanBakhFaNum-Medium.woff2") format('woff2');
    font-weight: 500;
    font-style: normal;
}

@font-face {
    font-display: swap;
    font-family: "yekan-bakh";
    src: url("../../../font/yekan-bakh/YekanBakhFaNum-Bold.woff2") format('woff2');
    font-weight: bold;
    font-style: normal;
}

@font-face {
    font-display: swap;
    font-family: "yekan-bakh";
    src: url("../../../font/yekan-bakh/YekanBakhFaNum-Heavy.woff2") format('woff2');
    font-weight: 800;
    font-style: normal;
}

@font-face {
    font-display: swap;
    font-family: "yekan-bakh";
    src: url("../../../font/yekan-bakh/YekanBakhFaNum-Light.woff2") format('woff2');
    font-weight: 300;
    font-style: normal;
}

@font-face {
    font-display: swap;
    font-family: "yekan-bakh";
    src: url("../../../font/yekan-bakh/YekanBakhFaNum-Regular.woff2") format('woff2');
    font-weight: normal;
    font-style: normal;
}

body,
html {
    padding: 0;
    margin: 0;
    font-family: 'yekan-bakh', sans-serif;
    font-weight: 400;
    overflow: hidden;
}

.subtitle {
    font-size: 14px;
    color: #b3b3b3;
}

/* --- Writing Box Styles --- */
.writing {
    width: 320px;
    height: 200px;
    background-color: #3f3f3f;
    border: 1px solid #bbbbbb;
    border-radius: 6px 6px 4px 4px;
    position: relative;
}

.writing-error {
    width: 320px;
    height: 200px;
    border: 1px solid #bbbbbb;
    animation: glitchError 2.5s infinite;
    border-radius: 6px 6px 4px 4px;
    position: relative;
}

@keyframes glitchError {
    0% { transform: none; opacity: 1; }
    7% { transform: skew(-0.5deg, -0.9deg); opacity: 0.75; }
    10% { transform: none; opacity: 1; }
    27% { transform: none; opacity: 1; }
    30% { transform: skew(0.8deg, -0.1deg); opacity: 0.75; }
    35% { transform: none; opacity: 1; }
    52% { transform: none; opacity: 1; }
    55% { transform: skew(-1deg, 0.2deg); opacity: 0.75; }
    50% { transform: none; opacity: 1; }
    72% { transform: none; opacity: 1; }
    75% { transform: skew(0.4deg, 1deg); opacity: 0.75; }
    80% { transform: none; opacity: 1; }
    100% { transform: none; opacity: 1; }
}

/* --- Topbar Colors --- */
.writing .topbar {
    position: absolute;
    width: 100%;
    height: 12px;
    background-color: #f1f1f1;
    border-top-left-radius: 4px;
    border-top-right-radius: 4px;
}

.writing .topbar div {
    height: 6px;
    width: 6px;
    border-radius: 50%;
    margin: 3px;
    float: left;
}

.writing .topbar div.green {
    background-color: #60d060;
}
.writing .topbar div.red {
    background-color: red;
}
.writing .topbar div.yellow {
    background-color: #e6c015;
}

/* --- Code Lines --- */
.writing .code ul {
    list-style: none;
    margin: 0;
    padding: 15px;
}

.writing .code ul li {
    background-color: #9e9e9e;
    width: 0;
    height: 7px;
    border-radius: 6px;
    margin: 10px 0;
}

.errorLine {
    background-color: #c7151e !important;
    width: 100%;
    height: 7px;
    border-radius: 6px;
    margin: 10px 0;
}

/* --- Container & Layout --- */
.container {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
    width: 100%;
    transition: transform .5s;
}

.stack-container {
    position: relative;
    width: 420px;
    height: 210px;
    transition: width 1s, height 1s;
}

.pokeup:hover {
    transform: translateY(-10px);
    transition: .3s ease;
}

/* --- Error Message --- */
.error {
    width: 420px;
    padding: 40px;
    text-align: center;
}

.error h1 {
    font-size: 125px;
    margin: 0;
    padding: 0;
    font-weight: 700;
}

.error h2 {
    margin: -30px 0 0 0;
    padding: 0;
    font-size: 47px;
}

/* --- Perspective for Cards --- */
.perspec {
    perspective: 1000px;
}

.card {
    animation: tiltcard .5s ease-in-out 1s forwards;
    position: absolute;
}

@keyframes tiltcard {
    0% { transform: rotateY(0deg); }
    100% { transform: rotateY(-30deg); }
}

@keyframes explode {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(var(--spreaddist), var(--vertdist)) scale(var(--scaledist)); }
}

@keyframes writeLine {
    0% { width: 0; }
    100% { width: var(--linelength); }
}

/* --- Responsive Design --- */
@media screen and (max-width: 1000px) {
    .container {
        transform: scale(.85);
    }
}

@media screen and (max-width: 850px) {
    .container {
        transform: scale(.75);
    }
}

@media screen and (max-width: 775px) {
    .container {
        flex-wrap: wrap-reverse;
        align-items: inherit;
    }
}

@media screen and (max-width: 370px) {
    .container {
        transform: scale(.6);
    }
}

/* --- Footer --- */
footer {
    position: fixed;
    bottom: 0;
    height: 40px;
    border-top: 1px solid #33333342;
    width: 100%;
}

p.copyright {
    position: absolute;
    margin: 0;
    top: 9px;
    width: 100%;
    color: #000000a3;
    font-size: 1em;
    text-align: center;
    bottom: 0;
}

/* ==========================================================================
   Dark Mode Styles - Purple & White Theme
   ========================================================================== */
.dark-mode {
    background-color: #1a1a2e !important;
    color: #ffffff !important;
}

.dark-mode .error h1,
.dark-mode .error h2,
.dark-mode .error p {
    color: #ffffff !important;
}

.dark-mode .subtitle {
    color: #ccc !important;
}

.dark-mode .card {
    background-color: #162447 !important;
}

.dark-mode .writing {
    background-color: #1f4068 !important;
}

.dark-mode .topbar {
    background-color: #162447 !important;
}

.dark-mode .red,
.dark-mode .yellow,
.dark-mode .green {
    background-color: #fff !important;
}

.dark-mode .code ul li {
    background-color: #2a2a2a !important;
    height: 7px;
    border-radius: 6px;
    margin: 10px 0;
}

.dark-mode footer .copyright {
    color: #999 !important;
}
/* --- Header Style --- */
/* --- Header Style --- */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 9999;
    background-color: #1a1a2e !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  }
  
  .header-main {
    background-color: #162447;
    transition: background-color 0.3s ease;
  }
  
  .header-main:hover {
    background-color: #1f4068;
  }
  
  .header-title h5 {
    font-family: 'yekan-bakh', sans-serif;
    font-weight: bold;
    color: #ffffff;
    letter-spacing: 1px;
  }
  
  /* --- Dark Mode Button Enhanced --- */
  .btn.main-color-one-outline {
    border-color: var(--main-color-one) !important;
    color: var(--main-color-one) !important;
    background-color: transparent !important;
    transition: all 0.3s ease;
  }
  
  .btn.main-color-one-outline:hover {
    background-color: var(--main-color-one) !important;
    color: #fff !important;
    box-shadow: 0 0 10px rgba(108, 99, 255, 0.4);
  }
  .mode-toggle-wrapper .btn i {
    transition: transform 0.3s ease;
  }
  
  .mode-toggle-wrapper .btn:hover i {
    transform: rotate(15deg);
  }