/* ========================================
   TABLET & RESPONSIVE SCREENS
   Optimized for 480px to 1200px+ screens
   ======================================== */

/* ===== SMALL PHONES (320px - 480px) ===== */
@media (max-width: 480px) {
  .container {
    padding: 20px 16px;
    border-radius: 16px;
  }

  h1 {
    font-size: 24px;
    margin-bottom: 18px;
  }

  .row {
    margin-bottom: 12px;
  }

  .field label {
    font-size: 13px;
  }

  select,
  input {
    font-size: 14px;
    padding: 10px 12px;
  }

  .num {
    width: 28px;
    height: 28px;
    font-size: 13px;
    min-width: 28px;
  }

  button {
    font-size: 13px;
    padding: 10px 16px;
  }

  .exam-requirements {
    padding: 10px 12px;
    gap: 8px;
  }

  .req-icon {
    font-size: 20px;
    min-width: 20px;
  }

  .req-content strong,
  .req-content p {
    font-size: 12px;
  }

  .completed h3 {
    font-size: 14px;
    margin-bottom: 10px;
  }

  .list .item {
    font-size: 11px;
    padding: 8px 10px;
  }

  /* Results screen adjustments */
  .results-layout {
    flex-direction: column;
    padding: 15px;
  }

  .results-left,
  .results-right {
    width: 100%;
    margin-bottom: 15px;
  }

  .results-left h1 {
    font-size: 20px;
    margin-bottom: 12px;
  }

  .stats-table {
    font-size: 12px;
  }

  .status-box {
    padding: 12px;
    gap: 10px;
    margin-bottom: 14px;
  }

  .status-box .icon {
    font-size: 20px;
    min-width: 20px;
  }

  .status-box strong {
    font-size: 13px;
  }

  .status-box p {
    font-size: 11px;
  }

  .comment-body {
    font-size: 13px;
  }

  .chart-container {
    max-height: 150px;
  }
}

/* ===== MEDIUM PHONES & SMALL TABLETS (481px - 768px) ===== */
@media (min-width: 481px) and (max-width: 768px) {
  .container {
    padding: 25px 20px;
    border-radius: 18px;
    max-width: 100%;
  }

  h1 {
    font-size: 28px;
    margin-bottom: 20px;
  }

  .row {
    margin-bottom: 14px;
  }

  .field label {
    font-size: 14px;
  }

  select,
  input {
    font-size: 15px;
    padding: 12px 14px;
  }

  .num {
    width: 32px;
    height: 32px;
    font-size: 14px;
  }

  button {
    font-size: 14px;
    padding: 11px 18px;
  }

  .completed {
    margin-top: 18px;
  }

  .completed h3 {
    font-size: 15px;
  }

  .list .item {
    font-size: 12px;
    padding: 10px 12px;
  }

  /* Results adjustments */
  .results-layout {
    flex-direction: column;
    padding: 20px;
  }

  .status-box {
    padding: 14px;
    margin-bottom: 16px;
  }

  .status-box strong {
    font-size: 15px;
  }

  .status-box p {
    font-size: 12px;
  }

  .stats-table {
    font-size: 13px;
    margin: 16px 0;
  }

  .chart-container {
    max-height: 200px;
  }
}

/* ===== TABLETS - PORTRAIT & LANDSCAPE (769px - 1024px) ===== */
@media (min-width: 769px) and (max-width: 1024px) {
  .container {
    padding: 30px 30px;
    border-radius: 20px;
    max-width: 600px;
    margin: 0 auto;
  }

  h1 {
    font-size: 32px;
    margin-bottom: 24px;
  }

  .row {
    margin-bottom: 16px;
  }

  .field label {
    font-size: 15px;
  }

  select,
  input {
    font-size: 16px;
    padding: 13px 15px;
  }

  .num {
    width: 36px;
    height: 36px;
    font-size: 15px;
  }

  button {
    font-size: 15px;
    padding: 12px 20px;
    border-radius: 10px;
  }

  .exam-requirements {
    padding: 14px 16px;
    margin: 16px 0;
  }

  .req-icon {
    font-size: 24px;
  }

  .req-content strong {
    font-size: 14px;
  }

  .req-content p {
    font-size: 13px;
  }

  .completed {
    margin-top: 24px;
  }

  .completed h3 {
    font-size: 16px;
  }

  .list .item {
    font-size: 13px;
    padding: 12px 14px;
  }

  /* Results screen for tablets */
  .results-layout {
    flex-direction: row;
    padding: 30px;
    gap: 30px;
  }

  .results-left {
    flex: 1;
    min-width: 350px;
  }

  .results-right {
    width: 280px;
  }

  .results-left h1 {
    font-size: 28px;
    margin-bottom: 18px;
  }

  .status-box {
    padding: 16px 18px;
    margin-bottom: 18px;
    border-radius: 12px;
  }

  .status-box .icon {
    font-size: 26px;
  }

  .status-box strong {
    font-size: 16px;
  }

  .status-box p {
    font-size: 13px;
  }

  .stats-table {
    font-size: 14px;
    margin: 18px 0;
  }

  .stats-table tr {
    height: 40px;
  }

  .comment-header {
    font-size: 15px;
    margin-bottom: 12px;
  }

  .comment-body {
    font-size: 13px;
  }

  .chart-container {
    max-height: 250px;
  }
}

/* ===== LARGE TABLETS & SMALL DESKTOPS (1025px - 1366px) ===== */
@media (min-width: 1025px) and (max-width: 1366px) {
  .container {
    padding: 35px 35px;
    border-radius: 22px;
    max-width: 700px;
  }

  h1 {
    font-size: 36px;
    margin-bottom: 26px;
  }

  .row {
    margin-bottom: 18px;
  }

  .field label {
    font-size: 16px;
  }

  select,
  input {
    font-size: 16px;
    padding: 14px 16px;
  }

  .num {
    width: 40px;
    height: 40px;
    font-size: 16px;
  }

  button {
    font-size: 16px;
    padding: 13px 22px;
  }

  .exam-requirements {
    padding: 16px 18px;
  }

  .completed h3 {
    font-size: 18px;
  }

  .list .item {
    font-size: 14px;
  }

  .results-layout {
    flex-direction: row;
    padding: 35px;
    gap: 35px;
  }

  .results-left {
    flex: 1;
    min-width: 450px;
  }

  .results-right {
    width: 320px;
  }

  .status-box {
    padding: 18px 20px;
    margin-bottom: 20px;
  }

  .status-box .icon {
    font-size: 28px;
  }

  .status-box strong {
    font-size: 17px;
  }

  .stats-table {
    font-size: 15px;
  }

  .chart-container {
    max-height: 280px;
  }
}

/* ===== DESKTOP & ULTRA-WIDE (1367px+) ===== */
@media (min-width: 1367px) {
  .container {
    padding: 40px 40px;
    border-radius: 24px;
    max-width: 800px;
  }

  h1 {
    font-size: 40px;
    margin-bottom: 28px;
  }

  .row {
    margin-bottom: 20px;
  }

  .field label {
    font-size: 17px;
  }

  select,
  input {
    font-size: 17px;
    padding: 15px 18px;
  }

  .num {
    width: 44px;
    height: 44px;
    font-size: 17px;
  }

  button {
    font-size: 17px;
    padding: 14px 24px;
  }

  .completed h3 {
    font-size: 19px;
  }

  .list .item {
    font-size: 15px;
  }

  .results-layout {
    flex-direction: row;
    padding: 40px;
    gap: 40px;
  }

  .results-left {
    flex: 1;
    min-width: 500px;
  }

  .results-right {
    width: 350px;
  }

  .status-box {
    padding: 20px 22px;
    margin-bottom: 22px;
  }

  .status-box .icon {
    font-size: 30px;
  }

  .status-box strong {
    font-size: 18px;
  }

  .stats-table {
    font-size: 16px;
  }

  .chart-container {
    max-height: 320px;
  }
}

/* ===== LANDSCAPE ADJUSTMENTS ===== */
@media (max-height: 500px) and (orientation: landscape) {
  .container {
    padding: 15px 20px;
    max-height: 90vh;
    overflow-y: auto;
  }

  h1 {
    font-size: 20px;
    margin-bottom: 10px;
  }

  .row {
    margin-bottom: 8px;
  }

  button {
    padding: 8px 14px;
    font-size: 13px;
  }

  .completed {
    display: none;
  }
}

/* ===== FOLDABLE & MULTI-SCREEN DEVICES ===== */
@media (screen-spanning: single-fold-vertical) {
  .results-layout {
    flex-direction: column;
  }

  .results-left,
  .results-right {
    width: 100%;
  }
}

@media (screen-spanning: single-fold-horizontal) {
  .results-layout {
    flex-direction: row;
    gap: 20px;
  }
}

/* ===== PIXEL RATIO ADJUSTMENTS ===== */
@media (-webkit-min-device-pixel-ratio: 2),
       (min-resolution: 192dpi) {
  /* High DPI screens - sharper text */
  * {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }
}

/* ===== TOUCH DEVICE OPTIMIZATIONS ===== */
@media (hover: none) and (pointer: coarse) {
  button,
  select {
    min-height: 44px;
    min-width: 44px;
  }

  .btn {
    min-height: 48px;
    font-size: 16px;
  }

  .toggle-switch {
    transform: scale(1.2);
  }
}

/* ===== PRINT MEDIA ===== */
@media print {
  body {
    background: white;
    color: black;
  }

  .overlay,
  .menu-btn,
  .close-btn,
  button {
    display: none;
  }

  .results-layout {
    max-width: 100%;
    padding: 0;
  }
}
