/* pomodoro-timer.css */
:root {
    --primary-blue: #0052cc;
    --hero-gradient: linear-gradient(135deg, #0061ff 0%, #0033aa 100%);
    --bg-light: #f8fafc;
    --white: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --radius: 12px;
    --transition: all 0.3s ease;
    --success-bg: #ecfdf5;
    --success-text: #047857;
    --warning-bg: #fff7ed;
    --warning-text: #c2410c;
    --danger-bg: #fef2f2;
    --danger-text: #b91c1c;
  }
  
  *,
  *::before,
  *::after {
    box-sizing: border-box;
  }
  
  html {
    scroll-behavior: smooth;
  }
  
  body {
    margin: 0;
    font-family: "Inter", sans-serif;
    color: var(--text-main);
    background: var(--white);
    line-height: 1.7;
  }
  
  a {
    color: var(--primary-blue);
    text-decoration: none;
    transition: var(--transition);
  }
  
  a:hover {
    text-decoration: underline;
  }
  
  button,
  input {
    font: inherit;
  }
  
  .container {
    width: 100%;
    max-width: 1200px;
    padding: 0 16px;
    margin: 0 auto;
  }
  
  .pomodoro-hero {
    background: var(--hero-gradient);
    color: var(--white);
    padding: 34px 0 38px;
  }
  
  .breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 22px;
    font-size: 0.92rem;
  }
  
  .breadcrumb a,
  .breadcrumb span {
    color: rgba(255, 255, 255, 0.92);
  }
  
  .pomodoro-hero h1 {
    margin: 0;
    color: var(--white);
    font-size: clamp(2.25rem, 5vw, 3.7rem);
    line-height: 1.06;
    letter-spacing: -0.045em;
  }
  
  .main-area {
    padding: 42px 0 58px;
    background: var(--bg-light);
  }
  
  .timer-shell {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
    gap: 22px;
    align-items: start;
  }
  
  .timer-main-card,
  .timer-side-card,
  .settings-card,
  .content-section {
    min-width: 0;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--shadow-sm);
  }
  
  .timer-main-card {
    padding: 24px;
  }
  
  .timer-side-card {
    position: sticky;
    top: 18px;
    padding: 24px;
  }
  
  .settings-card {
    grid-column: 1 / -1;
    padding: 26px;
  }
  
  .mode-tabs {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 24px;
    padding: 6px;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    background: var(--bg-light);
  }
  
  .mode-tab {
    min-height: 44px;
    padding: 9px 12px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--text-muted);
    font-weight: 800;
    cursor: pointer;
    transition: var(--transition);
  }
  
  .mode-tab.active,
  .mode-tab:hover {
    background: var(--white);
    color: var(--primary-blue);
    box-shadow: var(--shadow-sm);
  }
  
  .timer-stage {
    text-align: center;
  }
  
  .timer-visual {
    position: relative;
    width: min(100%, 320px);
    aspect-ratio: 1;
    margin: 0 auto 24px;
  }
  
  .progress-ring {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
  }
  
  .ring-bg,
  .ring-progress {
    fill: none;
    stroke-width: 14;
  }
  
  .ring-bg {
    stroke: #edf2f7;
  }
  
  .ring-progress {
    stroke: var(--primary-blue);
    stroke-linecap: round;
    stroke-dasharray: 615.75;
    stroke-dashoffset: 615.75;
    transition: stroke-dashoffset 0.35s ease;
  }
  
  .timer-center {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 22px;
  }
  
  .session-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }
  
  .session-badge.focus {
    color: var(--primary-blue);
    background: rgba(0, 82, 204, 0.1);
  }
  
  .session-badge.shortBreak {
    color: var(--success-text);
    background: var(--success-bg);
  }
  
  .session-badge.longBreak {
    color: var(--warning-text);
    background: var(--warning-bg);
  }
  
  .countdown {
    font-size: clamp(3.1rem, 8vw, 5.25rem);
    font-weight: 900;
    line-height: 1;
    letter-spacing: -0.06em;
    color: var(--text-main);
    font-variant-numeric: tabular-nums;
  }
  
  .timer-center p {
    margin: 12px 0 0;
    max-width: 220px;
    color: var(--text-muted);
    font-size: 0.95rem;
    overflow-wrap: anywhere;
  }
  
  .timer-controls,
  .button-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
  }
  
  .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 12px 18px;
    border: 1px solid transparent;
    border-radius: var(--radius);
    font-weight: 900;
    cursor: pointer;
    transition: var(--transition);
  }
  
  .btn-primary {
    color: var(--white);
    background: var(--primary-blue);
    box-shadow: var(--shadow-sm);
  }
  
  .btn-primary:hover {
    background: #003f9e;
    transform: translateY(-1px);
    text-decoration: none;
  }
  
  .btn-secondary {
    color: var(--primary-blue);
    background: rgba(0, 82, 204, 0.08);
    border-color: rgba(0, 82, 204, 0.12);
  }
  
  .btn-secondary:hover {
    background: rgba(0, 82, 204, 0.13);
  }
  
  .btn-light {
    color: var(--text-main);
    background: var(--white);
    border-color: var(--border-color);
  }
  
  .btn-light:hover {
    background: var(--bg-light);
  }
  
  .btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
  }
  
  .mode-tab:focus,
  .btn:focus,
  .text-button:focus,
  input:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 82, 204, 0.16);
  }
  
  .timer-toggles {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px;
    margin-top: 18px;
  }
  
  .toggle-row {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: var(--text-muted);
    font-weight: 700;
  }
  
  .text-button {
    border: 0;
    background: transparent;
    color: var(--primary-blue);
    font-weight: 800;
    cursor: pointer;
  }
  
  .micro-note {
    margin: 16px auto 0;
    max-width: 620px;
    color: var(--text-muted);
    font-size: 0.92rem;
  }
  
  .status-line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 18px;
  }
  
  .status-line span {
    padding: 6px 12px;
    border-radius: 999px;
    background: var(--success-bg);
    color: var(--success-text);
    font-weight: 900;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
  }
  
  .status-line strong {
    color: var(--text-main);
  }
  
  .metric-grid,
  .summary-cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  
  .metric-card,
  .summary-cards div {
    min-width: 0;
    padding: 16px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: var(--bg-light);
  }
  
  .metric-card span,
  .summary-cards span {
    display: block;
    margin-bottom: 8px;
    color: var(--text-muted);
    font-size: 0.88rem;
    font-weight: 700;
  }
  
  .metric-card strong,
  .summary-cards strong {
    display: block;
    font-size: 1.2rem;
    overflow-wrap: anywhere;
  }
  
  .summary-panel {
    margin: 18px 0;
    padding: 18px;
    border-left: 4px solid var(--primary-blue);
    border-radius: 12px;
    background: rgba(0, 82, 204, 0.06);
  }
  
  .summary-panel h2 {
    margin: 0 0 8px;
    font-size: 1.3rem;
    letter-spacing: -0.02em;
  }
  
  .summary-panel p {
    margin: 0;
    color: var(--text-muted);
  }
  
  .section-heading {
    margin-bottom: 20px;
  }
  
  .section-heading h2,
  .content-section h2 {
    margin: 0 0 10px;
    font-size: clamp(1.45rem, 3vw, 2rem);
    line-height: 1.22;
    letter-spacing: -0.025em;
  }
  
  .section-heading p {
    margin: 0;
    color: var(--text-muted);
  }
  
  .settings-panel {
    display: none;
  }
  
  .settings-panel.active {
    display: block;
  }
  
  .form-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 16px;
  }
  
  .form-group {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
  
  .form-group label {
    font-weight: 800;
  }
  
  .form-group input {
    width: 100%;
    min-height: 48px;
    padding: 12px 14px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-main);
    background: var(--white);
  }
  
  .form-group input:focus {
    border-color: var(--primary-blue);
  }
  
  .form-message {
    display: none;
    margin-top: 18px;
    padding: 14px 16px;
    border-radius: 12px;
    font-weight: 800;
  }
  
  .form-message.error {
    display: block;
    color: var(--danger-text);
    background: var(--danger-bg);
  }
  
  .form-message.success {
    display: block;
    color: var(--success-text);
    background: var(--success-bg);
  }
  
  .button-row {
    justify-content: flex-start;
    margin-top: 20px;
  }
  
  .table-wrap {
    width: 100%;
    overflow-x: auto;
    margin-top: 24px;
    -webkit-overflow-scrolling: touch;
  }
  
  .schedule-table {
    width: 100%;
    min-width: 680px;
    border-collapse: collapse;
  }
  
  .schedule-table th,
  .schedule-table td {
    padding: 14px 16px;
    border: 1px solid var(--border-color);
    text-align: left;
    vertical-align: top;
  }
  
  .schedule-table th {
    background: #f1f5f9;
    font-weight: 900;
  }
  
  .schedule-table td {
    overflow-wrap: anywhere;
  }
  
  .content-section {
    margin-top: 30px;
    padding: 28px;
  }
  
  .content-section p {
    margin: 0 0 16px;
  }
  
  .content-section h3 {
    margin: 0 0 10px;
    font-size: 1.12rem;
  }
  
  .split-content {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(260px, 0.7fr);
    gap: 22px;
  }
  
  .soft-card {
    padding: 20px;
    border-radius: 14px;
    background: var(--bg-light);
    border: 1px solid var(--border-color);
  }
  
  .soft-card ul {
    margin: 0;
    padding-left: 20px;
  }
  
  .related-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-top: 18px;
  }
  
  .related-grid a {
    display: block;
    min-width: 0;
    padding: 14px 16px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: var(--bg-light);
    font-weight: 800;
    overflow-wrap: anywhere;
  }
  
  .related-grid a:hover {
    background: #f8fbff;
    border-color: rgba(0, 82, 204, 0.2);
    text-decoration: none;
  }
  
  .faq-section details {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: var(--white);
    overflow: hidden;
  }
  
  .faq-section details + details {
    margin-top: 12px;
  }
  
  .faq-section summary {
    padding: 18px 20px;
    cursor: pointer;
    font-weight: 900;
    list-style: none;
  }
  
  .faq-section summary::-webkit-details-marker {
    display: none;
  }
  
  .faq-section details p {
    padding: 0 20px 20px;
    color: var(--text-muted);
  }
  
  .final-cta {
    margin-top: 32px;
    padding: 34px 28px;
    border-radius: var(--radius);
    background: var(--hero-gradient);
    color: var(--white);
  }
  
  .final-cta h2,
  .final-cta p,
  .final-cta a {
    color: var(--white);
  }
  
  .final-cta h2 {
    margin: 0 0 12px;
    font-size: clamp(1.55rem, 3vw, 2.1rem);
  }
  
  .final-cta p {
    margin: 0;
  }
  
  @media (max-width: 1020px) {
    .timer-shell {
      grid-template-columns: 1fr;
    }
  
    .timer-side-card {
      position: static;
    }
  
    .form-grid {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }
  
    .split-content,
    .related-grid {
      grid-template-columns: 1fr;
    }
  }
  
  @media (max-width: 760px) {
    .mode-tabs {
      grid-template-columns: 1fr 1fr;
      border-radius: 18px;
    }
  
    .timer-main-card,
    .timer-side-card,
    .settings-card,
    .content-section,
    .final-cta {
      padding: 20px;
    }
  
    .metric-grid,
    .summary-cards {
      grid-template-columns: 1fr;
    }
  
    .timer-controls .btn,
    .button-row .btn {
      width: 100%;
    }
  }
  
  @media (max-width: 560px) {
    .pomodoro-hero {
      padding: 28px 0 32px;
    }
  
    .main-area {
      padding: 30px 0 44px;
    }
  
    .mode-tabs,
    .form-grid {
      grid-template-columns: 1fr;
    }
  
    .countdown {
      font-size: clamp(2.9rem, 18vw, 4.2rem);
    }
  
    .timer-visual {
      width: min(100%, 280px);
    }
  
    .schedule-table {
      min-width: 620px;
    }
  }