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

      body {
        font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
        min-height: 100vh;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        position: relative;
        overflow-x: hidden;
      }

      body::before {
        content: "";
        position: fixed;
        width: 200%;
        height: 200%;
        background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
        z-index: -1;
      }

      .floating-circles {
        position: fixed;
        width: 100%;
        height: 100%;
        top: 0;
        left: 0;
        z-index: -1;
        overflow: hidden;
      }

      .circle {
        position: absolute;
        border-radius: 50%;
        background: linear-gradient(
          45deg,
          rgba(255, 255, 255, 0.1) 0%,
          rgba(255, 255, 255, 0.05) 100%
        );
        backdrop-filter: blur(2px);
        box-shadow: 0 8px 32px rgba(102, 126, 234, 0.1),
          inset 0 1px 1px rgba(255, 255, 255, 0.3);
      }

      .circle:nth-child(1) {
        width: 80px;
        height: 80px;
        left: 10%;
        bottom: 20%;
        animation: float-up 18s ease-in-out infinite;
        animation-delay: 0s;
      }
      .circle:nth-child(2) {
        width: 120px;
        height: 120px;
        left: 70%;
        bottom: 60%;
        animation: float-up 22s ease-in-out infinite;
        animation-delay: 3s;
      }
      .circle:nth-child(3) {
        width: 60px;
        height: 60px;
        left: 40%;
        bottom: 40%;
        animation: float-up 20s ease-in-out infinite;
        animation-delay: 1.5s;
      }

      @keyframes float-up {
        0%,
        100% {
          transform: translateY(0) translateX(0) scale(1);
          opacity: 0.6;
        }
        25% {
          transform: translateY(-100px) translateX(50px) scale(1.1);
          opacity: 0.8;
        }
        50% {
          transform: translateY(-200px) translateX(-30px) scale(0.9);
          opacity: 0.5;
        }
        75% {
          transform: translateY(-100px) translateX(-60px) scale(1.05);
          opacity: 0.7;
        }
      }

      /* --- LOGIN STYLES --- */
      .login-page {
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: 100vh;
      }
      .login-page.hidden {
        display: none;
      }
      .login-container {
        width: 100%;
        max-width: 420px;
        padding: 20px;
      }
      .login-box {
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(10px);
        border-radius: 24px;
        padding: 40px;
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
        animation: slideUpLogin 0.5s ease-out;
      }
      @keyframes slideUpLogin {
        from {
          opacity: 0;
          transform: translateY(30px);
        }
        to {
          opacity: 1;
          transform: translateY(0);
        }
      }

      .logo-section {
        text-align: center;
        margin-bottom: 30px;
      }
      .logo-img {
        width: 180px;
        height: auto;
        margin-bottom: 20px;
      }

      .login-box h1 {
        font-size: 28px;
        font-weight: 700;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        margin-bottom: 5px;
      }
      .login-box .subtitle {
        color: #666;
        font-size: 14px;
      }
      .form-group {
        margin-bottom: 20px;
      }
      label {
        display: block;
        margin-bottom: 8px;
        color: #333;
        font-weight: 600;
        font-size: 14px;
      }
      .input-wrapper {
        position: relative;
      }
      .input-icon {
        position: absolute;
        left: 15px;
        top: 50%;
        transform: translateY(-50%);
        font-size: 18px;
      }
      input {
        width: 100%;
        padding: 14px 15px 14px 45px;
        border: 2px solid #e0e0e5;
        border-radius: 12px;
        font-size: 15px;
        transition: all 0.3s ease;
        background: white;
      }
      input:focus {
        outline: none;
        border-color: #667eea;
        box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
      }
      .password-toggle {
        position: absolute;
        right: 15px;
        top: 50%;
        transform: translateY(-50%);
        cursor: pointer;
        font-size: 18px;
        color: #666;
        user-select: none;
      }
      .password-toggle:hover {
        color: #667eea;
      }
      .remember-me {
        display: flex;
        align-items: center;
        margin-bottom: 25px;
      }
      .remember-me input[type="checkbox"] {
        width: auto;
        margin-right: 8px;
        cursor: pointer;
      }
      .remember-me label {
        margin: 0;
        font-weight: normal;
        cursor: pointer;
        user-select: none;
      }
      .login-btn {
        width: 100%;
        padding: 14px;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        color: white;
        border: none;
        border-radius: 12px;
        font-size: 16px;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.3s ease;
        box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
      }
      .login-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
      }
      .error-message {
        background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
        color: white;
        padding: 12px;
        border-radius: 8px;
        margin-bottom: 20px;
        display: none;
        animation: shake 0.5s;
        text-align: center;
      }
      @keyframes shake {
        0%,
        100% {
          transform: translateX(0);
        }
        25% {
          transform: translateX(-10px);
        }
        75% {
          transform: translateX(10px);
        }
      }
      .error-message.show {
        display: block;
      }
      .footer-text {
        text-align: center;
        margin-top: 25px;
        color: #666;
        font-size: 13px;
      }
      .footer-text a {
        color: #667eea;
        text-decoration: none;
        font-weight: 600;
      }
      .footer-text a:hover {
        text-decoration: underline;
      }

      /* Login Page Language Switch */
      .login-lang-switch {
        display: flex;
        justify-content: center;
        gap: 10px;
        margin-top: 25px;
        padding-top: 20px;
        border-top: 1px solid rgba(0, 0, 0, 0.06);
      }

      .login-lang-switch .lang-btn {
        padding: 10px 24px;
        border-radius: 25px;
        border: none;
        background: linear-gradient(
          135deg,
          rgba(255, 255, 255, 0.9),
          rgba(255, 255, 255, 0.7)
        );
        backdrop-filter: blur(10px);
        color: #667eea;
        font-weight: 700;
        font-size: 13.5px;
        cursor: pointer;
        transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        display: flex;
        align-items: center;
        gap: 7px;
        letter-spacing: 0.3px;
        box-shadow: 0 4px 15px rgba(102, 126, 234, 0.12),
          inset 0 1px 1px rgba(255, 255, 255, 0.8);
        border: 1.5px solid rgba(102, 126, 234, 0.2);
        position: relative;
        overflow: hidden;
      }

      .login-lang-switch .lang-btn::before {
        content: "";
        position: absolute;
        top: 50%;
        left: 50%;
        width: 0;
        height: 0;
        border-radius: 50%;
        background: rgba(102, 126, 234, 0.1);
        transform: translate(-50%, -50%);
        transition: width 0.5s ease, height 0.5s ease;
      }

      .login-lang-switch .lang-btn:hover::before {
        width: 200px;
        height: 200px;
      }

      .login-lang-switch .lang-btn span {
        position: relative;
        z-index: 1;
      }

      .login-lang-switch .lang-btn span:first-child {
        font-size: 16px;
        transition: transform 0.3s ease;
      }

      .login-lang-switch .lang-btn:hover span:first-child {
        transform: scale(1.2) rotate(10deg);
      }

      .login-lang-switch .lang-btn.active {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        color: white;
        box-shadow: 0 6px 25px rgba(102, 126, 234, 0.4),
          inset 0 1px 1px rgba(255, 255, 255, 0.2);
        transform: scale(1.05);
        border-color: transparent;
      }

      .login-lang-switch .lang-btn.active::after {
        content: "";
        position: absolute;
        inset: 0;
        border-radius: 25px;
        background: linear-gradient(
          135deg,
          rgba(255, 255, 255, 0.3),
          transparent
        );
      }

      .login-lang-switch .lang-btn:not(.active):hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(102, 126, 234, 0.2),
          inset 0 1px 1px rgba(255, 255, 255, 0.9);
        border-color: rgba(102, 126, 234, 0.4);
      }

      /* --- GALLERY STYLES --- */
      .gallery-page {
        display: none;
      }
      .gallery-page.active {
        display: block;
      }
      .wrap {
        max-width: 1400px;
        margin: 40px auto;
        padding: 50px;
        background: linear-gradient(
          145deg,
          rgba(255, 255, 255, 0.98) 0%,
          rgba(255, 255, 255, 0.95) 100%
        );
        backdrop-filter: blur(30px) saturate(180%);
        border-radius: 32px;
        box-shadow: 0 30px 90px rgba(0, 0, 0, 0.15),
          0 10px 30px rgba(0, 0, 0, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.9);
        position: relative;
        border: 1px solid rgba(255, 255, 255, 0.3);
      }
      .wrap::before {
        content: "";
        position: absolute;
        inset: -2px;
        background: linear-gradient(
          135deg,
          rgba(102, 126, 234, 0.1),
          rgba(118, 75, 162, 0.1),
          rgba(255, 107, 107, 0.1)
        );
        border-radius: 32px;
        z-index: -1;
        opacity: 0;
        transition: opacity 0.3s ease;
      }
      .wrap:hover::before {
        opacity: 1;
      }
      .header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 35px;
        padding: 20px 30px;
        background: linear-gradient(
          135deg,
          rgba(255, 255, 255, 0.95),
          rgba(255, 255, 255, 0.85)
        );
        backdrop-filter: blur(20px);
        border-radius: 25px;
        position: relative;
        overflow: hidden;
        box-shadow: 0 8px 32px rgba(102, 126, 234, 0.12),
          inset 0 1px 1px rgba(255, 255, 255, 0.9);
        border: 1px solid rgba(255, 255, 255, 0.5);
      }

      .header::before {
        content: "";
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(
          90deg,
          transparent,
          rgba(255, 255, 255, 0.4),
          transparent
        );
        transition: left 0.7s ease;
      }

      .header:hover::before {
        left: 100%;
      }

      .header::after {
        content: "";
        position: absolute;
        bottom: 0;
        left: 50%;
        transform: translateX(-50%);
        width: 0;
        height: 3px;
        background: linear-gradient(90deg, #667eea, #764ba2, #ff6b6b);
        transition: width 0.5s ease;
        border-radius: 3px 3px 0 0;
      }

      .header:hover::after {
        width: 95%;
      }

      .header-logo {
        height: 60px;
        width: auto;
        filter: drop-shadow(0 4px 16px rgba(102, 126, 234, 0.15));
        transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        position: relative;
        z-index: 2;
      }

      .header-logo:hover {
        transform: translateY(-3px) scale(1.05) rotate(-2deg);
        filter: drop-shadow(0 8px 24px rgba(102, 126, 234, 0.25));
      }
      .header-buttons {
        display: flex;
        gap: 14px;
        align-items: center;
        position: relative;
        z-index: 2;
      }

      /* Modern Language Switch */
      .lang-switch {
        display: flex;
        background: linear-gradient(
          135deg,
          rgba(255, 255, 255, 0.95),
          rgba(255, 255, 255, 0.85)
        );
        backdrop-filter: blur(15px);
        border-radius: 30px;
        padding: 5px;
        gap: 5px;
        box-shadow: 0 4px 15px rgba(102, 126, 234, 0.15),
          inset 0 1px 1px rgba(255, 255, 255, 0.8);
        border: 1.5px solid rgba(102, 126, 234, 0.25);
        position: relative;
      }

      .lang-switch::before {
        content: "";
        position: absolute;
        inset: -2px;
        border-radius: 32px;
        background: linear-gradient(135deg, #667eea, #764ba2);
        opacity: 0;
        transition: opacity 0.3s ease;
        z-index: -1;
      }

      .lang-switch:hover::before {
        opacity: 0.1;
      }

      .lang-btn {
        padding: 10px 20px;
        border-radius: 25px;
        border: none;
        background: transparent;
        color: #667eea;
        font-weight: 700;
        font-size: 13.5px;
        cursor: pointer;
        transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        position: relative;
        z-index: 1;
        display: flex;
        align-items: center;
        gap: 7px;
        letter-spacing: 0.3px;
      }

      .lang-btn span:first-child {
        font-size: 16px;
        transition: transform 0.3s ease;
      }

      .lang-btn:hover span:first-child {
        transform: scale(1.15) rotate(5deg);
      }

      .lang-btn.active {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        color: white;
        box-shadow: 0 6px 20px rgba(102, 126, 234, 0.45),
          inset 0 1px 1px rgba(255, 255, 255, 0.2);
        transform: scale(1.03);
      }

      .lang-btn.active::before {
        content: "";
        position: absolute;
        inset: 0;
        border-radius: 25px;
        background: linear-gradient(
          135deg,
          rgba(255, 255, 255, 0.3),
          transparent
        );
      }

      .lang-btn:not(.active):hover {
        background: rgba(102, 126, 234, 0.12);
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
      }

      .guide-btn,
      .studio-btn,
      .logout-btn {
        padding: 13px 30px;
        border-radius: 50px;
        font-size: 14.5px;
        font-weight: 700;
        cursor: pointer;
        transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        display: flex;
        align-items: center;
        gap: 9px;
        position: relative;
        overflow: hidden;
        letter-spacing: 0.3px;
        border: none;
      }

      .guide-btn::before,
      .studio-btn::before,
      .logout-btn::before {
        content: "";
        position: absolute;
        top: 50%;
        left: 50%;
        width: 0;
        height: 0;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.3);
        transform: translate(-50%, -50%);
        transition: width 0.6s ease, height 0.6s ease;
      }

      .guide-btn:hover::before,
      .studio-btn:hover::before,
      .logout-btn:hover::before {
        width: 300px;
        height: 300px;
      }

      .guide-btn::after,
      .studio-btn::after,
      .logout-btn::after {
        content: "";
        position: absolute;
        inset: 0;
        background: linear-gradient(
          135deg,
          rgba(255, 255, 255, 0.2),
          transparent
        );
        opacity: 0;
        transition: opacity 0.3s ease;
      }
      .guide-btn:hover::after,
      .studio-btn:hover::after,
      .logout-btn:hover::after {
        opacity: 1;
      }

      .guide-btn > *,
      .studio-btn > *,
      .logout-btn > * {
        position: relative;
        z-index: 1;
      }

      .guide-btn {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        color: white;
        box-shadow: 0 6px 25px rgba(102, 126, 234, 0.35),
          inset 0 1px 1px rgba(255, 255, 255, 0.25);
      }
      .guide-btn:hover {
        transform: translateY(-3px) scale(1.02);
        box-shadow: 0 10px 35px rgba(102, 126, 234, 0.45),
          inset 0 1px 1px rgba(255, 255, 255, 0.3);
      }
      .guide-btn:active {
        transform: translateY(-1px) scale(0.98);
      }
      .studio-btn {
        background:
          radial-gradient(120% 140% at 15% 15%, rgba(255, 255, 255, 0.26) 0%, rgba(255, 255, 255, 0) 48%),
          linear-gradient(135deg, #3657c9 0%, #4b6fe4 52%, #2f49af 100%);
        color: white;
        text-decoration: none;
        letter-spacing: 0.02em;
        border: 1px solid rgba(202, 216, 255, 0.42);
        box-shadow:
          0 10px 26px rgba(55, 84, 192, 0.34),
          inset 0 1px 0 rgba(255, 255, 255, 0.36),
          inset 0 -1px 0 rgba(16, 30, 83, 0.2);
      }
      .studio-btn:hover {
        transform: translateY(-3px) scale(1.02);
        box-shadow:
          0 14px 34px rgba(55, 84, 192, 0.45),
          inset 0 1px 0 rgba(255, 255, 255, 0.44),
          inset 0 -1px 0 rgba(16, 30, 83, 0.28);
      }
      .studio-btn:active {
        transform: translateY(-1px) scale(0.985);
      }
      .logout-btn {
        background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
        color: white;
        box-shadow: 0 6px 25px rgba(255, 107, 107, 0.35),
          inset 0 1px 1px rgba(255, 255, 255, 0.25);
      }
      .logout-btn:hover {
        transform: translateY(-3px) scale(1.02);
        box-shadow: 0 10px 35px rgba(255, 107, 107, 0.45),
          inset 0 1px 1px rgba(255, 255, 255, 0.3);
      }
      .logout-btn:active {
        transform: translateY(-1px) scale(0.98);
      }

      /* Info Banner */
      .info-banner {
        background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
        backdrop-filter: blur(20px);
        border-radius: 20px;
        padding: 24px 32px;
        margin-bottom: 30px;
        border: 2px solid rgba(102, 126, 234, 0.2);
        box-shadow: 0 8px 32px rgba(102, 126, 234, 0.15),
          inset 0 1px 1px rgba(255, 255, 255, 0.8);
        position: relative;
        overflow: hidden;
        animation: slideDown 0.6s ease-out;
      }

      @keyframes slideDown {
        from {
          opacity: 0;
          transform: translateY(-20px);
        }
        to {
          opacity: 1;
          transform: translateY(0);
        }
      }

      .info-banner::before {
        content: "";
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(
          90deg,
          transparent,
          rgba(255, 255, 255, 0.2),
          transparent
        );
        animation: shimmer 3s infinite;
      }

      @keyframes shimmer {
        0% {
          left: -100%;
        }
        100% {
          left: 100%;
        }
      }

      .info-banner-content {
        display: flex;
        align-items: center;
        gap: 20px;
        position: relative;
        z-index: 1;
      }

      .info-banner-icon {
        font-size: 48px;
        flex-shrink: 0;
        animation: bounce 2s infinite;
      }

      @keyframes bounce {
        0%, 100% {
          transform: translateY(0);
        }
        50% {
          transform: translateY(-10px);
        }
      }

      .info-banner-text {
        flex: 1;
      }

      .info-banner-title {
        font-size: 20px;
        font-weight: 700;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        margin-bottom: 8px;
        display: flex;
        align-items: center;
        gap: 10px;
      }

      .info-banner-title .sparkle {
        font-size: 16px;
        animation: sparkle 1.5s infinite;
      }

      @keyframes sparkle {
        0%, 100% {
          opacity: 0.4;
          transform: scale(1);
        }
        50% {
          opacity: 1;
          transform: scale(1.2);
        }
      }

      .info-banner-desc {
        font-size: 15px;
        color: #555;
        line-height: 1.6;
      }

      .info-banner-desc strong {
        color: #667eea;
        font-weight: 600;
      }

      .pills {
        display: flex;
        flex-wrap: wrap;
        gap: 14px;
        margin-bottom: 40px;
        padding: 28px;
        background: linear-gradient(
          145deg,
          rgba(255, 255, 255, 0.5),
          rgba(240, 242, 255, 0.5)
        );
        backdrop-filter: blur(20px);
        border-radius: 24px;
        border: 1px solid rgba(102, 126, 234, 0.08);
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.04),
          inset 0 1px 0 rgba(255, 255, 255, 0.8);
        position: relative;
        overflow: hidden;
      }
      .pills::before {
        content: "";
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(
          90deg,
          transparent,
          rgba(102, 126, 234, 0.05),
          transparent
        );
        display: none;
      }
      .pill {
        background: white;
        border: 1.5px solid rgba(0, 0, 0, 0.06);
        border-radius: 50px;
        padding: 12px 26px;
        font-weight: 600;
        font-size: 14px;
        cursor: pointer;
        transition: all 0.3s ease;
        color: #555;
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04),
          0 1px 3px rgba(0, 0, 0, 0.08);
        position: relative;
        z-index: 1;
      }
      .pill::before {
        content: "";
        position: absolute;
        inset: 0;
        border-radius: 50px;
        background: linear-gradient(135deg, #667eea, #764ba2);
        opacity: 0;
        transition: opacity 0.3s ease;
        z-index: -1;
      }
      .pill:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(102, 126, 234, 0.15),
          0 3px 10px rgba(0, 0, 0, 0.08);
        border-color: rgba(102, 126, 234, 0.2);
        color: #667eea;
      }
      .pill.is-active {
        color: white;
        border-color: transparent;
        box-shadow: 0 6px 20px rgba(102, 126, 234, 0.25),
          0 3px 10px rgba(118, 75, 162, 0.2);
        transform: translateY(-1px);
      }
      .pill.is-active::before {
        opacity: 1;
      }
      .pill-badge {
        position: absolute;
        top: -8px;
        right: -8px;
        background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
        color: white;
        font-size: 10px;
        font-weight: 700;
        padding: 3px 8px;
        border-radius: 12px;
        text-transform: uppercase;
        box-shadow: 0 2px 8px rgba(245, 87, 108, 0.4);
        animation: badgePulse 2s ease-in-out infinite;
        letter-spacing: 0.5px;
      }
      @keyframes badgePulse {
        0%,
        100% {
          transform: scale(1);
        }
        50% {
          transform: scale(1.05);
        }
      }
      .grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 30px;
        padding: 10px;
      }
      .grid.grid--masonry {
        display: block;
        column-width: 280px;
        column-gap: 30px;
      }
      .card {
        background: white;
        border-radius: 24px;
        overflow: hidden;
        cursor: pointer;
        transition: all 0.4s ease;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06),
          0 1px 4px rgba(0, 0, 0, 0.04);
        position: relative;
        border: 3px solid transparent;
        background-clip: padding-box;
        transform-origin: center;
        content-visibility: auto;
        contain-intrinsic-size: 360px;
      }
      .grid.grid--masonry .card {
        display: inline-block;
        width: 100%;
        margin: 0 0 30px;
        break-inside: avoid;
      }
      .card::before {
        content: "";
        position: absolute;
        inset: -3px;
        border-radius: 24px;
        background: linear-gradient(
          135deg,
          #667eea 0%,
          #764ba2 50%,
          #667eea 100%
        );
        z-index: -1;
        opacity: 0;
        transition: opacity 0.4s ease;
      }
      .card:hover::before {
        opacity: 1;
      }
      .card::after {
        content: "";
        position: absolute;
        inset: 0;
        border-radius: 21px;
        background: white;
        z-index: -1;
      }
      .card:hover {
        transform: translateY(-8px);
        box-shadow: 0 25px 60px rgba(102, 126, 234, 0.25),
          0 15px 35px rgba(118, 75, 162, 0.15);
      }
      .card-media {
        aspect-ratio: var(--card-media-aspect-ratio, 1 / 1);
        overflow: hidden;
        background: #f0f0f0;
      }
      .card img {
        display: block;
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 0.3s ease, opacity 0.3s ease;
      }
      .card img.loading {
        opacity: 0;
      }
      .card img.loaded {
        opacity: 1;
      }
      .card .img-placeholder {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 100%;
        background: linear-gradient(
          90deg,
          #f0f0f0 0%,
          #f8f8f8 50%,
          #f0f0f0 100%
        );
        background-size: 200% 100%;
        animation: shimmer 1.5s infinite;
        z-index: 1;
        transition: opacity 0.3s ease;
      }
      @keyframes shimmer {
        0% {
          background-position: -200% 0;
        }
        100% {
          background-position: 200% 0;
        }
      }
      .card:hover img {
        transform: scale(1.05);
      }
      .meta {
        padding: 16px;
        background: linear-gradient(to bottom, #ffffff, #fafafa);
      }
      .meta p {
        margin: 0;
        font-size: 15px;
        font-weight: 600;
        color: #333;
      }
      .tags-container {
        margin-top: 8px;
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
      }
      .tag {
        background: #eef2f7;
        color: #5a6ac2;
        font-size: 12px;
        font-weight: 500;
        padding: 4px 10px;
        border-radius: 12px;
      }
      .modal {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.85);
        backdrop-filter: blur(5px);
        display: none;
        align-items: center;
        justify-content: center;
        z-index: 9999;
        animation: fadeIn 0.3s ease;
      }
      @keyframes fadeIn {
        from {
          opacity: 0;
        }
        to {
          opacity: 1;
        }
      }
      .modal.show {
        display: flex;
      }
      .modal-content {
        background: white;
        padding: 20px;
        border-radius: 20px;
        max-width: 90%;
        max-height: 90%;
        display: flex;
        flex-direction: column;
        gap: 20px;
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
        animation: slideUpModal 0.4s ease;
      }
      @keyframes slideUpModal {
        from {
          transform: translateY(50px);
          opacity: 0;
        }
        to {
          transform: translateY(0);
          opacity: 1;
        }
      }
      .modal-content img {
        max-width: 100%;
        max-height: 65vh;
        object-fit: contain;
        border-radius: 0;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
      }
      .modal-content a {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        color: white;
        text-align: center;
        padding: 14px 28px;
        border-radius: 30px;
        font-weight: bold;
        text-decoration: none;
        transition: all 0.3s ease;
        box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
      }
      .modal-content a:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
      }
      .close {
        position: absolute;
        top: 30px;
        right: 40px;
        font-size: 40px;
        color: white;
        cursor: pointer;
        transition: transform 0.3s ease;
        width: 50px;
        height: 50px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: rgba(255, 255, 255, 0.1);
        border-radius: 50%;
        backdrop-filter: blur(10px);
      }
      .close:hover {
        transform: rotate(90deg);
        background: rgba(255, 255, 255, 0.2);
      }
      .loading-overlay {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.5);
        display: none;
        align-items: center;
        justify-content: center;
        z-index: 10000;
      }
      .loading-overlay.show {
        display: flex;
      }
      .spinner {
        width: 50px;
        height: 50px;
        border: 3px solid rgba(255, 255, 255, 0.3);
        border-top-color: white;
        border-radius: 50%;
        animation: spin 1s linear infinite;
      }
      @keyframes spin {
        to {
          transform: rotate(360deg);
        }
      }

      /* Guide Modal Styles */
      #guideModal .modal-content {
        max-width: 600px;
        text-align: left;
      }
      #guideModal h2 {
        font-size: 24px;
        color: #333;
        border-bottom: 2px solid #f0f0f5;
        padding-bottom: 10px;
        margin-bottom: 15px;
      }
      #guideModal ul {
        list-style: none;
        padding-left: 0;
      }
      #guideModal li {
        margin-bottom: 12px;
        line-height: 1.6;
        color: #555;
      }
      #guideModal li::before {
        content: "✔️";
        color: #667eea;
        margin-right: 10px;
        font-weight: bold;
      }

      /* Modal Info */
      .modal-info {
        background: rgba(102, 126, 234, 0.08);
        border-radius: 8px;
        padding: 12px 16px;
        font-size: 13px;
        color: #555;
        text-align: center;
        margin-bottom: 8px;
      }
      .modal-info strong {
        color: #667eea;
      }

      @media (max-width: 768px) {
        .wrap,
        .login-container {
          margin: 15px;
          padding: 20px;
        }
        .header {
          flex-direction: column;
          gap: 18px;
          padding: 18px 20px;
        }
        .header-logo {
          height: 50px;
        }
        .header-buttons {
          width: 100%;
          flex-direction: column;
          gap: 12px;
        }
        .lang-switch {
          width: 100%;
          justify-content: center;
        }
        .lang-btn {
          flex: 1;
          padding: 12px 16px;
        }
        .guide-btn,
        .studio-btn,
        .logout-btn {
          width: 100%;
          justify-content: center;
          padding: 14px 24px;
        }
        .grid {
          grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
          gap: 15px;
        }
        .grid.grid--masonry {
          column-width: 200px;
          column-gap: 15px;
        }
        .grid.grid--masonry .card {
          margin-bottom: 15px;
        }
        .login-box {
          padding: 30px 20px;
        }
        .modal-info {
          font-size: 12px;
          padding: 10px 12px;
        }
        .info-banner {
          padding: 20px;
          margin-bottom: 20px;
        }
        .info-banner-content {
          flex-direction: column;
          text-align: center;
          gap: 15px;
        }
        .info-banner-icon {
          font-size: 36px;
        }
        .info-banner-title {
          font-size: 18px;
          justify-content: center;
        }
        .info-banner-desc {
          font-size: 14px;
        }
      }
    

/* Dynamic filters */
.filters {
  display: grid;
  gap: 12px;
  margin-bottom: 18px;
}
.search-row {
  display: block;
}
.search-input-wrap {
  position: relative;
}
.filter-field {
  width: 100%;
  border: 1.5px solid rgba(102, 126, 234, 0.22);
  border-radius: 14px;
  padding: 13px 44px 13px 15px;
  font-size: 15px;
  outline: none;
  transition: border-color 0.22s ease, box-shadow 0.22s ease;
  background: #fff;
}
.filter-field:focus {
  border-color: #5468d9;
  box-shadow: 0 0 0 4px rgba(84, 104, 217, 0.14);
}
.search-clear-btn {
  position: absolute;
  right: 9px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  border: 1px solid rgba(102, 126, 234, 0.2);
  border-radius: 999px;
  background: rgba(102, 126, 234, 0.08);
  color: #4e5ca5;
  cursor: pointer;
  padding: 0;
  display: inline-grid;
  place-items: center;
  align-items: center;
  justify-content: center;
  transition: background-color 0.18s ease, border-color 0.18s ease;
}
.search-clear-btn svg {
  width: 13px;
  height: 13px;
  display: block;
}
.search-clear-btn path {
  stroke: currentColor;
  stroke-width: 2.1;
  stroke-linecap: round;
}
.search-clear-btn:hover {
  background: rgba(102, 126, 234, 0.16);
  border-color: rgba(102, 126, 234, 0.36);
}
.search-clear-btn.is-hidden {
  opacity: 0;
  pointer-events: none;
}
.quick-groups {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 10px;
}
.quick-group {
  padding: 12px 12px 11px;
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.62), rgba(244, 246, 255, 0.64));
  border: 1px solid rgba(102, 126, 234, 0.12);
  box-shadow: 0 6px 16px rgba(73, 93, 197, 0.08);
}
.quick-head {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin-bottom: 8px;
}
.quick-title {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #52608f;
}
.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.filter-pills .pill {
  padding: 8px 14px;
  font-size: 12px;
  border-radius: 999px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}
.filter-pills .pill.is-active {
  transform: translateY(0);
}
.templates-status {
  margin: 0 0 16px;
  font-size: 13px;
  color: #5f6b88;
}
.empty-state {
  display: none;
  padding: 26px;
  border-radius: 16px;
  border: 1px dashed rgba(102, 126, 234, 0.25);
  background: rgba(102, 126, 234, 0.06);
  color: #45518c;
  text-align: center;
  font-weight: 600;
}
.empty-state.show {
  display: block;
}
.grid-actions {
  display: flex;
  justify-content: center;
  margin-top: 18px;
}
.load-more-btn {
  border: 1px solid rgba(102, 126, 234, 0.24);
  background: linear-gradient(135deg, #4f65d8 0%, #3f56c8 100%);
  color: #fff;
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
  box-shadow: 0 6px 18px rgba(79, 101, 216, 0.3);
}
.load-more-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(79, 101, 216, 0.38);
}
.load-more-btn:disabled {
  opacity: 0.65;
  cursor: wait;
  transform: none;
}
.load-more-btn.hidden {
  display: none;
}
@media (max-width: 1024px), (prefers-reduced-motion: reduce) {
  .floating-circles {
    display: none;
  }
  .info-banner::before,
  .info-banner-icon,
  .info-banner-title .sparkle,
  .pill-badge {
    animation: none !important;
  }
  .card,
  .card::before,
  .card img,
  .pill,
  .guide-btn,
  .studio-btn,
  .logout-btn,
  .lang-btn,
  .login-btn,
  .header-logo {
    transition: none !important;
  }
  .card:hover,
  .pill:hover,
  .guide-btn:hover,
  .studio-btn:hover,
  .logout-btn:hover,
  .lang-btn:not(.active):hover,
  .header-logo:hover {
    transform: none !important;
  }
}
@media (max-width: 768px) {
  .quick-groups {
    grid-template-columns: 1fr;
  }
  .quick-group {
    padding: 12px;
  }
  .filter-pills {
    gap: 8px;
  }
}

.modal-content a.disabled-link {
  pointer-events: none;
  opacity: 0.6;
  background: #7f87a8;
}
