:root {
  --primary-gradient: linear-gradient(90deg, #d500f9 0%, #aa00ff 100%);
  --secondary-bg: #f8f9fa;
  --text-primary: #1a1a1a;
  --text-secondary: #666;
  --border-color: #eee;
  --white: #ffffff;
  --sidebar-width: 300px;
}

body {
  font-family: 'Rajdhani', sans-serif;
  background-color: #f3e5f5; /* Light purple pattern bg mock */
  background-image: radial-gradient(#e1bee7 1px, transparent 1px);
  background-size: 20px 20px;
  color: var(--text-primary);
  margin: 0;
  padding: 0;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

.container {
  width: 95%;
  max-width: 1400px;
  background: var(--white);
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 90vh;
}

header {
  padding: 20px 30px;
  border-bottom: 1px solid var(--border-color);
  background: #fff;
}

.brand-wrapper {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
}

.logo {

  height: 36px;
  width: auto;
}

.header-text {
  display: flex;
  flex-direction: column;
}

header h1 {
  margin: 0;
  font-family: 'Orbitron', sans-serif;
  font-size: 28px;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 2px;
  line-height: 1.1;
}

header p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 14px;
}

/* App Layout */
.app-layout {
  display: flex;
  flex: 1;
  overflow: hidden;
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-width);
  background: #fafafa;
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  padding: 20px;
}

.sidebar h2 {
  font-size: 18px;
  margin-top: 0;
  margin-bottom: 20px;
  color: #333;
}

.trends-container {
  flex: 1;
  overflow-y: auto;
  padding-right: 5px;
}

/* Scrollbar styling for sidebar */
.trends-container::-webkit-scrollbar {
  width: 6px;
}
.trends-container::-webkit-scrollbar-thumb {
  background-color: #ddd;
  border-radius: 3px;
}

.trend-item {
  background: #fff;
  padding: 12px 15px;
  margin-bottom: 10px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: all 0.2s;
  font-size: 14px;
}

.trend-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 6px rgba(0,0,0,0.05);
  border-color: #d500f9;
}

.trend-item.selected {
  background: #f3e5f5;
  border-color: #aa00ff;
  color: #4a148c;
  font-weight: 600;
}

/* Workspace (Input + Output) */
.workspace {
  flex: 1;
  display: flex;
  background: #fff;
}

.config-panel {
  flex: 1;
  padding: 40px;
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.result-panel {
  flex: 1;
  background: #fafafa;
  display: flex;
  /* align-items: center;  Removed to allow scrolling */
  /* justify-content: center; Removed to allow scrolling */
  padding: 40px;
  overflow-y: auto; /* Enable vertical scrolling */
}

/* Input Section Styling */
.config-box h2 {
  font-size: 36px;
  margin: 0 0 10px 0;
  font-weight: 800;
  text-transform: uppercase;
}


.subtitle {
  color: var(--text-secondary);
  margin-bottom: 30px;
  line-height: 1.5;
}

/* Upload Placeholder Mock */
.upload-placeholder-mock {
  border: 2px dashed #e0e0e0;
  border-radius: 12px;
  padding: 40px;
  text-align: center;
  margin-bottom: 30px;
  background: #fafafa;
  color: #999;
}
.upload-icon {
  font-size: 24px;
  width: 50px;
  height: 50px;
  background: #fce4ec;
  color: #d81b60;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 10px;
}
.upload-text {
  font-weight: 600;
  color: #333;
}
.upload-subtext {
  font-size: 12px;
  margin-top: 5px;
}

/* Form Styles */
.form-row {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
}

.form-group {
  flex: 1;
  margin-bottom: 20px;
}

label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: #999;
  margin-bottom: 8px;
  letter-spacing: 0.5px;
}

input[type="text"],
select {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid #eee;
  background: #f9f9f9;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  color: #333;
  outline: none;
  box-sizing: border-box;
  transition: border 0.2s;
}

input[type="text"]:focus,
select:focus {
  border-color: #aa00ff;
  background: #fff;
}

.selected-trend-info {
  margin-bottom: 20px;
  padding: 10px;
  background: #f3e5f5;
  border-radius: 6px;
  color: #6a1b9a;
}
.selected-trend-text {
  font-weight: 600;
}

/* Button */
button#jack-btn {
  width: 100%;
  padding: 15px;
  background: var(--primary-gradient);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(213, 0, 249, 0.3);
  transition: transform 0.2s, box-shadow 0.2s;
}

button#jack-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(213, 0, 249, 0.4);
}

button#jack-btn:disabled {
  background: #e0e0e0;
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}

.footer-note {
  margin-top: 15px;
  font-size: 10px;
  color: #aaa;
  text-align: center;
  line-height: 1.4;
}

/* Result Area */
.result-area {
  width: 100%;
  max-width: 500px;
  text-align: center;
  margin: auto; /* Center vertically and horizontally if space allows */
}

.empty-state {
  color: #333;
}
.empty-icon {
  font-size: 48px;
  margin-bottom: 20px;
  background: #fff;
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 20px;
  margin: 0 auto 20px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}
.empty-state h3 {
  margin: 0 0 10px 0;
  font-size: 18px;
}
.empty-state p {
  color: #888;
  font-size: 14px;
  max-width: 300px;
  margin: 0 auto;
}

.generated-content img {
  max-width: 100%;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  margin-bottom: 20px;
}

.hidden {
  display: none !important;
}

.download-btn {
  display: inline-block;
  color: #aa00ff;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
}
.download-btn:hover {
  text-decoration: underline;
}

/* Progress Container */
.progress-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  text-align: center;
  width: 100%;
}

.progress-content {
  width: 100%;
  max-width: 300px;
  margin: 0 auto; /* Ensure centering */
}

.progress-container h3 {
  margin: 20px 0;
  font-size: 18px;
  color: #333;
  font-weight: 700;
  min-height: 24px; /* Prevent jump */
  text-align: center; /* Explicit center */
}

.progress-info {
  width: 100%;
  display: flex;
  justify-content: flex-start;
  margin-top: 5px;
}

#progress-percent {
  font-size: 14px;
  color: #d500f9;
  font-weight: 700;
}

/* Spinner */
.spinner {
  width: 50px;
  height: 50px;
  border: 4px solid rgba(213, 0, 249, 0.1);
  border-left-color: #d500f9;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto;
}

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

/* Progress Bar */
.progress-bar {
  width: 100%;
  height: 6px;
  background: #eee;
  border-radius: 3px;
  overflow: hidden;
  margin-top: 10px;
}

.progress-fill {
  height: 100%;
  background: var(--primary-gradient);
  width: 0%;
  transition: width 0.5s ease-out;
  border-radius: 3px;
}

/* Responsive Design */
@media (max-width: 768px) {
  body {
    align-items: flex-start;
    height: auto;
  }
  
  .container {
    width: 100%;
    height: auto;
    min-height: 100vh;
    border-radius: 0;
  }

  /* Header */
  .brand-wrapper {
    align-items: center;
  }

  /* Layout */
  .app-layout {
    flex-direction: column;
    overflow: visible;
  }

  /* Sidebar */
  .sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--border-color);
    max-height: 200px; /* Limit height of trends on mobile */
    box-sizing: border-box;
  }

  /* Workspace */
  .workspace {
    flex-direction: column;
  }

  .config-panel {
    border-right: none;
    border-bottom: 1px solid var(--border-color);
    padding: 20px;
  }

  .result-panel {
    padding: 20px;
    min-height: 400px;
  }

  /* Progress Bar */
  .progress-container {
    padding: 20px;
  }

  /* Text Sizes */
  .config-box h2 {
    font-size: 28px;
  }
}
