* {
      box-sizing: border-box;
      margin: 0;
      padding: 0;
    }

    :root {
      --primary-color: #1890ff;
      --primary-dark: #096dd9;
      --secondary-color: #ffa726;
      --success-color: #52c41a;
      --warning-color: #faad14;
      --error-color: #f5222d;
      --text-primary: #333;
      --text-secondary: #666;
      --border-color: #e8e8e8;
      --bg-light: #f5f5f5;
      --bg-card: #ffffff;
      --shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
      --radius: 8px;
      --transition: all 0.3s ease;
    }

    body {
      font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
      background-color: var(--bg-light);
      color: var(--text-primary);
      line-height: 1.6;
      padding: 20px;
    }

    .container {
      max-width: 1200px;
      margin: 0 auto;
    }

    header {
      text-align: center;
      margin-bottom: 30px;
      padding: 20px 0;
    }

    h1 {
      font-size: 28px;
      font-weight: 600;
      color: var(--primary-color);
      margin-bottom: 10px;
    }

    .subtitle {
      color: var(--text-secondary);
      font-size: 16px;
    }

    .card {
      background: var(--bg-card);
      border-radius: var(--radius);
      box-shadow: var(--shadow);
      padding: 24px;
      margin-bottom: 24px;
      transition: var(--transition);
    }

    .card:hover {
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
    }

    .card-title {
      font-size: 20px;
      font-weight: 600;
      margin-bottom: 16px;
      color: var(--primary-color);
      display: flex;
      align-items: center;
      gap: 10px;
    }

    .card-title i {
      font-size: 20px;
    }

    .form-group {
      margin-bottom: 16px;
    }

    #loginForm .form-group {
      display: flex;
      align-items: center;
      gap: 8px;
    }

    label {
      display: inline;
      margin-bottom: 0;
      font-weight: 500;
      color: var(--text-primary);
      min-width: 70px;
      white-space: nowrap;
    }

    input[type="text"],
    input[type="password"],
    textarea,
    select {
      width: 100%;
      padding: 10px 12px;
      border: 1px solid var(--border-color);
      border-radius: var(--radius);
      font-size: 16px;
      transition: var(--transition);
    }

    #loginForm input[type="text"],
    #loginForm input[type="password"] {
      width: auto,
      flex: 1;
      min-width: 0;
    }

    input[type="text"]:focus,
    input[type="password"]:focus,
    textarea:focus,
    select:focus {
      outline: none;
      border-color: var(--primary-color);
      box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
    }

    .btn {
      display: inline-block;
      padding: 10px 20px;
      background: var(--primary-color);
      color: white;
      border: none;
      border-radius: var(--radius);
      font-size: 16px;
      font-weight: 500;
      cursor: pointer;
      transition: var(--transition);
      text-align: center;
    }

    .btn:hover {
      background: var(--primary-dark);
      transform: translateY(-2px);
    }

    .btn-secondary {
      background: var(--secondary-color);
    }

    .btn-secondary:hover {
      background: #d9901a;
    }

    .btn-success {
      background: var(--success-color);
    }

    .btn-warning {
      background: var(--warning-color);
    }

    .btn-error {
      background: var(--error-color);
    }

    .btn-block {
      width: 100%;
    }

    .btn-group {
      display: flex;
      gap: 8px;
      flex-wrap: wrap;
    }

    .btn-group .btn {
      flex: 0 0 auto;
      text-align: center;
    }

    .checkbox-group {
      display: flex;
      align-items: center;
      gap: 8px;
      margin-bottom: 12px;
    }

    .checkbox-group input[type="checkbox"] {
      width: auto;
    }

    .radio-group {
      display: flex;
      gap: 16px;
      margin-bottom: 16px;
      flex-wrap: wrap;
    }

    .radio-group label {
      display: flex;
      align-items: center;
      gap: 6px;
      margin-bottom: 0;
      cursor: pointer;
    }

    .radio-group input[type="radio"] {
      width: auto;
    }

    .file-input {
      margin-top: 10px;
    }

    .file-input-label {
      display: inline-block;
      padding: 8px 16px;
      background: #f0f0f0;
      border: 1px dashed #ccc;
      border-radius: var(--radius);
      cursor: pointer;
      transition: var(--transition);
    }

    .file-input-label:hover {
      background: #e6e6e6;
    }

    .hidden {
      display: none !important;
    }

    .app-list {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
      gap: 20px;
      margin-top: 16px;
    }

    .app-item {
      border: 1px solid var(--border-color);
      border-radius: var(--radius);
      padding: 16px;
      background: white;
      transition: var(--transition);
    }

    .app-item:hover {
      box-shadow: var(--shadow);
    }

    .app-name {
      font-weight: 600;
      margin-bottom: 12px;
      color: var(--primary-color);
    }

    .app-details {
      margin-bottom: 16px;
    }

    .app-detail {
      display: flex;
      margin-bottom: 8px;
    }

    .app-detail label {
      min-width: 120px;
      font-weight: 500;
    }

    .app-actions {
      display: flex;
      gap: 8px;
      flex-wrap: wrap;
    }

    .app-actions .btn {
      padding: 6px 12px;
      font-size: 14px;
    }

    .desktop-container {
      height: 1080px;
      border: 1px solid var(--border-color);
      border-radius: var(--radius);
      overflow: hidden;
      margin-bottom: 24px;
      position: relative;
    }
    .desktop-container.maximized {
      position: fixed;
      top: 0;
      left: 0;
      width: 100vw;
      height: 100vh;
      border: none;
      border-radius: 0;
      margin: 0;
      z-index: 9999;
      background: #000;
    }

    .card-title-row {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 8px;
    }

    .card-title-row .card-title {
      margin-bottom: 0;
    }

    .btn-maximize {
      padding: 6px 16px;
      font-size: 13px;
      white-space: nowrap;
    }

    .btn-maximize-float {
      position: absolute;
      top: 12px;
      right: 12px;
      z-index: 10000;
      padding: 5px 10px;
      background: rgba(0, 0, 0, 0.6);
      color: #fff;
      border: 1px solid rgba(255, 255, 255, 0.3);
      border-radius: 6px;
      font-size: 14px;
      cursor: pointer;
      opacity: 0;
      transition: opacity 0.3s;
    }

    .desktop-container.maximized .btn-maximize-float {
      display: block !important;
    }

    .desktop-container.maximized:hover .btn-maximize-float {
      opacity: 1;
    }

    #sessionIframe {
      width: 100%;
      height: 100%;
      border: none;
    }

    .thumbnail-container {
      display: flex;
      flex-wrap: wrap;
      gap: 16px;
      margin-top: 20px;
    }

    .thumbnail-item {
      width: 200px;
      height: 360px;
      border: 1px solid var(--border-color);
      border-radius: var(--radius);
      overflow: hidden;
      position: relative;
    }

    .thumbnail-item img {
      width: 100%;
      height: 100%;
      object-fit: cover;
    }

    .thumbnail-item .loading {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      display: flex;
      justify-content: center;
      align-items: center;
      background: rgba(255, 255, 255, 0.8);
      color: var(--text-secondary);
    }

    .status-indicator {
      display: inline-block;
      width: 10px;
      height: 10px;
      border-radius: 50%;
      margin-right: 8px;
    }

    .status-connected {
      background: var(--success-color);
    }

    .status-disconnected {
      background: var(--error-color);
    }

    .status-pending {
      background: var(--warning-color);
    }

    .notification {
      position: fixed;
      top: 20px;
      right: 20px;
      padding: 12px 20px;
      border-radius: var(--radius);
      color: white;
      font-weight: 500;
      box-shadow: var(--shadow);
      z-index: 1000;
      transform: translateX(120%);
      transition: transform 0.3s ease;
    }

    .notification.show {
      transform: translateX(0);
    }

    .notification.success {
      background: var(--success-color);
    }

    .notification.error {
      background: var(--error-color);
    }

    .notification.info {
      background: var(--primary-color);
    }

    @media (max-width: 768px) {
      
      .app-list {
        grid-template-columns: 1fr;
      }
      
      .desktop-container {
        height: 400px;
      }
    }

    @media (max-width: 480px) {
      body {
        padding: 10px;
      }
      
      .card {
        padding: 16px;
      }
      
    }

    .sub-text {
        color: rgba(0, 0, 0, 0.5);
        font-size: 0.85em;
    }


    .modal-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: rgba(0, 0, 0, 0.5);
        display: flex;
        justify-content: center;
        align-items: center;
        z-index: 1000;
    }
    .modal {
        background: #ffffff;
        border-radius: 20px;
        width: 90%;
        max-width: 400px;
        padding: 24px;
        position: relative;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    }

    .modal-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 24px;
    }

    .modal-title {
        font-size: 20px;
        font-weight: 600;
        color: #333333;
    }

    .close-btn {
        width: 24px;
        height: 24px;
        background: none;
        border: none;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        color: #666666;
        font-size: 20px;
        line-height: 1;
    }

    .close-btn:hover {
        color: #333333;
    }

    .input-container {
        margin-bottom: 32px;
    }

    .input-field {
        width: 100%;
        height: 120px;
        border: 1px solid #e5e5e5;
        border-radius: 12px;
        padding: 16px;
        font-size: 16px;
        color: #333333;
        background-color: #fafafa;
        resize: none;
        outline: none;
        font-family: inherit;
        box-sizing: border-box;
    }

    .input-field::placeholder {
        color: #999999;
        font-size: 16px;
    }

    .input-field:focus {
        border-color: #ffa726;
        background-color: #ffffff;
    }

    .submit-btn {
        width: 100%;
        height: 50px;
        background: linear-gradient(135deg, #ffa726 0%, #ff9800 100%);
        border: none;
        border-radius: 25px;
        color: #ffffff;
        font-size: 16px;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.3s ease;
    }

    .submit-btn:hover {
        background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(255, 152, 0, 0.3);
    }

    .submit-btn:active {
        transform: translateY(0);
    }

    @media (max-width: 480px) {
        .modal {
            width: 95%;
            padding: 20px;
            border-radius: 16px;
        }

        .modal-title {
            font-size: 18px;
        }

        .input-field {
            height: 100px;
            padding: 12px;
            font-size: 15px;
        }

        .submit-btn {
            height: 48px;
            font-size: 15px;
        }
        
        .floating-ball {
            width: 45px;
            height: 45px;
            font-size: 20px;
        }
        
        .toolbar-menu {
            top: 55px;
            min-width: 110px;
        }
        
        .toolbar-btn {
            height: 32px;
            line-height: 32px;
            font-size: 12px;
        }
    }
