/* Base Styles */
:root {
    --primary-color: #6c5ce7;
    --primary-dark: #5649c0;
    --success-color: #00b894;
    --danger-color: #d63031;
    --warning-color: #fdcb6e;
    --info-color: #0984e3;
    --text-color: #2d3436;
    --text-light: #636e72;
    --bg-color: #f9f9f9;
    --card-bg: #ffffff;
    --border-color: #dfe6e9;
    --shadow-color: rgba(0,0,0,0.1);
  }
  
  body {
    margin: 0;
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
  }
  
  /* Typography */
  h1, h2, h3, h4 {
    margin-top: 0;
    line-height: 1.2;
  }
  
  /* Layout */
  .container {
    padding: 2rem;
    max-width: 800px;
    margin: auto;
  }
  
  /* Navbar */
  .navbar {
    background-color: var(--primary-color);
    padding: 1rem;
    text-align: center;
    color: white;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(108, 92, 231, 0.2);
  }
  
  .navbar:hover {
    background-color: var(--primary-dark);
  }
  
  /* Cards */
  .world-card {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 12px var(--shadow-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-left: 4px solid var(--primary-color);
    animation: fadeIn 0.5s ease-out forwards;
  }
  
  .world-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.15);
  }
  
  .world-name {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-dark);
  }
  
  .world-creator {
    color: var(--text-light);
    margin: 0.3rem 0;
    font-size: 0.9rem;
  }
  
  .world-code {
    font-family: monospace;
    background-color: #f0f0f0;
    padding: 0.5rem;
    border-radius: 4px;
    font-size: 0.85rem;
    margin: 0.5rem 0;
    word-break: break-all;
  }
  
  /* Buttons */
  .btn {
    background-color: var(--primary-color);
    color: white;
    padding: 0.9rem 1.5rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
  }
  
  .btn:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(108, 92, 231, 0.3);
  }
  
  .btn:active {
    transform: translateY(0);
  }
  
  .play-btn {
    margin-top: 0.8rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    background: var(--success-color);
    color: white;
    padding: 0.7rem 1.2rem;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.3s ease;
  }
  
  .play-btn:hover {
    background: #00a382;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 184, 148, 0.3);
  }
  
  /* Form Elements */
  .form-group {
    margin-bottom: 1.8rem;
  }
  
  .form-group label {
    display: block;
    margin-bottom: 0.6rem;
    font-weight: 600;
    color: var(--text-color);
  }
  
  .form-group input {
    width: 100%;
    padding: 0.9rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
    transition: all 0.3s ease;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.05);
  }
  
  .form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.2);
  }
  
  /* Side Menu */
  .side-menu {
    height: 100%;
    width: 0;
    position: fixed;
    z-index: 999;
    top: 0;
    right: 0;
    background-color: var(--card-bg);
    overflow-x: hidden;
    transition: 0.3s;
    padding-top: 60px;
    box-shadow: -5px 0 15px rgba(0,0,0,0.1);
  }
  
  .side-menu-content {
    padding: 2rem;
  }
  
  .close-btn {
    position: absolute;
    top: 20px;
    right: 25px;
    font-size: 36px;
    background: none;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.3s ease;
  }
  
  .close-btn:hover {
    color: var(--primary-color);
    transform: rotate(90deg);
  }
  
  /* Floating Action Button */
  .fab {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 64px;
    height: 64px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    box-shadow: 0 6px 16px rgba(108, 92, 231, 0.3);
    cursor: pointer;
    z-index: 99;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  }
  
  .fab:hover {
    transform: scale(1.1) rotate(90deg);
    background-color: var(--primary-dark);
    box-shadow: 0 8px 20px rgba(108, 92, 231, 0.4);
  }
  
  /* Success Message */
  .success-message {
    position: fixed;
    bottom: -100px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--success-color);
    color: white;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    box-shadow: 0 6px 16px rgba(0,0,0,0.2);
    z-index: 1000;
    transition: bottom 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    gap: 0.8rem;
  }
  
  .success-message.show {
    bottom: 2rem;
  }
  
  /* Utility Classes */
  .empty-state {
    text-align: center;
    color: var(--text-light);
    padding: 3rem 1rem;
    background-color: var(--card-bg);
    border-radius: 12px;
    box-shadow: 0 4px 12px var(--shadow-color);
  }
  
  .empty-state i {
    font-size: 3.5rem;
    color: #a29bfe;
    margin-bottom: 1.5rem;
    opacity: 0.8;
  }
  
  .subtitle {
    margin-top: 0.5rem;
    color: var(--text-light);
    font-size: 1.1rem;
  }
  
  .footer {
    text-align: center;
    margin-top: 3rem;
    color: var(--text-light);
    font-size: 0.9rem;
    padding: 1rem;
  }
  
  .help-message {
    background-color: #f8f9fa;
    padding: 1.5rem;
    border-radius: 10px;
    margin-top: 2rem;
    border-left: 4px solid var(--primary-color);
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.05);
  }
  
  /* Button Variants */
  .btn-danger {
    background-color: var(--danger-color);
  }
  
  .btn-danger:hover {
    background-color: #c0392b;
  }
  
  .btn-warning {
    background-color: var(--warning-color);
    color: var(--text-color);
  }
  
  .btn-warning:hover {
    background-color: #f6b93b;
  }
  
  .btn-info {
    background-color: var(--info-color);
  }
  
  .btn-info:hover {
    background-color: #0770bb;
  }
  
  .btn-success {
    background-color: var(--success-color);
  }
  
  .btn-success:hover {
    background-color: #00a382;
  }
  
  /* Responsive Design */
  @media (max-width: 768px) {
    .container {
      padding: 1rem;
    }
  
    .side-menu-content {
      padding: 1.5rem;
    }
  
    .world-card {
      padding: 1.2rem;
    }
  
    .btn {
      padding: 0.8rem 1.2rem;
      font-size: 0.9rem;
    }
  
    .fab {
      width: 56px;
      height: 56px;
      font-size: 1.5rem;
    }
  }
  
  /* Animations */
  @keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
  }
  
  @keyframes spin {
    to { transform: rotate(360deg); }
  }
  
  /* Loading State */
  .loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
  }
  
  .btn.loading {
    position: relative;
    color: transparent;
  }
  
  .btn.loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
  }
  
  /* ---------------------------- */
  /* Publish World Error Message */
  /* ---------------------------- */
  .publish-error {
    position: fixed;
    bottom: -100px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #ffe6e6;
    color: var(--danger-color);
    padding: 1rem 2rem;
    border-radius: 10px;
    font-weight: 600;
    border-left: 5px solid var(--danger-color);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
    transition: bottom 0.5s ease, opacity 0.5s ease;
    z-index: 1000;
    opacity: 0;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-family: 'Poppins', sans-serif;
  }
  
  .publish-error.show {
    bottom: 2rem;
    opacity: 1;
  }
  