      :root {
        --ms-blue: #0078d4;
        --ms-blue-hover: #106ebe;
        --ms-red: #f25022;
        --ms-green: #7fba00;
        --ms-yellow: #ffb900;
        --ms-blue-logo: #00bcf2;
        --ms-gray: #1b1b1b;
        --ms-gray-light: #605e5c;
        --ms-border: #8a8886;
        --ms-bg: #f5f5f5;
        --ms-error: #d83b01;
        --ms-error-bg: #fff4e6;
        --ms-error-border: #ffb900;
        --ms-warning: #ff8c00;
        --ms-warning-bg: #fff8e1;
        --ms-warning-border: #ffb900;
        --ms-info: #005a9e;
        --ms-info-bg: #f0f6ff;
        --ms-success: #107c10;
        --ms-white: #ffffff;
        --ms-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
        --ms-shadow-lg: 0 4px 20px rgba(0, 0, 0, 0.12);
        --ms-shadow-xl: 0 8px 40px rgba(0, 0, 0, 0.15);
        --ms-radius: 8px;
        --ms-radius-lg: 12px;
        --ms-radius-xl: 16px;
      }

      * {
        margin: 0;
        padding: 0;
        box-sizing: border-box;
      }

      body {
        font-family: "Segoe UI", "Segoe UI Web (West European)", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", sans-serif;
        background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
        color: var(--ms-gray);
        min-height: 100vh;
        display: flex;
        flex-direction: column;
        position: relative;
        overflow-x: hidden;
      }

      .main-container {
        flex: 1;
        display: flex;
        justify-content: center;
        align-items: center;
        padding: 24px;
        position: relative;
        z-index: 1;
      }

      .main-container::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" opacity="0.03"><path d="M0,0 L100,0 L100,100 L0,100 Z" fill="%230078d4"/></svg>') repeat;
        z-index: -1;
      }

      .card {
        background: var(--ms-white);
        border-radius: var(--ms-radius-lg);
        box-shadow: var(--ms-shadow-lg);
        width: 100%;
        max-width: 480px;
        overflow: hidden;
        border: 1px solid rgba(0, 0, 0, 0.08);
        animation: fadeIn 0.5s ease-out;
        position: relative;
        z-index: 2;
      }

      .card-header {
        padding: 32px 32px 0;
        text-align: center;
        border-bottom: 1px solid rgba(0, 0, 0, 0.06);
        background: linear-gradient(180deg, var(--ms-white) 0%, #fafafa 100%);
      }

      .card-body {
        padding: 32px;
      }

      .card-footer {
        padding: 24px 32px;
        border-top: 1px solid rgba(0, 0, 0, 0.06);
        background: #fafafa;
        text-align: center;
      }

      .ms-logo {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        margin-bottom: 24px;
      }

      .ms-logo-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        grid-gap: 1px;
        width: 24px;
        height: 24px;
        margin-right: 12px;
      }

      .ms-square {
        width: 100%;
        height: 100%;
      }

      .ms-square-red { background-color: var(--ms-red); }
      .ms-square-green { background-color: var(--ms-green); }
      .ms-square-blue { background-color: var(--ms-blue-logo); }
      .ms-square-yellow { background-color: var(--ms-yellow); }

      .ms-logo-text {
        font-size: 21px;
        font-weight: 600;
        color: var(--ms-gray);
        letter-spacing: -0.2px;
      }

      h1 {
        font-size: 28px;
        font-weight: 600;
        line-height: 1.3;
        margin-bottom: 8px;
        color: var(--ms-gray);
      }

      .subtitle {
        font-size: 15px;
        line-height: 1.5;
        color: var(--ms-gray-light);
        margin-bottom: 32px;
      }

      .caption {
        font-size: 13px;
        line-height: 1.4;
        color: var(--ms-gray-light);
      }

      .link {
        color: var(--ms-blue);
        text-decoration: none;
        font-size: 15px;
        transition: color 0.2s;
      }

      .link:hover {
        color: var(--ms-blue-hover);
        text-decoration: underline;
      }

      .camera-container {
        position: relative;
        width: 100%;
        height: 300px;
        border-radius: var(--ms-radius);
        overflow: hidden;
        margin-bottom: 16px;
        background: #000;
        border: 1px solid var(--ms-border);
      }

      .camera-video, .camera-preview {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transform: scaleX(-1);
      }

      .camera-overlay {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: radial-gradient(circle at center, transparent 40%, rgba(0, 0, 0, 0.6) 100%);
        pointer-events: none;
      }

      .instructions-popup {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.85);
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 1000;
        animation: fadeIn 0.3s ease-out;
        backdrop-filter: blur(4px);
      }

      .popup-content {
        background: var(--ms-white);
        border-radius: var(--ms-radius-xl);
        box-shadow: var(--ms-shadow-xl);
        width: 90%;
        max-width: 500px;
        overflow: hidden;
        animation: slideUp 0.4s cubic-bezier(0.18, 0.89, 0.32, 1.28);
      }

      .popup-header {
        padding: 24px 24px 16px;
        text-align: center;
        border-bottom: 1px solid rgba(0, 0, 0, 0.08);
        background: linear-gradient(180deg, var(--ms-white) 0%, #fafafa 100%);
        position: relative;
      }

      .popup-close {
        position: absolute;
        top: 16px;
        right: 16px;
        background: none;
        border: none;
        width: 32px;
        height: 32px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: all 0.2s;
        color: var(--ms-gray-light);
      }

      .popup-close:hover {
        background: rgba(0, 0, 0, 0.05);
        color: var(--ms-gray);
      }

      .popup-title {
        font-size: 22px;
        font-weight: 600;
        color: var(--ms-gray);
        margin-bottom: 8px;
      }

      .popup-subtitle {
        font-size: 14px;
        color: var(--ms-gray-light);
        line-height: 1.4;
      }

      .popup-body {
        padding: 24px;
        max-height: 60vh;
        overflow-y: auto;
      }

      .gif-container {
        text-align: center;
        margin-bottom: 24px;
      }

      .positioning-gif {
        max-width: 100%;
        max-height: 200px;
        border-radius: var(--ms-radius);
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
      }

      .instructions-list {
        background: var(--ms-info-bg);
        border: 1px solid rgba(0, 90, 158, 0.2);
        border-radius: var(--ms-radius);
        padding: 20px;
        margin-bottom: 20px;
      }

      .instructions-title {
        display: flex;
        align-items: center;
        margin-bottom: 16px;
        color: var(--ms-info);
        font-size: 16px;
        font-weight: 600;
      }

      .instructions-icon {
        margin-right: 10px;
        flex-shrink: 0;
      }

      .instructions-items {
        list-style: none;
      }

      .instruction-item {
        display: flex;
        align-items: flex-start;
        margin-bottom: 12px;
        padding-left: 8px;
        position: relative;
      }

      .instruction-item:last-child {
        margin-bottom: 0;
      }

      .instruction-number {
        background: var(--ms-blue);
        color: white;
        width: 22px;
        height: 22px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 12px;
        font-weight: 600;
        margin-right: 12px;
        flex-shrink: 0;
        margin-top: 1px;
      }

      .instruction-text {
        flex: 1;
        font-size: 14px;
        line-height: 1.5;
        color: var(--ms-gray);
      }

      .popup-timer {
        text-align: center;
        margin-top: 20px;
        padding: 12px;
        background: var(--ms-bg);
        border-radius: var(--ms-radius);
        border: 1px solid rgba(0, 0, 0, 0.08);
      }

      .timer-text {
        font-size: 14px;
        color: var(--ms-gray-light);
        margin-bottom: 8px;
      }

      .timer-display {
        font-size: 24px;
        font-weight: 600;
        color: var(--ms-blue);
        font-family: 'Segoe UI', monospace;
      }

      .timer-progress {
        height: 4px;
        background: rgba(0, 120, 212, 0.2);
        border-radius: 2px;
        margin-top: 12px;
        overflow: hidden;
      }

      .timer-progress-bar {
        height: 100%;
        width: 100%;
        background: linear-gradient(90deg, var(--ms-blue) 0%, var(--ms-blue-hover) 100%);
        border-radius: 2px;
        animation: timerProgress 30s linear forwards;
      }

      .warning-message {
        background: var(--ms-warning-bg);
        border: 1px solid var(--ms-warning-border);
        border-radius: var(--ms-radius);
        padding: 16px;
        margin-bottom: 20px;
        animation: slideDown 0.3s ease-out;
      }

      .warning-header {
        display: flex;
        align-items: center;
        margin-bottom: 12px;
      }

      .warning-icon {
        color: var(--ms-warning);
        margin-right: 12px;
        flex-shrink: 0;
      }

      .warning-title {
        font-size: 15px;
        font-weight: 600;
        color: var(--ms-warning);
      }

      .warning-list {
        list-style: none;
        padding-left: 0;
      }

      .warning-item {
        display: flex;
        align-items: flex-start;
        margin-bottom: 8px;
        font-size: 14px;
        line-height: 1.4;
        color: var(--ms-gray);
      }

      .warning-item:last-child {
        margin-bottom: 0;
      }

      .warning-bullet {
        color: var(--ms-warning);
        margin-right: 8px;
        flex-shrink: 0;
        margin-top: 2px;
      }

      .ms-button {
        background: linear-gradient(180deg, var(--ms-blue) 0%, var(--ms-blue-hover) 100%);
        color: white;
        border: none;
        border-radius: var(--ms-radius);
        padding: 12px 24px;
        font-size: 15px;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.2s;
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: 44px;
        width: 100%;
        position: relative;
        overflow: hidden;
      }

      .ms-button:hover {
        background: linear-gradient(180deg, var(--ms-blue-hover) 0%, #0a5ea0 100%);
        box-shadow: 0 2px 8px rgba(0, 120, 212, 0.3);
        transform: translateY(-1px);
      }

      .ms-button:active {
        transform: translateY(0);
        box-shadow: 0 1px 4px rgba(0, 120, 212, 0.2);
      }

      .ms-button:disabled {
        background: #c7e0f4;
        cursor: not-allowed;
        transform: none;
        box-shadow: none;
      }

      .ms-button.error {
        background: linear-gradient(90deg, #d83b01 0%, #a52714 100%);
      }

      .ms-button.success {
        background: linear-gradient(90deg, #7fba00 0%, #5d9d00 100%);
      }

      .error-message {
        background: var(--ms-error-bg);
        border: 1px solid var(--ms-error-border);
        border-radius: var(--ms-radius);
        padding: 12px 16px;
        margin-bottom: 24px;
        display: flex;
        align-items: flex-start;
        animation: slideDown 0.3s ease-out;
      }

      .error-icon {
        color: var(--ms-error);
        margin-right: 12px;
        flex-shrink: 0;
        margin-top: 2px;
      }

      .error-text {
        font-size: 14px;
        color: var(--ms-error);
        line-height: 1.4;
      }

      .loading-overlay {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.7);
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        z-index: 10;
      }

      .loading-spinner {
        width: 48px;
        height: 48px;
        border: 3px solid rgba(255, 255, 255, 0.3);
        border-radius: 50%;
        border-top-color: var(--ms-blue);
        animation: spin 1s linear infinite;
        margin-bottom: 16px;
      }

      .loading-text {
        color: white;
        font-size: 14px;
        font-weight: 500;
      }

      .page-footer {
        background: var(--ms-white);
        border-top: 1px solid rgba(0, 0, 0, 0.08);
        padding: 16px 24px;
        position: relative;
        z-index: 100;
      }

      .footer-links {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 24px;
        margin-bottom: 8px;
      }

      .footer-link {
        color: var(--ms-gray-light);
        text-decoration: none;
        font-size: 13px;
        transition: color 0.2s;
      }

      .footer-link:hover {
        color: var(--ms-blue);
      }

      .footer-note {
        text-align: center;
        font-size: 12px;
        color: var(--ms-gray-light);
        line-height: 1.4;
        padding: 0 16px;
      }

      .footer-note a {
        color: var(--ms-blue);
        text-decoration: none;
      }

      .footer-note a:hover {
        text-decoration: underline;
      }

      @keyframes fadeIn {
        from { opacity: 0; }
        to { opacity: 1; }
      }

      @keyframes slideUp {
        from { opacity: 0; transform: translateY(40px) scale(0.95); }
        to { opacity: 1; transform: translateY(0) scale(1); }
      }

      @keyframes slideDown {
        from { opacity: 0; transform: translateY(-10px); }
        to { opacity: 1; transform: translateY(0); }
      }

      @keyframes spin {
        to { transform: rotate(360deg); }
      }

      @keyframes timerProgress {
        from { width: 100%; }
        to { width: 0%; }
      }

      @keyframes pulse {
        0% { transform: scale(1); }
        50% { transform: scale(1.05); }
        100% { transform: scale(1); }
      }

      @media (max-width: 900px) {
        .main-container {
          padding: 16px;
          align-items: flex-start;
          padding-top: 40px;
        }

        .card {
          max-width: 100%;
          border-radius: 12px;
        }

        .card-header {
          padding: 24px 24px 0;
        }

        .card-body {
          padding: 24px;
        }

        .card-footer {
          padding: 20px 24px;
        }

        h1 {
          font-size: 24px;
          margin-bottom: 6px;
        }

        .subtitle {
          font-size: 14px;
          margin-bottom: 24px;
        }

        .camera-container {
          height: 280px;
        }

        .popup-content {
          width: 95%;
          max-width: 95%;
          margin: 16px;
        }

        .popup-header {
          padding: 20px 20px 16px;
        }

        .popup-body {
          padding: 20px;
          max-height: 70vh;
        }

        .positioning-gif {
          max-height: 160px;
        }

        .instructions-list {
          padding: 16px;
        }

        .instruction-item {
          margin-bottom: 10px;
        }

        .instruction-text {
          font-size: 13px;
        }

        .warning-message {
          padding: 14px;
          margin-bottom: 16px;
        }

        .warning-title {
          font-size: 14px;
        }

        .warning-item {
          font-size: 13px;
        }

        .ms-button {
          min-height: 48px;
          font-size: 16px;
        }

        .page-footer {
          padding: 12px 16px;
        }

        .footer-links {
          gap: 16px;
          margin-bottom: 6px;
        }

        .footer-link {
          font-size: 12px;
        }

        .footer-note {
          font-size: 11px;
          padding: 0 8px;
        }
      }

      @media (min-width: 601px) and (max-width: 900px) {
        .card {
          max-width: 520px;
        }

        .camera-container {
          height: 320px;
        }

        .positioning-gif {
          max-height: 180px;
        }

        .main-container {
          padding: 32px;
        }
      }

      @media (min-width: 901px) {
        .main-container {
          padding: 40px;
        }

        .card {
          max-width: 520px;
          box-shadow: var(--ms-shadow-lg);
        }

        .camera-container {
          height: 340px;
        }

        .positioning-gif {
          max-height: 200px;
        }

        .page-footer {
          padding: 20px 32px;
        }

        .footer-links {
          gap: 32px;
        }
      }

      @media (min-width: 1200px) {
        .card {
          max-width: 560px;
        }

        .camera-container {
          height: 360px;
        }

        .positioning-gif {
          max-height: 220px;
        }

        .main-container {
          padding: 48px;
        }
      }

      .hidden {
        display: none !important;
      }

      .space-y-4 > * + * {
        margin-top: 16px;
      }

      .text-center {
        text-align: center;
      }

      .mb-4 { margin-bottom: 16px; }
      .mb-6 { margin-bottom: 24px; }
      .mb-8 { margin-bottom: 32px; }
      .mt-3 { margin-top: 12px; }
      .mt-6 { margin-top: 24px; }
