* {
      margin: 0;
      padding: 0;
      box-sizing: border-box;
    }

    body {
      font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
      background: linear-gradient(135deg, #f5f7fa 0%, #e4e8f0 100%);
      min-height: 100vh;
      color: #333;
    }

    .container {
      max-width: 1200px;
      margin: 0 auto;
      padding: 20px;
    }

    .header {
      text-align: center;
      margin-bottom: 30px;
      color: #2d3748;
    }

    .header h1 {
      font-size: 2.5rem;
      font-weight: 700;
      margin-bottom: 10px;
    }

    .header p {
      font-size: 1.1rem;
      opacity: 0.8;
      margin-bottom: 20px;
    }

    .input-section {
      background: white;
      border-radius: 12px;
      padding: 25px;
      margin-bottom: 25px;
      box-shadow: 0 4px 12px rgba(0,0,0,0.05);
      border: 1px solid rgba(0,0,0,0.05);
      max-width: 800px;
      margin-left: auto;
      margin-right: auto;
    }

    .input-group {
      display: flex;
      gap: 12px;
      align-items: center;
      justify-content: center;
      flex-wrap: wrap;
    }

    #topicInput {
      flex: 1;
      min-width: 250px;
      padding: 12px 18px;
      border: 1px solid #e2e8f0;
      border-radius: 8px;
      font-size: 15px;
      outline: none;
      transition: all 0.2s ease;
      background: white;
      box-shadow: 0 1px 2px rgba(0,0,0,0.03);
    }

    #topicInput:focus {
      border-color: #667eea;
      box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    }

    .btn {
      padding: 12px 24px;
      border: none;
      border-radius: 8px;
      font-size: 15px;
      font-weight: 600;
      cursor: pointer;
      transition: all 0.2s ease;
      position: relative;
      overflow: hidden;
    }

    .btn-primary {
      background: #667eea;
      color: white;
      box-shadow: 0 2px 5px rgba(102, 126, 234, 0.3);
    }

    .btn-primary:hover {
      background: #5a67d8;
      transform: translateY(-1px);
      box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
    }

    .btn-secondary {
      background: #48bb78;
      color: white;
      box-shadow: 0 2px 5px rgba(72, 187, 120, 0.3);
    }

    .btn-secondary:hover {
      background: #38a169;
      transform: translateY(-1px);
      box-shadow: 0 4px 8px rgba(72, 187, 120, 0.3);
    }

    .btn:disabled {
      opacity: 0.6;
      cursor: not-allowed;
      transform: none !important;
    }

    .mindmap-container {
      background: white;
      border-radius: 12px;
      padding: 20px;
      box-shadow: 0 4px 12px rgba(0,0,0,0.05);
      border: 1px solid rgba(0,0,0,0.05);
      min-height: 300px;
      display: flex;
      flex-direction: column;
      align-items: center;
      max-width: 800px;
      margin-left: auto;
      margin-right: auto;
      position: relative;
      overflow: hidden;
    }

    .loading {
      display: none;
      text-align: center;
      padding: 30px;
    }

    .spinner {
      width: 40px;
      height: 40px;
      border: 3px solid #f3f3f3;
      border-top: 3px solid #667eea;
      border-radius: 50%;
      animation: spin 1s linear infinite;
      margin: 0 auto 15px;
    }

    @keyframes spin {
      0% { transform: rotate(0deg); }
      100% { transform: rotate(360deg); }
    }

    #mindmap {
      width: 100%;
      height: 100%;
      min-height: 300px;
      display: flex;
      justify-content: center;
      align-items: center;
    }

    .mindmap-svg {
      border-radius: 8px;
      background: white;
      overflow: visible;
      max-width: 100%;
    }

    .node rect {
      filter: drop-shadow(1px 1px 3px rgba(0,0,0,0.1));
      transition: all 0.2s ease;
    }

    .node rect:hover {
      filter: drop-shadow(2px 2px 5px rgba(0,0,0,0.15));
    }

    .node text {
      font-size: 13px;
      font-weight: 600;
      fill: #333;
      pointer-events: none;
    }

    .central-node rect {
      fill: #667eea;
    }

    .subtopic-node rect {
      fill: #48bb78;
    }

    .link {
      stroke: #667eea;
      stroke-width: 2;
      opacity: 0.6;
      fill: none;
    }

    .controls {
      display: flex;
      gap: 10px;
      margin-top: 15px;
      flex-wrap: wrap;
      justify-content: center;
    }

    .video-section {
      margin-top: 30px;
      display: none;
      max-width: 800px;
      margin-left: auto;
      margin-right: auto;
    }

    .video-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
      gap: 15px;
      margin-top: 15px;
    }

    .video-card {
      background: white;
      border-radius: 8px;
      overflow: hidden;
      box-shadow: 0 2px 8px rgba(0,0,0,0.05);
      transition: transform 0.2s ease;
      border: 1px solid rgba(0,0,0,0.05);
    }

    .video-card:hover {
      transform: translateY(-3px);
      box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    }

    .video-card h3 {
      padding: 12px;
      background: #667eea;
      color: white;
      margin: 0;
      font-size: 1rem;
    }

    .video-card iframe {
      width: 100%;
      height: 180px;
      border: none;
    }

    .empty-state {
      text-align: center;
      padding: 40px 20px;
      color: #718096;
    }

    .empty-state i {
      font-size: 3rem;
      margin-bottom: 15px;
      color: #cbd5e0;
    }

    .suggestion-chips {
      display: flex;
      gap: 8px;
      flex-wrap: wrap;
      justify-content: center;
      margin-top: 15px;
    }

    .chip {
      background: rgba(102, 126, 234, 0.1);
      color: #667eea;
      padding: 6px 12px;
      border-radius: 20px;
      font-size: 13px;
      cursor: pointer;
      transition: all 0.2s ease;
      border: 1px solid rgba(102, 126, 234, 0.2);
    }

    .chip:hover {
      background: rgba(102, 126, 234, 0.2);
      transform: translateY(-1px);
    }

    .video-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 15px;
    }

    .video-header h2 {
      color: #2d3748;
      margin: 0;
    }

    .close-btn {
      background: #e53e3e;
      color: white;
      border: none;
      border-radius: 50%;
      width: 30px;
      height: 30px;
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      transition: all 0.2s ease;
    }

    .close-btn:hover {
      background: #c53030;
      transform: scale(1.1);
    }

    @media (max-width: 768px) {
      .header h1 {
        font-size: 1.8rem;
      }
      
      .input-group {
        flex-direction: column;
        align-items: stretch;
      }
      
      #topicInput {
        min-width: auto;
      }
      
      .mindmap-container {
        padding: 15px;
      }
      
      .btn {
        width: 100%;
      }
    }