/* ============================= */
/* Miles Portal */
/* ============================= */

@font-face {
    font-family: 'Games';
    src: url('../fonts/Games.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}



:root{
    --primary:#004f80;
    --bg:#111;
    --card:#c9c5c5;
    --accent:#ffab00;
    --text:#000000;
    --muted:#000000;
    --border:#c9c5c5;
    --success:#00cc6a;
    --warning:#cc8800;
    --danger:#cc4444;
}

*{box-sizing:border-box;margin:0;padding:0;}

body{
    font-family: sans-serif;
    font-weight: 400;
    font-size: 1rem;
    line-height: 1;
    text-transform: capitalize;
    letter-spacing: 1px;
    background: #fff;
    color:var(--text);
    text-align:center;
}

body.modal-active{overflow:hidden;}

.row{max-width:360px;margin:20px auto;padding:15px;background:transparent;margin-top: -25px;border-radius:8px;}

/* TIMER */
.time-wrapper{font-family: 'Games', sans-serif;font-weight: 400;font-size:22px;
    line-height: 1;color:#fff;margin-top: 10px;margin-bottom:10px;border: 1px solid #325370;border-radius: 10px;padding: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    text-align: center;
    background: repeating-linear-gradient(
        45deg,
        rgba(50, 83, 112, 0.8),
        rgba(50, 83, 112, 0.8) 10px,
        rgba(60, 95, 125, 0.8) 10px,
        rgba(60, 95, 125, 0.8) 20px
    );
    width: fit-content;margin-left: auto;margin-right: auto;}
.time-wrapper small {
    margin-top: auto;
    margin-bottom: auto;
    font-size: 13px;
}

.timer-display {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    margin-bottom: 8px;
}

.timer-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 45px;
    padding: 3px 2px;
    background: #325370;
    border: 1px solid #325370;
    border-radius: 5px;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.8);
}

.timer-box span {
    display: block;
    font-size: 22px;
    font-weight: 400;
    color: #d6e7f5;
    text-shadow: 0 2px 2px rgba(0,0,0,0.8);
    line-height: 1;
}

.timer-box small {
    display: block;
    font-size: 9px;
    font-weight: 400;
    color: #a4b0be;
    text-transform: uppercase;
    margin-top: 2px;
}

/* Member Info Display - matches status box style */
.member-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 8px 20px;
    background: #325370;
    border: 1px solid #325370;
    border-radius: 5px;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.8);
    font-family: sans-serif;
    font-weight: 900;
    margin-top: 10px;
    margin-bottom: 10px;
}

.member-avatar {
    width: 24px;
    height: 24px;
    background: var(--success);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #111;
    flex-shrink: 0;
}

.member-details {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.member-label {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1px;
    line-height: 1;
}

.member-name {
    font-size: 16px;
    font-weight: 900;
    color: #fff;
    letter-spacing: 1px;
    line-height: 1;
}

@keyframes memberLoginFadeIn {
    0% { opacity: 0; transform: translateY(-10px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* STATUS */
#status{font-family: 'Games', sans-serif;font-weight: 400;font-size: 39px;transition: color 0.08s ease;letter-spacing: 1px;will-change: color;
    display: inline-block;padding: 8px 20px;border-radius: 10px;position: relative;text-align: center;text-transform: uppercase;text-shadow: 0 2px 2px rgba(0,0,0,0.5);}
#status.connected{color: var(--success);}
#status.paused{color: var(--warning);}
#status:not(.connected):not(.paused){color: var(--danger);}




@keyframes wifiPulse {
    0%, 100% { opacity: 1; transform: translateY(-50%) scale(1); }
    50% { opacity: 0.8; transform: translateY(-50%) scale(1.1); }
}

.btn-group{width:100%;margin-bottom:10px;}

/* BUTTONS */
.btn{
    font-family: 'Games', sans-serif;
    width:100%;height:45px;margin:5px 0;font-weight: 400;font-size: 1.2rem;
    line-height: 1;
    text-transform: uppercase;letter-spacing: 1px;padding: 0.5rem 1rem;
    border: 1px solid #133a5c;border-radius: 25px;cursor: pointer;
    background:#133a5c;color:#fff;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.8);
}

.btn-footer{display:flex;gap:10px;justify-content:center;}
.btn-footer .btn{width:auto;flex:1;}

.btn-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
    flex-shrink: 0;
    filter: brightness(0) invert(1);
}

.btn-close-icon {
    width: 16px;
    height: 16px;
}

.btn-login-icon {
    width: 16px;
    height: 16px;
}

/* Smaller width for logout button only (not pause) */
#pauseBtn.logout-mode {
    width: auto;
    flex: 0 0 auto;
    min-width: 100px;
    margin-left: auto;
    margin-right: auto;
}

.btn-primary{background:var(--primary);color:#fff;}
.btn-secondary{background:#133a5c;color:#fff;border: 1px solid #133a5c;}
.btn-logout{background:#133a5c;color:#fff;border: 1px solid #133a5c;}
.btn-memberlogin{background:#133a5c;color:#fff;border: 1px solid #133a5c;}
.btn-success{background:#133a5c;color:#fff;border: 1px solid #133a5c;}
.btn-warning{background:#CC4444;color:#fff;border: 1px solid #CC4444;}
.btn-info{background:#133a5c;color:#fff;border: 1px solid #133a5c;}
.btn-rates{background:#133a5c;color:#fff;border: 1px solid #133a5c;}
.btn-cancel{background:#133a5c;color:#fff;border: 1px solid #133a5c;}
.btn-GCash{background:#133a5c;color:#fff;border: 1px solid #133a5c;}
.btn:active{opacity:0.8;}

/* INPUT AREA */
.input-group{display:flex;border-radius:25px;width:100%;margin:2.5px auto;box-sizing:border-box;gap:0;overflow:hidden;}
.input-group input[type="text"]{flex:1;height:45px;border: 1px solid #325370;padding:10px 15px;color:#000;font-size:14px;box-shadow: inset 0 1px 3px rgba(0,0,0,0.8);line-height: 1;min-width:0;}
.input-group .submit{margin:0;width:110px;flex-shrink:0;height:45px;}
.input-group input[type="text"]:first-child{border-top-left-radius:25px;border-bottom-left-radius:25px;border-top-right-radius:0;border-bottom-right-radius:0;border-right:none;}
.input-group .submit:last-child{border-top-right-radius:25px;border-bottom-right-radius:25px;border-top-left-radius:0;border-bottom-left-radius:0;}

.submit{
    font-family: 'Games', sans-serif;font-weight: 400;font-size: 1.2rem;
    line-height: 1;
    text-transform: uppercase;letter-spacing: 1px;padding: 0.5rem 1rem;
    border: 1px solid #133a5c;border-radius: 25px;cursor: pointer;width:110px;
    background:#133a5c;color:#fff;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.8);
}

.submit i{
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

/* TABLES */
table{width:100%;border-collapse:collapse;font-size:13px;
    line-height: 1;}
td{padding:6px;border-bottom:1px solid var(--border);}
thead{padding:6px;border-bottom:1px solid var(--border);}

/* MODAL */
.modal{background: rgba(0,0,0,0.85);position: fixed;width: 100%;height: 100%;top: 0;left: 0;opacity: 0;visibility: hidden;z-index: 99999;display: none;align-items: center;justify-content: center;}
.modal.show{display: flex !important;opacity: 1 !important;visibility: visible !important;}
.modal-dialog{background: #325370;width: 90%;max-width: 350px;margin: 0;padding: 20px;border: 1px solid #325370;border-radius: 5px;box-shadow: inset 0 1px 3px rgba(0,0,0,0.8);font-family: sans-serif;animation: modalOpen 0.3s ease-out forwards;}
@keyframes modalOpen {
    0% { opacity: 0; transform: scale(0.9) translateY(20px); }
    100% { opacity: 1; transform: scale(1) translateY(0); }
}
.modal .header{font-family: 'Games', sans-serif;font-weight: 400;margin-bottom:15px;color: #d6e7f5;text-shadow: 0 2px 2px rgba(0,0,0,0.5);font-size: 20px;}
.modal #totalTime,.modal #validity,.modal #message,.modal td p,.modal td,.modal thead td{color: #d6e7f5;font-family: 'Games', sans-serif;font-weight: 400;font-size: 15px;}
.modal input{width:100%;height:40px;margin:5px 0;border: 1px solid #325370;border-radius:5px;background:#151515;color:#fff;padding:8px;}
.modal .btn{font-family: 'Games', sans-serif;}

/* MARQUEE - Smooth scrolling text */
.marquee-container {
    width: 100%;
    max-width: 480px;
    margin: 10px auto;
    border-radius: 5px;
    padding: 10px 0;
    overflow: hidden;
    margin-top: -10px;
}

.marquee-content {
    display: inline-block;
    font-family: 'Games', sans-serif;
    font-weight: 400;
    font-size: 20px;
    color: #004f80;
    white-space: nowrap;
    padding-left: 100%;
    animation: marquee 25s linear infinite;
}

@keyframes marquee {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-100%);
    }
}

/* Responsive marquee speed adjustments */
@media (max-width: 480px) {
    .marquee-container {
        max-width: 100%;
    }
    .marquee-content {
        font-size: 16px;
        animation-duration: 20s;
    }
}

@media (min-width: 768px) {
    .marquee-container {
        max-width: 480px;
    }
    .marquee-content {
        font-size: 20px;
        animation-duration: 30s;
    }
}

@media (min-width: 1024px) {
    .marquee-container {
        max-width: 560px;
    }
}

@media (min-width: 1440px) {
    .marquee-container {
        max-width: 660px;
    }
}

.rates-preview {
    width: 100%;
    margin: 5px auto;
    border: 1px solid #325370;
}

.rates-preview table {
    font-size: 13px;
    color: var(--primary);
    font-family: 'Games', sans-serif;
}

.rates-preview td {
    padding: 3px 4px;
    color: var(--primary);
    font-family: 'Games', sans-serif;
    font-weight: 400;
}

.rates-preview thead td {
    font-weight: 400;
    color: var(--primary);
    font-family: 'Games', sans-serif;
}

.rates-preview tbody td {
    color: var(--primary);
    font-weight: 400;
    font-family: 'Games', sans-serif;
}

/* FOOTER */
footer{font-size:14px;
    line-height: 1.4;color:var(--primary);margin-top:20px;overflow:hidden;}



/* UTILITIES */
.d-none{display:none;}

/* RESPONSIVE */
#timer {border: 5px dashed var(--border);padding: 4px 8px;font-weight: 900;display: inline-block;background-color:var(--primary);}

/* Tablet */
@media (min-width: 768px) {
    .row {
        max-width: 500px;
        margin: 30px auto;
        padding: 25px;
        margin-top: -30px;
    }
    .btn {font-size: 1.4rem;}
    .time-wrapper {font-size: 28px;}
    #timer {font-size: 22px;}
}

/* Desktop */
@media (min-width: 1024px) {
    .row {
        max-width: 600px;
        margin: 40px auto;
        padding: 30px;
        margin-top: 75px;
    }
    .btn {font-size: 1.5rem;}
    .time-wrapper {font-size: 32px;}
    #timer {font-size: 26px;}
    .modal-dialog {max-width: 450px;}
    .logo-spacer { margin-top: -100px; }
}

/* Large Desktop */
@media (min-width: 1440px) {
    .row {max-width: 700px;}
    .logo-spacer { margin-top: -100px; }
}

/* Extra small devices */
@media (max-width: 320px) {
    .row {
        margin: 10px;
        padding: 10px;
    }
    .btn {font-size: 1.1rem;}
    .time-wrapper {font-size: 18px;}
    input[type="text"] {font-size: 12px;}
}

/* LOADER */
.loader {
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top: 4px solid #fff;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
    display: inline-block;
    vertical-align: middle;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Button loading state */
.btn-loading {
    pointer-events: none;
}

.btn-loading .loader {
    margin-right: 8px;
}

/* COIN PROGRESS CIRCLE */
.coin-progress-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 15px auto;
    padding: 10px;
}

.coin-progress-circle {
    position: relative;
    width: 140px;
    height: 140px;
}

.coin-progress-circle svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.coin-progress-circle .coin-progress-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.2);
    stroke-width: 8;
}

.coin-progress-circle .coin-progress-fill {
    fill: none;
    stroke: #ffffff;
    stroke-width: 8;
    stroke-linecap: round;
    stroke-dasharray: 283;
    stroke-dashoffset: 283;
    transition: stroke-dashoffset 0.5s ease;
}

.coin-progress-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: #fff;
}

.coin-progress-content .coin-icon {
    display: block;
    font-size: 28px;
    color: var(--accent);
    margin-bottom: 5px;
    animation: coinPulse 1.5s ease-in-out infinite;
}

.coin-progress-content span {
   font-size: 28px;
   font-weight: 400;
   color: #fff;
   font-family: 'Games', sans-serif;
}

@keyframes coinPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.15); opacity: 0.85; }
}

.coin-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.coin-detail-row:last-child {
    border-bottom: none;
}

.coin-detail-label {
    color: rgba(255, 255, 255, 0.8);
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.coin-detail-label i {
    color: var(--accent);
    width: 16px;
    text-align: center;
}

.coin-detail-value {
    color: #fff;
    font-weight: 700;
    font-size: 14px;
}

/* INPUT ICONS - member login */
#Muser, #Mpass {
    background-repeat: no-repeat;
    background-position: 10px center;
    background-size: 18px;
    padding-left: 35px;
}

/* FLOATING ACTION BUTTONS */
.floating-actions {
    position: fixed;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: row;
    gap: 10px;
    z-index: 1000;
}

.fab-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    transition: transform 0.2s, box-shadow 0.2s;
    padding: 0;
}

.fab-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

.fab-btn:active {
    transform: scale(0.95);
}

 .fab-member {
     background: #325370;
 }
 
 .fab-ewallet {
     background: #0074C8;
 }
 
 .fab-deviceinfo {
     background: #17a2b8;
 }
 
.fab-icon {
    width: 28px;
    height: 28px;
    filter: brightness(0) invert(1);
}

.fab-ewallet .fab-icon {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

 .fab-btn i {
     color: #fff;
     font-size: 14px;
 }
 
  .fab-deviceinfo i {
      font-size: 22px;
  }

  .fab-theme {
      background: #6c757d;
  }

  .fab-theme i {
      font-size: 18px;
  }

  /* Dark Theme */
  body.dark-mode {
      background: #2d2d2d;
      color: #e0e0e0;
  }

  body.dark-mode .row {
      background: #2d2d2d;
  }

  body.dark-mode .time-wrapper {
      background: repeating-linear-gradient(
          45deg,
          rgba(30, 50, 70, 0.9),
          rgba(30, 50, 70, 0.9) 10px,
          rgba(40, 60, 80, 0.9) 10px,
          rgba(40, 60, 80, 0.9) 20px
      );
      border-color: #4a6380;
  }

  body.dark-mode .timer-box {
      background: #2d3a4a;
      border-color: #4a6380;
  }

  body.dark-mode .timer-box span {
      color: #e0e0e0;
  }

  body.dark-mode .timer-box small {
      color: #a0a0a0;
  }

  body.dark-mode .member-info {
      background: #2d3a4a;
      border-color: #4a6380;
  }

  body.dark-mode .member-label {
      color: rgba(255, 255, 255, 0.6);
  }

  body.dark-mode .member-name {
      color: #fff;
  }

  body.dark-mode #status {
      text-shadow: 0 2px 2px rgba(0,0,0,0.5);
  }

  body.dark-mode input[type="text"] {
      background: #2d2d2d;
      color: #e0e0e0;
      border-color: #4a6380;
  }

  body.dark-mode .modal-dialog {
      background: #2d2d2d;
      border-color: #4a6380;
  }

  body.dark-mode .modal .header {
      color: #e0e0e0;
  }

  body.dark-mode .modal input {
      background: #1a1a1a;
      color: #e0e0e0;
      border-color: #4a6380;
  }

   body.dark-mode footer {
       color: #5a9fd4;
   }

body.dark-mode .marquee-content {
        color: #5a9fd4;
    }

body.dark-mode .rates-preview,
body.dark-mode .rates-preview table,
body.dark-mode .rates-preview td {
    color: #5a9fd4;
    border-color: #4a6380;
}

.rates-preview-header {
    text-align: center;
    color: var(--primary);
    margin: 10px 0;
    font-size: 16px;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
    font-family: 'Games', sans-serif;
}

body.dark-mode .rates-preview-header {
    color: #5a9fd4;
    text-shadow: 0 2px 2px rgba(0,0,0,0.5);
}

body.dark-mode .coin-progress-bg {
      stroke: rgba(255, 255, 255, 0.15);
  }

  body.dark-mode .coin-progress-fill {
      stroke: #ffffff;
  }

  body.dark-mode .coin-progress-content span {
      color: #fff;
  }

  body.dark-mode .btn {
      text-shadow: 0 2px 2px rgba(0,0,0,0.5);
  }