/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px; /* Account for fixed header */
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    background: #FBF8F0;
    color: #333333;
    line-height: 1.6;
}

/* Platform-specific light theme styles matching main site */
.platform-page {
  background: #FBF8F0 !important;
  color: #333333 !important;
}

.platform-page body {
  background: #FBF8F0 !important;
  color: #333333 !important;
}

.platform-page header {
  padding: 8px 20px;
  border-bottom: 1px solid rgba(255, 107, 71, 0.2);
  background: linear-gradient(135deg, #ffffff 0%, #f5f2ea 100%);
  color: #333333;
}

.header-guest {
  display: block;
}

.header-user {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.header-user-left {
  display: flex;
  align-items: center;
  gap: 15px;
  flex: 1;
}

.header-user-left .user-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff6b47 0%, #ff4500 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: bold;
  color: white;
  text-transform: uppercase;
  border: 2px solid rgba(255, 255, 255, 0.5);
  flex-shrink: 0;
}

.header-user-left .user-info {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.user-name-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.header-user-left .user-info h2 {
  margin: 0;
  font-size: 18px;
  color: #323130 !important;
}

.verified-badge {
  font-size: 12px;
  color: #51cf66;
  font-weight: 500;
}

.header-user-right {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

/* Main navigation */
.main-nav {
  background: #fffdfa;
  border-bottom: 1px solid #e1dfdd;
  padding: 0 40px;
  display: flex;
  gap: 0;
}

.main-nav .nav-item {
  padding: 15px 25px;
  text-decoration: none;
  color: #323130;
  font-weight: 500;
  border-bottom: 3px solid transparent;
  transition: all 0.2s ease;
}

.main-nav .nav-item:hover {
  background: rgba(0, 0, 0, 0.03);
  color: #ff4500;
}

.main-nav .nav-item.active {
  color: #ff4500;
  border-bottom-color: #ff4500;
  background: rgba(255, 69, 0, 0.05);
}

.platform-page h1 {
  color: #ff4500 !important;
}

.platform-page h2 {
  color: #323130 !important;
}

.platform-page p {
  color: #605e5c !important;
}

.platform-page main {
  padding: 20px;
  max-width: 1100px;
  margin: 0 auto;
}

/* Override for editor page - allow full width */
.platform-page main:has(.editor-layout) {
  max-width: none;
  padding: 20px 0;
}

.platform-page .grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.platform-page .card {
  background: #ffffff;
  border: 1px solid rgba(255, 107, 71, 0.1);
  border-radius: 14px;
  padding: 16px;
  box-shadow: 0 4px 12px rgba(255, 107, 71, 0.1);
}

.platform-page label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 8px 0;
  color: #323130;
}

.platform-page input {
  padding: 10px;
  border-radius: 10px;
  border: 1px solid #e1dfdd;
  background: #ffffff;
  color: #323130;
}

.platform-page input:focus {
  outline: none;
  border-color: #ff4500;
  box-shadow: 0 0 0 2px rgba(255, 69, 0, 0.1);
}

.platform-page button {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 107, 71, 0.3);
  background: #ffffff;
  color: #323130;
  cursor: pointer;
  transition: all 0.3s ease;
}

.platform-page button:hover {
  background: rgba(255, 107, 71, 0.1);
  border-color: #ff4500;
}

.platform-page .row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.platform-page pre.out {
  background: #f8f7f5;
  border: 1px solid #e1dfdd;
  border-radius: 10px;
  padding: 10px;
  white-space: pre-wrap;
  word-break: break-word;
  min-height: 40px;
  color: #323130;
}

.platform-page code {
  background: #f8f7f5;
  border: 1px solid #e1dfdd;
  border-radius: 6px;
  padding: 2px 6px;
  color: #323130;
}

.platform-page pre {
  background: #1e1e1e;
  border: 1px solid #e1dfdd;
  border-radius: 10px;
  padding: 16px;
  overflow-x: auto;
  margin: 12px 0;
}

.platform-page pre code {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  color: #d4d4d4;
  font-family: 'Courier New', 'Monaco', monospace;
  font-size: 13px;
  line-height: 1.6;
  white-space: pre;
  display: block;
}

.platform-page .hint {
  opacity: .8;
  font-size: 12px;
  color: #605e5c !important;
}

.platform-page footer {
  padding: 20px;
  color: #605e5c;
  text-align: center;
}

/* Material-inspired components for platform page */
.platform-page .loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 400px;
  gap: 20px;
}

.platform-page .loading-container p {
  color: #605e5c !important;
}

.platform-page .spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(255, 107, 71, 0.2);
  border-top: 4px solid #ff4500;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.platform-page .auth-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.platform-page .auth-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 30px;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 12px;
  padding: 4px;
  border: 1px solid rgba(255, 107, 71, 0.1);
}

.platform-page .tab-button {
  flex: 1;
  padding: 12px 20px;
  background: transparent;
  border: none;
  color: #8a8886;
  font-weight: 500;
  border-radius: 8px;
  transition: all 0.3s ease;
  cursor: pointer;
}

.platform-page .tab-button.active {
  background: #ff4500;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(255, 69, 0, 0.3);
}

.platform-page .auth-form {
  display: none;
}

.platform-page .auth-form.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.platform-page .btn-primary {
  width: 100%;
  padding: 12px 24px;
  background: #ff4500;
  border: none;
  color: white;
  font-weight: 500;
  border-radius: 10px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  margin-top: 20px;
}

.platform-page .btn-primary:hover {
  transform: translateY(-2px);
  background: #e63600;
  box-shadow: 0 8px 20px rgba(255, 69, 0, 0.3);
}

.platform-page .btn-secondary {
  padding: 10px 20px;
  background: #ffffff;
  border: 1px solid rgba(255, 107, 71, 0.3);
  color: #ff4500;
  font-weight: 500;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.platform-page .btn-secondary:hover {
  background: rgba(255, 107, 71, 0.1);
  border-color: #ff4500;
}

.platform-page .btn-danger {
  padding: 10px 20px;
  background: #dc3545;
  border: none;
  color: white;
  font-weight: 500;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.platform-page .btn-danger:hover {
  background: #c82333;
}

.platform-page .error-message {
  color: #ff6b6b;
  font-size: 14px;
  margin-top: 10px;
  padding: 8px 12px;
  background: rgba(255, 107, 107, 0.1);
  border-radius: 6px;
  display: none;
}

.platform-page .error-message:not(:empty) {
  display: block;
}

.platform-page .success-message {
  color: #51cf66;
  font-size: 14px;
  margin-top: 10px;
  padding: 8px 12px;
  background: rgba(81, 207, 102, 0.1);
  border-radius: 6px;
  display: none;
}

.platform-page .success-message:not(:empty) {
  display: block;
}

.platform-page .user-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px 20px;
}

/* Override for editor page - allow full width */
.platform-page .user-container:has(.editor-layout) {
  max-width: none;
  padding: 0 20px 20px;
}

.platform-page .tier-badge {
  padding: 4px 12px;
  background: #868e96;  /* Default gray for guest */
  color: white;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  text-transform: capitalize;
}

.platform-page .tier-badge.clickable {
  cursor: pointer;
  transition: opacity 0.2s, transform 0.1s;
}

.platform-page .tier-badge.clickable:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.platform-page .tier-badge.clickable:active {
  transform: translateY(0);
}

.platform-page label span {
  display: block;
  color: #605e5c;
  font-size: 14px;
  font-weight: 500;
}

.platform-page input::placeholder {
  color: #a19f9d;
}

/* API Keys Management */
.platform-page .api-keys-card {
  margin-bottom: 30px;
}

.platform-page .api-keys-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 30px;
  border-bottom: 1px solid #e1dfdd;
}

.platform-page .api-keys-header h2 {
  margin: 0;
  color: #323130 !important;
}

.platform-page .btn-small {
  padding: 8px 16px;
  font-size: 14px;
  width: auto;
  margin: 0;
}

.platform-page .api-keys-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 40px;
  color: #605e5c;
}

.platform-page .spinner-small {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 107, 71, 0.2);
  border-top: 2px solid #ff4500;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.platform-page .api-keys-list {
  padding: 0;
}

.platform-page .api-key-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 30px;
  border-bottom: 1px solid #e1dfdd;
  transition: background-color 0.2s ease;
}

.platform-page .api-key-item:hover {
  background-color: #f8f7f5;
}

.platform-page .api-key-item:last-child {
  border-bottom: none;
}

.platform-page .api-key-info {
  flex: 1;
}

.platform-page .api-key-name {
  font-weight: 600;
  color: #323130;
  margin-bottom: 4px;
}

.platform-page .api-key-details {
  display: flex;
  gap: 16px;
  font-size: 14px;
  color: #8a8886;
}

.platform-page .api-key-prefix {
  font-family: 'Monaco', 'Courier New', monospace;
  background: #f8f7f5;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid #e1dfdd;
}

.platform-page .api-key-status {
  display: flex;
  align-items: center;
  gap: 8px;
}

.platform-page .status-dot.active {
  background-color: #51cf66;
}

.platform-page .status-dot.inactive {
  background-color: #ff6b6b;
}

.platform-page .api-key-actions {
  display: flex;
  gap: 8px;
  margin-left: 16px;
}

.platform-page .btn-icon {
  padding: 8px;
  border: 1px solid rgba(255, 107, 71, 0.3);
  background: #ffffff;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  color: #605e5c;
}

.platform-page .btn-icon:hover {
  background: rgba(255, 107, 71, 0.1);
  border-color: #ff4500;
  color: #ff4500;
}

.platform-page .btn-icon.danger {
  border-color: rgba(220, 53, 69, 0.3);
  color: #dc3545;
}

.platform-page .btn-icon.danger:hover {
  background: rgba(220, 53, 69, 0.1);
  border-color: #dc3545;
}

.platform-page .no-api-keys {
  padding: 60px 30px;
  text-align: center;
}

.platform-page .empty-state p {
  color: #8a8886 !important;
  margin: 8px 0;
}

.platform-page .empty-subtitle {
  font-size: 14px;
  opacity: 0.8;
}

.platform-page .api-key-meta {
  display: flex;
  gap: 4px;
  align-items: center;
}

.platform-page .api-key-scope {
  background: rgba(255, 107, 71, 0.1);
  color: #ff4500;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
}

.platform-page .api-key-usage {
  font-size: 12px;
  color: #8a8886;
}

.platform-page .form-help {
  font-size: 13px;
  color: #8a8886;
  margin-top: 6px;
}

/* Telegram Bots Management */
.platform-page .telegram-bots-card {
  margin-bottom: 30px;
}

.platform-page .telegram-bots-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 30px;
  border-bottom: 1px solid #e1dfdd;
}

.platform-page .telegram-bots-header h2 {
  margin: 0;
  color: #323130 !important;
}

.platform-page .telegram-bots-body {
  padding: 24px 30px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.platform-page .telegram-bots-intro {
  margin: 0;
  color: #605e5c;
  font-size: 14px;
}

.platform-page .telegram-bots-list {
  display: flex;
  flex-direction: column;
  border: 1px solid #e1dfdd;
  border-radius: 12px;
  overflow: hidden;
}

.platform-page .telegram-bot-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid #e1dfdd;
  background: white;
  transition: background-color 0.2s ease;
}

.platform-page .telegram-bot-item:last-child {
  border-bottom: none;
}

.platform-page .telegram-bot-item:hover {
  background-color: #f8f7f5;
}

.platform-page .telegram-bot-info {
  flex: 1;
  min-width: 0;
}

.platform-page .telegram-bot-name {
  font-weight: 600;
  color: #323130;
  margin-bottom: 6px;
}

.platform-page .telegram-bot-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 13px;
  color: #605e5c;
}

.platform-page .telegram-bot-meta span {
  background: rgba(96, 94, 92, 0.08);
  padding: 4px 10px;
  border-radius: 999px;
}

.platform-page .telegram-bot-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #605e5c;
  margin-left: 16px;
  white-space: nowrap;
}

.platform-page .telegram-bot-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 16px;
}

.platform-page .telegram-bot-actions .btn-icon {
  font-size: 16px;
  padding: 8px 10px;
}

.platform-page .telegram-bots-empty {
  padding: 40px 16px;
  text-align: center;
}

.platform-page .empty-state.error p {
  color: #dc3545 !important;
}

/* Header and Navigation */
.header {
    position: fixed;
    top: 1rem;
    left: 50%;
    transform: translateX(-50%) translateY(-120px);
    z-index: 1000;
    width: auto;
    max-width: calc(100vw - 2rem);
    animation: slideDownNavbar 0.8s ease-out 0.3s forwards;
}

@keyframes slideDownNavbar {
    from {
        transform: translateX(-50%) translateY(-120px);
        opacity: 0;
    }
    to {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
}

/* Mobile responsive fixes */
@media (max-width: 768px) {
    .header {
        left: 1rem;
        right: 1rem;
        width: calc(100% - 2rem);
        max-width: none;
        transform: translateX(0) translateY(-120px);
        animation: slideDownNavbarMobile 0.8s ease-out 0.3s forwards;
    }
    
    @keyframes slideDownNavbarMobile {
        from {
            transform: translateX(0) translateY(-120px);
            opacity: 0;
        }
        to {
            transform: translateX(0) translateY(0);
            opacity: 1;
        }
    }
}

.nav-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 2rem;
    background: rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(15px);
    border-radius: 50px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15), 0 4px 16px rgba(255, 107, 71, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.6);
    gap: 3rem;
    width: 100%;
    box-sizing: border-box;
}

/* Mobile responsive navigation */
@media (max-width: 768px) {
    .nav-bar {
        gap: 1.5rem;
        padding: 0.6rem 1rem;
        border-radius: 25px;
    }
    
    .nav-menu {
        gap: 1rem;
        flex-wrap: nowrap;
    }
    
    .nav-menu a {
        font-size: 0.9rem;
        white-space: nowrap;
    }
    
    .language-switcher {
        margin-left: 0.5rem;
    }
    
    .language-switcher select {
        padding: 0.3rem 0.5rem;
        font-size: 0.8rem;
    }
}

.logo {
    font-size: 1.5rem;
    font-weight: 600;
    color: #ff4500;
    display: flex;
    align-items: center;
    gap: 0;
}

.logo-image {
    height: 1.5rem;
    width: auto;
    vertical-align: middle;
    margin: 0 2px;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-menu a {
    color: #323130;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
    display: inline-block;
}

.nav-menu a::after {
    content: attr(data-text);
    font-weight: bold;
    height: 0;
    visibility: hidden;
    overflow: hidden;
    user-select: none;
    pointer-events: none;
    display: block;
    white-space: nowrap;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: #ff4500;
    text-shadow: 0 0 0.5px currentColor;
}

.nav-menu a.active {
    position: relative;
}

.nav-menu a.active::before {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    right: 0;
    height: 2px;
    background: #ff4500;
    border-radius: 1px;
}

/* Language switcher */
.language-switcher {
    margin-left: 1rem;
}

.language-switcher select {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 107, 71, 0.3);
    border-radius: 20px;
    padding: 0.4rem 0.8rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: #323130;
    cursor: pointer;
    transition: all 0.3s ease;
}

.language-switcher select:hover {
    background: rgba(255, 255, 255, 0.95);
    border-color: #ff4500;
}

.language-switcher select:focus {
    outline: none;
    border-color: #ff4500;
    box-shadow: 0 0 0 2px rgba(255, 69, 0, 0.2);
}

/* Main content */
main {
    padding-top: 60px;
}

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

/* Hero Section */
.hero-section {
    position: relative;
    padding: 4rem 0 6rem 0;
    text-align: center;
    /* background: linear-gradient(135deg, #f5f2ea 0%, #f0ede5 50%, #ebe6dd 100%); */
    min-height: 500px;
}

/* Spray Canvas */
#sprayCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
}

.hero-animation {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
}

.animated-svg {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    overflow: visible;
}

.lambda-explosion-container {
    transform-origin: center center;
}

.lambda-logo {
    transform-origin: center center;
    filter: blur(0.1px);
}

.lambda-logo-1 {
    animation: explodeLogo1 5s ease-in-out infinite;
}

.lambda-logo-2 {
    animation: explodeLogo2 5s ease-in-out infinite;
}

.lambda-logo-3 {
    animation: explodeLogo3 5s ease-in-out infinite;
}

.lambda-logo-4 {
    animation: explodeLogo4 5s ease-in-out infinite;
}

.lambda-logo-5 {
    animation: explodeLogo5 5s ease-in-out infinite;
}

.lambda-logo-6 {
    animation: explodeLogo6 5s ease-in-out infinite;
}

.lambda-logo-7 {
    animation: explodeLogo7 5s ease-in-out infinite;
}

.lambda-logo-8 {
    animation: explodeLogo8 5s ease-in-out infinite;
}

/* Logo 1 - Top */
@keyframes explodeLogo1 {
    0%, 100% { 
        transform: translate(600px, 200px) scale(1.5) rotate(0deg);
        opacity: 0.9;
    }
    50% { 
        transform: translate(600px, 80px) scale(1.2) rotate(-10deg);
        opacity: 0.7;
    }
}

/* Logo 2 - Top Right */
@keyframes explodeLogo2 {
    0%, 100% { 
        transform: translate(600px, 200px) scale(1.5) rotate(0deg);
        opacity: 0.9;
    }
    50% { 
        transform: translate(1100px, 90px) scale(1.2) rotate(15deg);
        opacity: 0.7;
    }
}

/* Logo 3 - Right */
@keyframes explodeLogo3 {
    0%, 100% { 
        transform: translate(600px, 200px) scale(1.5) rotate(0deg);
        opacity: 0.9;
    }
    50% { 
        transform: translate(1120px, 200px) scale(1.2) rotate(20deg);
        opacity: 0.7;
    }
}

/* Logo 4 - Bottom Right */
@keyframes explodeLogo4 {
    0%, 100% { 
        transform: translate(600px, 200px) scale(1.5) rotate(0deg);
        opacity: 0.9;
    }
    50% { 
        transform: translate(1100px, 310px) scale(1.2) rotate(25deg);
        opacity: 0.7;
    }
}

/* Logo 5 - Bottom */
@keyframes explodeLogo5 {
    0%, 100% { 
        transform: translate(600px, 200px) scale(1.5) rotate(0deg);
        opacity: 0.9;
    }
    50% { 
        transform: translate(600px, 320px) scale(1.2) rotate(0deg);
        opacity: 0.7;
    }
}

/* Logo 6 - Bottom Left */
@keyframes explodeLogo6 {
    0%, 100% { 
        transform: translate(600px, 200px) scale(1.5) rotate(0deg);
        opacity: 0.9;
    }
    50% { 
        transform: translate(100px, 310px) scale(1.2) rotate(-25deg);
        opacity: 0.7;
    }
}

/* Logo 7 - Left */
@keyframes explodeLogo7 {
    0%, 100% { 
        transform: translate(600px, 200px) scale(1.5) rotate(0deg);
        opacity: 0.9;
    }
    50% { 
        transform: translate(80px, 200px) scale(1.2) rotate(-20deg);
        opacity: 0.7;
    }
}

/* Logo 8 - Top Left */
@keyframes explodeLogo8 {
    0%, 100% { 
        transform: translate(600px, 200px) scale(1.5) rotate(0deg);
        opacity: 0.9;
    }
    50% { 
        transform: translate(100px, 90px) scale(1.2) rotate(-15deg);
        opacity: 0.7;
    }
}

/* Content Sections */
.content-section, .products-section, .team-section, .news-section, .downloads-section {
    padding: 4rem 0;
    background: #FBF8F0;
    color: #323130;
}

.content-section h2, .products-section h2, .team-section h2, .news-section h2, .downloads-section h2 {
    font-size: 2.5rem;
    font-weight: 300;
    margin-bottom: 2rem;
    text-align: center;
    color: #ff4500;
}

.content-section p {
    font-size: 1.1rem;
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    line-height: 1.8;
}

/* Products Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.product-card {
    background: #ffffff;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 4px 12px rgba(255, 107, 71, 0.1);
    border: 1px solid rgba(255, 107, 71, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(255, 107, 71, 0.15);
}

.product-card h3 {
    color: #ff4500;
    font-size: 1.4rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.product-card p {
    color: #605e5c;
    font-size: 1rem;
    text-align: left;
}

/* Team Grid */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.team-member {
    text-align: center;
    padding: 1.5rem;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(255, 107, 71, 0.1);
    transition: transform 0.3s ease;
    text-decoration: none;
    display: block;
    cursor: pointer;
}

.team-member:hover {
    transform: translateY(-4px);
    text-decoration: none;
}

.team-photo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff6b47, #ff4500);
    margin: 0 auto 1rem auto;
    border: 4px solid #ffffff;
    box-shadow: 0 4px 12px rgba(255, 107, 71, 0.2);
}

.team-member h4 {
    color: #ff4500;
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.team-member p {
    color: #605e5c;
    font-size: 0.9rem;
    text-align: center;
}

/* News Grid */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.news-item {
    background: #ffffff;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 4px 12px rgba(255, 107, 71, 0.1);
    border-left: 4px solid #ff4500;
}

.news-item h4 {
    color: #ff4500;
    font-size: 1.3rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.news-item p {
    color: #605e5c;
    margin-bottom: 1rem;
    text-align: left;
}

.news-date {
    color: #8a8886;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Downloads Section */
.download-grid {
    display: grid;
    gap: 2rem;
    max-width: 600px;
    margin: 0 auto;
}

.download-item {
    background: rgba(255, 255, 255, 0.8);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.download-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.download-item h3 {
    color: #ff4500;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.download-item p {
    color: #605e5c;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.download-button {
    display: inline-block;
    background: #ff4500;
    color: white;
    padding: 0.8rem 2rem;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 500;
    transition: background 0.3s ease, transform 0.2s ease;
}

.download-button:hover {
    background: #e63600;
    transform: scale(1.05);
}

/* Usage Costs Section */
.usage-costs-card {
    margin-top: 2rem;
    margin-bottom: 3rem;
}

.costs-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.period-selector {
    padding: 0.5rem 1rem;
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    background: white;
    font-size: 0.9rem;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.period-selector:hover,
.period-selector:focus {
    border-color: #ff4500;
    outline: none;
}

.costs-filters {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.costs-filters .btn-icon {
    padding: 0.4rem 0.6rem;
    min-width: auto;
    border-radius: 8px;
}

.tag-filter {
    padding: 0.5rem 1rem;
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    background: white;
    font-size: 0.9rem;
    min-width: 200px;
    transition: border-color 0.3s ease;
}

.tag-filter:hover,
.tag-filter:focus {
    border-color: #ff4500;
    outline: none;
}

.costs-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    color: #605e5c;
}

.costs-summary {
    background: #f8f8f8;
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

.cost-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.cost-label {
    font-size: 1.1rem;
    font-weight: 600;
    color: #323130;
}

.cost-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: #ff4500;
}

.cost-period {
    margin-top: 0.5rem;
}

.period-text {
    font-size: 0.9rem;
    color: #605e5c;
}

.costs-breakdown {
    margin-top: 1.5rem;
}

.api-cost-section {
    background: white;
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.api-cost-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.api-name {
    font-weight: 600;
    color: #323130;
    text-transform: uppercase;
    font-size: 0.9rem;
}

.api-total {
    font-weight: 600;
    color: #ff4500;
}

.api-cost-details {
    font-size: 0.85rem;
    color: #605e5c;
    margin-bottom: 0.5rem;
}

.model-costs {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid #f0f0f0;
}

.model-cost-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.25rem 0;
    font-size: 0.85rem;
}

.model-cost-item.model-header {
    font-weight: 600;
    padding: 0.5rem 0 0.25rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.model-cost-item.tag-item {
    padding-left: 1rem;
    font-size: 0.8rem;
    color: #8a8886;
}

.model-name {
    color: #605e5c;
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
}

.model-header .model-name {
    color: #323130;
    font-weight: 600;
}

.model-cost {
    color: #323130;
}

.tag-badge {
    display: inline-block;
    padding: 2px 8px;
    background: rgba(255, 107, 71, 0.1);
    color: #ff4500;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    margin: 0 0.5rem;
}

.no-costs {
    text-align: center;
    color: #605e5c;
    padding: 2rem;
    font-style: italic;
}

/* Footer */
.footer {
    background: #323130;
    color: #ffffff;
    text-align: center;
    height: 500px;
    padding-top: 2rem;
}

.footer p {
    margin: 0;
    opacity: 0.9;
}

/* Responsive design */
@media (max-width: 768px) {
    .header {
        top: 0.5rem;
        left: 0.5rem;
        right: 0.5rem;
        transform: none;
        width: auto;
    }
    
    .nav-bar {
        padding: 0.8rem 1rem;
        flex-direction: column;
        gap: 1rem;
        border-radius: 20px;
    }
    
    .nav-menu {
        gap: 1rem;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .hero-section p {
        font-size: 1.1rem;
    }
    
    .hero-cta {
        flex-direction: column;
        align-items: center;
    }
    
    .btn-primary, .btn-secondary {
        width: 200px;
        text-align: center;
    }
    
    .content-section h2, .products-section h2, .team-section h2, .news-section h2, .downloads-section h2 {
        font-size: 2rem;
    }
    
    .product-grid, .team-grid, .news-grid {
        grid-template-columns: 1fr;
    }
    
    .news-grid {
        grid-template-columns: 1fr;
    }
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Animation for page load */
.hero-content {
    animation: fadeInUp 0.8s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Editor Layout */
.editor-layout {
    display: flex;
    gap: 0;
    height: calc(100vh - 120px);
    margin: 0;
    max-width: 100%;
    min-width: 0;
}

@media (max-width: 1550px) {
    .editor-layout {
        max-width: 100%;
    }
}

@media (max-width: 1200px) {
    .editor-layout {
        max-width: 100%;
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    .editor-layout {
        max-width: 100%;
        margin: 0;
    }
}

/* File Sidebar */
.file-sidebar {
    width: 200px;
    background: #f8f9fa;
    border-right: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.file-sidebar-header {
    padding: 12px 16px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #ffffff;
    min-height: 60px;
    box-sizing: border-box;
}

.file-sidebar-header h3 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: #323130;
}

.file-sidebar-actions {
    display: flex;
    gap: 4px;
    align-items: center;
}

.btn-icon {
    background: none;
    border: none;
    font-size: 20px;
    width: 28px;
    height: 28px;
    border-radius: 4px;
    cursor: pointer;
    color: #605e5c;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.btn-icon:hover {
    background: #f3f2f1;
}

.file-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px 0;
}

.file-list-loading {
    padding: 16px;
    text-align: center;
    color: #605e5c;
    font-size: 13px;
}

.file-list-empty {
    padding: 16px;
    text-align: center;
    color: #a19f9d;
    font-size: 13px;
}

.file-item {
    padding: 10px 12px;
    cursor: pointer;
    border-left: 3px solid transparent;
    transition: all 0.15s;
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
}

.file-item:hover {
    background: #f3f2f1;
}

.file-item.active {
    background: rgba(255, 69, 0, 0.08);
    border-left-color: #ff4500;
}

.file-item-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.file-item-name {
    font-size: 13px;
    font-weight: 500;
    color: #323130;
    word-break: break-word;
}

.file-item-meta {
    font-size: 11px;
    color: #a19f9d;
}

.file-item-delete {
    background: none;
    border: none;
    font-size: 16px;
    width: 24px;
    height: 24px;
    border-radius: 4px;
    cursor: pointer;
    color: #a19f9d;
    display: none;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.15s;
}

.file-item.active .file-item-delete {
    display: flex;
}

.file-item-delete:hover {
    background: rgba(255, 107, 71, 0.1);
    color: #ff6b47;
}

/* Editor Area */
.editor-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #ffffff;
    min-width: 0;
}

.editor-main {
    display: flex;
    flex: 1;
    min-height: 0;
    position: relative;
}

.editor-pane {
    flex: 0 0 460px;
    width: 460px;
    display: flex;
    flex-direction: column;
    min-width: 320px;
    border-left: 1px solid #e5e7eb;
    background: #fff;
}

.pane-resizer {
    width: 12px;
    min-width: 12px;
    cursor: col-resize;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, #f3f4f6 0%, #e5e7eb 100%);
    border-left: 1px solid #e5e7eb;
    border-right: 1px solid #e5e7eb;
    position: relative;
    transition: background 0.2s ease;
}

.pane-resizer::after {
    content: "";
    width: 2px;
    height: 60%;
    border-radius: 3px;
    background: #d1d5db;
}

.pane-resizer:hover,
.editor-main.resizing .pane-resizer {
    background: linear-gradient(180deg, #e5e7eb 0%, #d1d5db 100%);
}

.pane-resizer:hover::after,
.editor-main.resizing .pane-resizer::after {
    background: #9ca3af;
}

.resizer-hint {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) rotate(-90deg);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #9ca3af;
    pointer-events: none;
    white-space: nowrap;
}

.editor-main.resizing {
    user-select: none;
}

.editor-main.resizing .editor-pane,
.editor-main.resizing .chat-pane {
    pointer-events: none;
}

.editor-toolbar {
    display: flex;
    gap: 8px;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid #e5e7eb;
    background: #fafafa;
    min-height: 60px;
    box-sizing: border-box;
}

.current-filename {
    font-size: 14px;
    font-weight: 600;
    color: #323130;
    margin-right: auto;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
    position: relative;
    padding-right: 24px; /* Make space for the pencil icon */
}

.current-filename::after {
    content: '✏️';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

.current-filename:hover::after {
    opacity: 0.6;
}

.chat-pane {
    flex: 1 1 auto;
    min-width: 320px;
    background: #f9fafb;
    border-right: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    transition: flex 0.2s ease;
    position: relative;
}

.chat-pane.collapsed {
    width: 0;
    min-width: 0;
    flex: 0 0 0;
    padding-left: 48px;
    box-sizing: border-box;
    border-right: none;
}

.chat-pane.collapsed .chat-pane-body,
.chat-pane.collapsed .chat-pane-info,
.chat-pane.collapsed #chatDeleteBtn {
    display: none;
}

.chat-pane.collapsed .chat-pane-header {
    justify-content: flex-end;
    padding-left: 0;
}

.chat-pane.collapsed #chatPaneToggle {
    position: absolute;
    top: 12px;
    left: 8px;
    right: auto;
}

.chat-pane.collapsed ~ .pane-resizer {
    display: none;
}

.chat-pane.collapsed ~ .editor-pane {
    flex: 1 1 auto;
    width: auto;
    min-width: 320px;
    border-left: none;
}

.chat-pane-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid #e5e7eb;
    background: #fff;
    column-gap: 12px;
}

.chat-pane-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.chat-pane-header h4 {
    font-size: 14px;
    margin: 0;
    color: #111827;
}

.chat-label {
    font-size: 12px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #6b7280;
    display: block;
}

.chat-subtitle {
    font-size: 13px;
    margin: 4px 0 0;
    color: #1f2937;
}

.chat-active-file {
    margin: 4px 0 0;
    font-size: 12px;
    color: #4b5563;
}

.chat-pane-body {
    flex: 1;
    position: relative;
    min-height: 0;
}

.chat-pane-body iframe {
    border: none;
    width: 100%;
    height: 100%;
    display: block;
    background: #fff;
}

.chat-pane-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: #6b7280;
    pointer-events: none;
    text-align: center;
    padding: 0 16px;
}

.chat-pane-note {
    font-size: 12px;
    margin-top: 8px;
}

.tiles-header-card {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
    flex-wrap: wrap;
}

.tiles-header-text h2 {
    margin-bottom: 6px;
}

.tiles-controls {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    min-width: 0;
}

.platform-page .tiles-search {
    flex: 1 1 320px;
    display: flex;
    flex-direction: row;
    align-items: center;
    flex-wrap: nowrap;
    gap: 8px;
    padding: 6px 14px;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    background: #f8fafc;
    color: #6b7280;
    margin: 0;
}

.platform-page .tiles-search input {
    border: none;
    background: transparent;
    flex: 1 1 auto;
    min-width: 0;
    font-size: 14px;
    outline: none;
    color: #111827;
    padding: 4px 0;
}

.tiles-search-icon {
    display: flex;
    align-items: center;
    font-size: 16px;
    flex-shrink: 0;
}

.feature-list {
    list-style: none;
    margin: 16px 0 0;
    padding-left: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.feature-list li {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    font-size: 14px;
    color: #1f2937;
    display: flex;
    flex-direction: column;
    transition: background 0.2s, border-color 0.2s;
}

.feature-list li:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.feature-list li a {
    display: block;
    padding: 12px 16px;
    color: inherit;
    text-decoration: none;
}

.feature-list strong {
    font-weight: 600;
    color: #111827;
    margin-bottom: 4px;
}

.card-divider {
    border: none;
    border-top: 1px solid #e5e7eb;
    margin: 20px 0;
}

/* Intro card styling */
.intro-card h2 {
    margin-bottom: 16px;
}

.intro-card h3 {
    margin-top: 24px;
}

.intro-card .highlight {
    color: #ff4500;
}

.intro-card .inline-link {
    color: #ff4500;
    text-decoration: none;
    font-weight: 500;
}

.intro-card .inline-link:hover {
    text-decoration: underline;
}

.getting-started-list {
    margin: 16px 0;
    padding-left: 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.getting-started-list li {
    font-size: 14px;
    color: #1f2937;
    padding: 4px 0;
}

.getting-started-list a {
    color: #ff4500;
    text-decoration: none;
    font-weight: 500;
}

.getting-started-list a:hover {
    text-decoration: underline;
}

.tile-scope-group {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px;
    border-radius: 999px;
    background: #f1f3f5;
}

.tile-scope-btn {
    border: none;
    background: transparent;
    padding: 8px 16px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    color: #4b5563;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tile-scope-btn.active {
    background: #111827;
    color: #fff;
    box-shadow: 0 4px 12px rgba(17, 24, 39, 0.25);
}

.tiles-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 140px;
}

.tiles-empty {
    margin-top: 20px;
}

.tiles-grid-wrapper {
    margin-top: 20px;
}

.tiles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
}

.tile-card {
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 8px 30px rgba(15, 23, 42, 0.08);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

.tile-image {
    background: #0f172a;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 140px;
    padding: 8px;
}

.tile-image img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 10px;
    object-fit: contain;
    background: #fff;
}

.tile-image-placeholder {
    color: #9ca3af;
    font-size: 13px;
    text-align: center;
    padding: 30px 12px;
}

.tile-body {
    padding: 16px 18px 10px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.tile-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.tile-title-row h3 {
    font-size: 16px;
    margin: 0;
    color: #111827;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.tile-name-text {
    display: inline-block;
}

.tile-rename-btn {
    border: none;
    background: transparent;
    color: #9ca3af;
    cursor: pointer;
    padding: 0;
    font-size: 14px;
    line-height: 1;
    opacity: 0;
    transition: opacity 0.15s ease, color 0.15s ease;
}

.tile-title-row h3:hover .tile-rename-btn,
.tile-rename-btn:focus-visible {
    opacity: 1;
}

.tile-rename-btn:hover {
    color: #111827;
}

.tile-visibility {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 4px 10px;
    border-radius: 999px;
    background: #e5e7eb;
    color: #4b5563;
}

.tile-visibility.public {
    background: #ecfdf5;
    color: #0f766e;
}

.tile-visibility.private {
    background: #fef3c7;
    color: #b45309;
}

.tile-meta {
    font-size: 12px;
    color: #6b7280;
    margin: 8px 0 12px;
}

.tile-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

.tile-tag {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 6px;
    background: #f3f4f6;
    color: #4b5563;
}

.tile-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 8px 16px;
    margin-top: auto;
    font-size: 12px;
    color: #6b7280;
}

.tile-details div {
    display: flex;
    justify-content: space-between;
    gap: 8px;
}

.tile-details span:last-child {
    color: #111827;
    font-weight: 500;
    text-align: right;
}

.tile-footer {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    padding: 12px 18px 18px;
}

.tile-action {
    flex: 1;
    border: 1px solid #d1d5db;
    background: #fff;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    padding: 8px 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #111827;
}

.tile-action:hover {
    background: #111827;
    color: #fff;
    border-color: #111827;
}

.tile-action.tile-delete {
    border-color: #ffc9c9;
    color: #c92a2a;
}

.tile-action.tile-delete:hover {
    background: #f03e3e;
    border-color: #f03e3e;
    color: #fff;
}

.tile-action.copied {
    background: #16a34a;
    color: #fff;
    border-color: #16a34a;
}

@media (max-width: 640px) {
    .tiles-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .tile-details {
        grid-template-columns: 1fr;
    }
}

.status-dot {
    font-size: 12px;
    opacity: 0.7;
    color: #605e5c;
    flex-shrink: 0;
    white-space: nowrap;
}

.editor-container {
    flex: 1;
    overflow: hidden;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .file-sidebar {
        width: 180px;
    }

    .editor-layout {
        height: calc(100vh - 140px);
    }
}

/* Permissions Modal */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}

.modal-content {
  position: relative;
  background: white;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  width: 90%;
  max-width: 800px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalSlideIn 0.2s ease-out;
}

.modal-content.large {
  width: 80vw;
  max-width: 800px;
  height: 80vh;
  max-height: 80vh;
}

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

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid #e9ecef;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
}

.modal-header h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  color: #333;
}

.modal-close {
  background: none;
  border: none;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  color: #868e96;
  transition: color 0.2s;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close:hover {
  color: #495057;
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}

.modal-content.large .modal-body {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.permission-info {
  margin-bottom: 24px;
}

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

.permission-label {
  font-weight: 600;
  color: #495057;
  font-size: 14px;
}

.user-id-text {
  font-family: 'Courier New', monospace;
  font-size: 13px;
  color: #495057;
  background: #f8f9fa;
  padding: 4px 8px;
  border-radius: 4px;
  user-select: all; /* Allow easy selection/copying */
}

.tier-badge-large {
  padding: 6px 16px;
  background: #868e96;
  color: white;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 600;
  text-transform: capitalize;
}

.permissions-list-container h4 {
  margin: 0 0 12px 0;
  font-size: 16px;
  font-weight: 600;
  color: #333;
}

.permissions-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.permission-category {
  font-size: 11px;
  font-weight: 700;
  color: #868e96;
  letter-spacing: 0.5px;
  margin-top: 16px;
  margin-bottom: 8px;
  padding-left: 4px;
}

.permission-category:first-child {
  margin-top: 0;
}

.permission-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: #f8f9fa;
  border-radius: 8px;
  margin-bottom: 6px;
  font-size: 14px;
  color: #495057;
  transition: background 0.2s;
}

.permission-item:hover {
  background: #e9ecef;
}

.permission-item.wildcard {
  background: linear-gradient(135deg, #9775fa 0%, #845ef7 100%);
  color: white;
  font-weight: 600;
}

.permission-item.wildcard .permission-icon {
  color: white;
}

.permission-icon {
  color: #51cf66;
  font-weight: bold;
  font-size: 16px;
  flex-shrink: 0;
}

.no-permissions {
  padding: 20px;
  text-align: center;
  color: #868e96;
  font-style: italic;
  background: #f8f9fa;
  border-radius: 8px;
  list-style: none;
}

/* User Settings Card */
.user-settings-card {
  margin-bottom: 24px;
}

.user-settings-card h2 {
  margin-bottom: 20px;
}

.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  background: #f8f9fa;
  border-radius: 8px;
}

.settings-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.settings-label {
  font-weight: 600;
  color: #333;
  font-size: 15px;
}

.settings-description {
  font-size: 13px;
  color: #868e96;
}

/* User Permissions Card */
.user-permissions-card h2 {
  margin-bottom: 20px;
}

/* Form Styles for Modals */
.form-group {
  margin-bottom: 20px;
}

.form-group:last-child {
  margin-bottom: 0;
}

.form-label {
  display: block;
  font-weight: 600;
  color: #333;
  margin-bottom: 8px;
  font-size: 14px;
}

.form-label .required {
  color: #fa5252;
  display: inline;
  margin-left: 2px;
}

.form-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus {
  outline: none;
  border-color: #228be6;
  box-shadow: 0 0 0 3px rgba(34, 139, 230, 0.1);
}

.form-input::placeholder {
  color: #adb5bd;
}

textarea.form-input {
  resize: vertical;
  min-height: 80px;
}

.form-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid #e9ecef;
}

/* Modal form buttons - more specific to override platform styles */
.modal .form-actions .btn-primary,
.modal .form-actions .btn-secondary {
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  width: auto; /* Override any width: 100% from platform styles */
  margin-top: 0; /* Override platform margin-top: 20px */
  transform: none; /* Remove any transform from platform styles */
}

.modal .form-actions .btn-primary {
  background: #228be6;
  color: white;
}

.modal .form-actions .btn-primary:hover:not(:disabled) {
  background: #1c7ed6;
  transform: none; /* Keep no transform on hover */
  box-shadow: none; /* Remove platform box-shadow */
}

.modal .form-actions .btn-primary:disabled {
  background: #adb5bd;
  cursor: not-allowed;
}

.modal .form-actions .btn-secondary {
  background: #f1f3f5;
  color: #495057;
}

.modal .form-actions .btn-secondary:hover {
  background: #e9ecef;
  transform: none; /* Keep no transform on hover */
  box-shadow: none; /* Remove any box-shadow */
}

.modal-actions {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
}

.modal-actions .btn-primary,
.modal-actions .btn-secondary {
  margin-top: 0;
}

.modal-content.large .modal-actions button {
  width: 100px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.modal-content.large #replaceChatCode {
  width: 200px;
}

.chat-code-editor {
  height: 420px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #111827;
}

.modal-content.large .chat-code-editor {
  flex: 1;
  height: 100%;
  min-height: 0;
}

/* Alert styles */
.alert {
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 20px;
  font-size: 14px;
}

.alert-warning {
  background: #fff3bf;
  border: 1px solid #ffd43b;
  color: #862e00;
}

.alert strong {
  font-weight: 700;
}

/* API Key Display */
.api-key-display {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.api-key-value {
  flex: 1;
  font-family: 'Courier New', monospace;
  font-size: 13px;
  background: #f8f9fa;
}

.btn-copy {
  padding: 10px 16px;
  background: #228be6;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.btn-copy:hover {
  background: #1c7ed6;
}

.btn-copy.copied {
  background: rgba(81, 207, 102, 0.15);
  color: #2f9e44;
}

/* Form hints */
.form-hint {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: #868e96;
  font-style: italic;
}

/* Booking Section (Calendly) */
.booking-section {
    padding: 4rem 0;
    background: #FBF8F0;
    color: #323130;
}

.booking-section h2 {
    font-size: 2.5rem;
    font-weight: 300;
    margin-bottom: 1rem;
    text-align: center;
    color: #ff4500;
}

.booking-section > .container > p {
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto 2rem auto;
    text-align: center;
    color: #605e5c;
}

.booking-section .calendly-inline-widget {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(255, 107, 71, 0.1);
}

/* Footer link - preserves text appearance but adds pointer cursor */
.footer-link {
    color: inherit;
    text-decoration: none;
    cursor: pointer;
}

.footer-link:hover {
    color: inherit;
    text-decoration: none;
}

/* App Storage Management */
.platform-page .app-storage-card {
  margin-bottom: 30px;
}

.platform-page .app-storage-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 30px;
  border-bottom: 1px solid #e1dfdd;
  gap: 20px;
}

.platform-page .app-storage-header h2 {
  margin: 0;
  color: #323130 !important;
  flex-shrink: 0;
}

.platform-page .app-storage-filter {
  display: flex;
  align-items: center;
  flex: 1;
  max-width: 400px;
}

.platform-page .app-storage-filter .form-input {
  flex: 1;
  min-width: 0;
  margin: 0;
}

.platform-page .app-storage-filter .btn-small {
  flex-shrink: 0;
  white-space: nowrap;
}

.platform-page .app-storage-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 40px;
  color: #605e5c;
}

.platform-page .app-storage-list {
  padding: 0;
}

.platform-page .app-storage-group {
  border-bottom: 1px solid #e1dfdd;
}

.platform-page .app-storage-group:last-child {
  border-bottom: none;
}

.platform-page .app-storage-group-header {
  background: #f8f7f5;
  padding: 12px 30px;
  font-weight: 600;
  color: #323130;
  font-family: 'Monaco', 'Courier New', monospace;
  font-size: 14px;
  border-bottom: 1px solid #e1dfdd;
}

.platform-page .app-storage-group-entries {
  padding: 0;
}

.platform-page .app-storage-entry {
  display: grid;
  grid-template-columns: 200px 1fr 150px auto;
  gap: 16px;
  align-items: center;
  padding: 16px 30px;
  border-bottom: 1px solid #f0efed;
  transition: background-color 0.2s ease;
}

.platform-page .app-storage-entry:hover {
  background-color: #faf9f8;
}

.platform-page .app-storage-entry:last-child {
  border-bottom: none;
}

.platform-page .app-storage-entry-key {
  font-weight: 500;
  color: #323130;
  font-family: 'Monaco', 'Courier New', monospace;
  font-size: 13px;
  word-break: break-word;
}

.platform-page .app-storage-entry-value {
  color: #605e5c;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.platform-page .app-storage-entry-date {
  color: #8a8886;
  font-size: 12px;
  text-align: right;
}

.platform-page .app-storage-entry-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.platform-page .no-app-storage {
  padding: 60px 30px;
  text-align: center;
}

.platform-page .app-storage-error {
  padding: 20px 30px;
  color: #dc3545;
  text-align: center;
}

.platform-page .app-storage-value-textarea {
  font-family: 'Monaco', 'Courier New', monospace;
  font-size: 13px;
  resize: vertical;
  min-height: 200px;
}

.platform-page .modal-content-wide {
  max-width: 700px;
}

.platform-page .delete-entry-details {
  background: #f8f7f5;
  padding: 12px 16px;
  border-radius: 6px;
  margin: 16px 0;
  font-size: 14px;
}

.platform-page .delete-entry-details p {
  margin: 4px 0;
  word-break: break-all;
}

@media (max-width: 768px) {
  .platform-page .app-storage-header {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .platform-page .app-storage-filter {
    max-width: none;
  }

  .platform-page .app-storage-entry {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .platform-page .app-storage-entry-date {
    text-align: left;
  }

  .platform-page .app-storage-entry-actions {
    justify-content: flex-start;
  }
}
