/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --morning-snow: #F5F4ED;
    --amazon-mist: #ECECDC;
    --aqua-mist: #A0C9CB;
    --toxic-orange: #FF6037;
    --garnet: #733635;
    --black-kite: #351E1C;
}

body[data-color-theme="sunrise"] {
    --morning-snow: #fdf4e9;
    --amazon-mist: #f4ddc6;
    --aqua-mist: #f2b59a;
    --toxic-orange: #ff7f50;
    --garnet: #7a3b2e;
    --black-kite: #3a1f1a;
}

body[data-color-theme="lakeside"] {
    --morning-snow: #f1f6fb;
    --amazon-mist: #d8e6f2;
    --aqua-mist: #9ccce8;
    --toxic-orange: #2b8fd3;
    --garnet: #2e4d68;
    --black-kite: #14263c;
}

body[data-color-theme="evergreen"] {
    --morning-snow: #f2f6f3;
    --amazon-mist: #dce9de;
    --aqua-mist: #9ec9ac;
    --toxic-orange: #4c956c;
    --garnet: #2f4a35;
    --black-kite: #1f3425;
}

body[data-color-theme="midnight"] {
    --morning-snow: #f3f0fb;
    --amazon-mist: #dcd2f3;
    --aqua-mist: #b6a3e7;
    --toxic-orange: #6c5ce7;
    --garnet: #3a2c60;
    --black-kite: #21173b;
}


body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
    background: var(--morning-snow);
    color: var(--black-kite);
    min-height: 100vh;
    line-height: 1.6;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    position: relative;
    overflow-x: hidden;
}

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

/* Banner Placement */
.banner-placement {
    background: white;
    border: 1px solid var(--amazon-mist);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 30px;
    box-shadow: 0 1px 3px rgba(53, 30, 28, 0.05);
    transition: box-shadow 0.3s ease;
}

.banner-placement:hover {
    box-shadow: 0 8px 20px rgba(53, 30, 28, 0.08);
}

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

.banner-label {
    display: flex;
    align-items: center;
    gap: 16px;
}

.banner-label i {
    font-size: 1.6rem;
    color: var(--toxic-orange);
}

.banner-label h2 {
    margin-bottom: 4px;
    color: var(--black-kite);
    font-size: 1.4rem;
    font-weight: 600;
}

.banner-subtitle {
    margin: 0;
    color: var(--garnet);
    font-size: 0.85rem;
}

.banner-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.banner-status {
    font-size: 0.85rem;
    color: var(--garnet);
    background: var(--amazon-mist);
    padding: 6px 12px;
    border-radius: 12px;
}

.banner-container-wrapper {
    margin-top: 20px;
    border: 1px dashed rgba(160, 201, 203, 0.6);
    border-radius: 12px;
    background: rgba(160, 201, 203, 0.08);
    padding: 16px;
    min-height: 120px;
    position: relative;
    transition: background 0.2s ease;
    overflow: visible;
}

.banner-placement-container {
    width: 100%;
    min-height: 80px;
    position: relative;
    height: auto;
}

.banner-placeholder {
    color: var(--garnet);
    text-align: center;
    font-size: 0.9rem;
    line-height: 1.5;
}

.banner-placeholder strong {
    color: var(--toxic-orange);
}

.banner-placement.has-banner .banner-container-wrapper {
    border-style: solid;
    background: white;
}

.banner-placement.has-banner .banner-placeholder {
    display: none;
}

.banner-placement.loading .banner-status {
    color: var(--toxic-orange);
}

.banner-placement.error .banner-status {
    color: #dc3545;
}

.banner-placement.success .banner-status {
    color: #198754;
}

.banner-height-controls {
    margin-top: 16px;
    background: rgba(160, 201, 203, 0.12);
    border: 1px solid rgba(160, 201, 203, 0.4);
    border-radius: 12px;
    padding: 16px;
}

.banner-height-controls label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: var(--garnet);
    margin-bottom: 12px;
}

.banner-height-inputs {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

#bannerHeightRange {
    flex: 1;
    min-width: 160px;
}

#bannerHeightNumber {
    width: 110px;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid var(--amazon-mist);
    background: white;
    color: var(--black-kite);
    transition: border-color 0.2s ease;
}

#bannerHeightNumber:focus {
    outline: none;
    border-color: var(--aqua-mist);
    box-shadow: 0 0 0 3px rgba(160, 201, 203, 0.15);
}

.btn-compact {
    padding: 10px 16px;
}

.banner-height-hint {
    margin-top: 10px;
    font-size: 0.8rem;
    color: var(--garnet);
}

.banner-placement-container * {
    max-width: 100%;
}

.banner-placement-container img,
.banner-placement-container video,
.banner-placement-container iframe {
    display: block;
    width: 100%;
    height: auto;
}

.app-version-tag {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    background: rgba(160, 201, 203, 0.2);
    color: var(--garnet);
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.icon-button {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid var(--amazon-mist);
    background: white;
    color: var(--garnet);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.icon-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(53, 30, 28, 0.12);
    background: var(--morning-snow);
}

.icon-button-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    min-width: 18px;
    padding: 2px 5px;
    border-radius: 999px;
    background: var(--toxic-orange);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    text-align: center;
}

.icon-button-badge[hidden] {
    display: none;
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    padding: 0 0 30px 0;
    border-bottom: 1px solid var(--amazon-mist);
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo i {
    font-size: 2rem;
    color: var(--toxic-orange);
}

.logo h1 {
    font-size: 2rem;
    font-weight: 600;
    color: var(--black-kite);
    letter-spacing: -0.5px;
}

.settings-toggle {
    background: var(--amazon-mist);
    border: none;
    color: var(--garnet);
    padding: 12px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.settings-toggle:hover {
    background: var(--aqua-mist);
    transform: rotate(90deg);
}

.inbox-overlay {
    position: fixed;
    inset: 0;
    display: none;
    z-index: 4000;
}

.inbox-overlay.open {
    display: block;
}

.inbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(53, 30, 28, 0.35);
    backdrop-filter: blur(3px);
}

.inbox-panel {
    position: absolute;
    top: 0;
    right: 0;
    width: min(420px, 90vw);
    height: 100%;
    background: var(--morning-snow);
    box-shadow: -12px 0 30px rgba(53, 30, 28, 0.25);
    display: flex;
    flex-direction: column;
    padding: 28px 28px 24px 28px;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.inbox-overlay.open .inbox-panel {
    transform: translateX(0);
}

.inbox-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 18px;
}

.inbox-panel-header h3 {
    margin: 0;
    color: var(--black-kite);
    font-size: 1.4rem;
    font-weight: 600;
}

.inbox-subtitle {
    margin: 6px 0 0 0;
    color: var(--garnet);
    font-size: 0.85rem;
}

.inbox-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.close-inbox {
    background: none;
    border: none;
    color: var(--garnet);
    font-size: 1.2rem;
    padding: 6px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.close-inbox:hover {
    background: rgba(160, 201, 203, 0.2);
    transform: rotate(90deg);
}

.inbox-empty-state {
    margin-top: 32px;
    text-align: center;
    color: var(--garnet);
    font-size: 0.9rem;
    padding: 16px;
    border-radius: 12px;
    border: 1px dashed rgba(160, 201, 203, 0.5);
    background: rgba(160, 201, 203, 0.12);
    display: none;
}

.inbox-list {
    margin-top: 8px;
    overflow-y: auto;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-right: 4px;
}

.content-card-item {
    border: 1px solid rgba(160, 201, 203, 0.45);
    border-radius: 12px;
    padding: 16px;
    background: white;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
    position: relative;
}

.content-card-item.unread {
    border-color: var(--toxic-orange);
    box-shadow: 0 6px 18px rgba(255, 96, 55, 0.12);
}

.content-card-item.viewed {
    opacity: 0.82;
}

.content-card-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(53, 30, 28, 0.12);
}

.content-card-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.content-card-item-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--black-kite);
    margin: 0;
}

.content-card-item-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    color: var(--garnet);
}

.content-card-item-body {
    color: var(--black-kite);
    font-size: 0.9rem;
    line-height: 1.5;
    white-space: pre-line;
}

.content-card-item img {
    width: 100%;
    border-radius: 10px;
    object-fit: cover;
    max-height: 180px;
}

.content-card-item-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.content-card-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 14px;
    background: linear-gradient(45deg, var(--toxic-orange), rgba(255, 96, 55, 0.85));
    color: white;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.content-card-link:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(255, 96, 55, 0.25);
}

.content-card-item .unread-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--toxic-orange);
    flex-shrink: 0;
    margin-top: 5px;
}

.content-card-item.viewed .unread-indicator {
    display: none;
}

.content-card-item-extras {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 0.75rem;
    color: var(--garnet);
}
/* Environment Selector */
.environment-selector {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
    padding: 20px;
    background: white;
    border-radius: 16px;
    border: 1px solid var(--amazon-mist);
    box-shadow: 0 1px 3px rgba(53, 30, 28, 0.05);
}

.env-selector-group {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
}

.env-selector-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--garnet);
    font-weight: 600;
    white-space: nowrap;
}

.env-selector-group label i {
    color: var(--toxic-orange);
}

#environmentSelect {
    flex: 1;
    padding: 12px 16px;
    background: var(--morning-snow);
    border: 1px solid var(--amazon-mist);
    border-radius: 10px;
    color: var(--black-kite);
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

#environmentSelect:focus {
    outline: none;
    border-color: var(--aqua-mist);
    box-shadow: 0 0 0 3px rgba(160, 201, 203, 0.1);
}

.env-buttons {
    display: flex;
    gap: 10px;
}

.btn-env {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    background: var(--amazon-mist);
    border: none;
    border-radius: 10px;
    color: var(--garnet);
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-env:hover {
    background: var(--aqua-mist);
    transform: translateY(-1px);
}

/* Status Bar */
.status-bar {
    display: flex;
    gap: 30px;
    margin-bottom: 30px;
    padding: 20px;
    background: white;
    border-radius: 16px;
    border: 1px solid var(--amazon-mist);
    box-shadow: 0 1px 3px rgba(53, 30, 28, 0.05);
}

.status-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.status-label {
    font-size: 0.75rem;
    color: var(--garnet);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.status-value {
    font-weight: 600;
    color: var(--black-kite);
    font-size: 1.1rem;
}

/* Cards */
.card {
    background: white;
    border: 1px solid var(--amazon-mist);
    border-radius: 16px;
    margin-bottom: 25px;
    box-shadow: 0 1px 3px rgba(53, 30, 28, 0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover {
    box-shadow: 0 8px 20px rgba(53, 30, 28, 0.08);
    transform: translateY(-2px);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 24px 28px 20px;
    border-bottom: 1px solid var(--amazon-mist);
}

.card-header i {
    font-size: 1.3rem;
    color: var(--toxic-orange);
}

.card-header h2 {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--black-kite);
    letter-spacing: -0.3px;
}

.card-content {
    padding: 28px;
}

.card-description {
    color: var(--garnet);
    margin-bottom: 20px;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* SDK Info */
.sdk-info {
    background: var(--amazon-mist);
    border: 1px solid var(--aqua-mist);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 25px;
    font-size: 0.9rem;
}

.sdk-info p {
    margin: 8px 0;
    color: var(--garnet);
}

.sdk-info span {
    color: var(--black-kite);
    font-family: 'SF Mono', 'Monaco', 'Courier New', monospace;
    font-weight: 600;
}

/* Input Groups */
.input-group {
    position: relative;
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--garnet);
    font-size: 0.9rem;
}

.input-group input,
.input-group select,
.input-group textarea {
    width: 100%;
    padding: 14px 16px;
    background: var(--morning-snow);
    border: 1px solid var(--amazon-mist);
    border-radius: 10px;
    color: var(--black-kite);
    font-size: 0.95rem;
    transition: all 0.2s ease;
    font-family: inherit;
}

.input-group input:focus,
.input-group select:focus,
.input-group textarea:focus {
    outline: none;
    border-color: var(--aqua-mist);
    box-shadow: 0 0 0 3px rgba(160, 201, 203, 0.1);
    background: white;
}

.input-group input::placeholder,
.input-group textarea::placeholder {
    color: var(--garnet);
    opacity: 0.5;
}

.input-group textarea {
    min-height: 80px;
    resize: vertical;
    font-family: 'SF Mono', 'Monaco', 'Courier New', monospace;
}

.toggle-visibility {
    position: absolute;
    right: 12px;
    top: 38px;
    background: none;
    border: none;
    color: var(--toxic-orange);
    cursor: pointer;
    font-size: 1rem;
    padding: 5px;
    transition: all 0.2s ease;
}

.toggle-visibility:hover {
    color: var(--garnet);
}

/* Buttons */
.btn-primary,
.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 24px;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    font-family: inherit;
}

.btn-primary {
    background: var(--toxic-orange);
    color: white;
    box-shadow: 0 4px 12px rgba(255, 96, 55, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255, 96, 55, 0.4);
}

.btn-secondary {
    background: var(--amazon-mist);
    color: var(--garnet);
    border: 1px solid var(--amazon-mist);
}

.btn-secondary:hover {
    background: var(--aqua-mist);
    border-color: var(--aqua-mist);
    transform: translateY(-1px);
}

.button-group {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* Tabs */
.tabs {
    display: flex;
    margin-bottom: 25px;
    background: var(--amazon-mist);
    border-radius: 12px;
    padding: 4px;
}

.tab-btn {
    flex: 1;
    padding: 12px 16px;
    background: none;
    border: none;
    color: var(--garnet);
    font-weight: 500;
    cursor: pointer;
    border-radius: 10px;
    transition: all 0.2s ease;
    font-family: inherit;
}

.tab-btn.active {
    background: white;
    color: var(--toxic-orange);
    box-shadow: 0 2px 4px rgba(53, 30, 28, 0.1);
}

.tab-btn:hover:not(.active) {
    background: rgba(255, 255, 255, 0.5);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Session Controls */
.session-controls {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* Content Wrapper with Sidebar */
.content-wrapper {
    display: flex;
    gap: 25px;
    align-items: flex-start;
}

.main-content {
    flex: 1;
    min-width: 0;
}

/* Right Sidebar */
.right-sidebar {
    width: 400px;
    background: white;
    border: 1px solid var(--amazon-mist);
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(53, 30, 28, 0.05);
    position: sticky;
    top: 20px;
    max-height: calc(100vh - 40px);
    display: flex;
    flex-direction: column;
}

.sidebar-tabs {
    display: flex;
    background: var(--morning-snow);
    border-radius: 16px 16px 0 0;
    border-bottom: 1px solid var(--amazon-mist);
}

.sidebar-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px;
    background: none;
    border: none;
    color: var(--garnet);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 3px solid transparent;
    font-family: inherit;
}

.sidebar-tab:first-child {
    border-radius: 16px 0 0 0;
}

.sidebar-tab:last-child {
    border-radius: 0 16px 0 0;
}

.sidebar-tab.active {
    color: var(--toxic-orange);
    border-bottom-color: var(--toxic-orange);
    background: white;
}

.sidebar-tab:hover:not(.active) {
    background: var(--amazon-mist);
}

.sidebar-tab-content {
    display: none;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

.sidebar-tab-content.active {
    display: flex;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--amazon-mist);
}

.sidebar-header h3 {
    color: var(--black-kite);
    font-weight: 600;
    font-size: 1rem;
}

.sidebar-content {
    flex: 1;
    overflow-y: auto;
    padding: 16px 20px;
    font-size: 0.85rem;
}

/* Log Entries */
.log-entry {
    display: flex;
    margin-bottom: 12px;
    padding: 12px;
    border-radius: 10px;
    font-size: 0.85rem;
    line-height: 1.4;
    border-left: 3px solid;
}

.log-entry.info {
    background: rgba(160, 201, 203, 0.1);
    border-left-color: var(--aqua-mist);
}

.log-entry.success {
    background: rgba(160, 201, 203, 0.15);
    border-left-color: var(--aqua-mist);
}

.log-entry.warning {
    background: rgba(255, 96, 55, 0.08);
    border-left-color: var(--toxic-orange);
}

.log-entry.error {
    background: rgba(115, 54, 53, 0.1);
    border-left-color: var(--garnet);
}

.timestamp {
    color: var(--toxic-orange);
    font-weight: 600;
    margin-right: 10px;
    min-width: 80px;
    font-family: 'SF Mono', 'Monaco', monospace;
}

.message {
    color: var(--black-kite);
}

/* Debug Console */
#debugContent .debug-entry {
    font-size: 0.75rem;
    padding: 8px 10px;
    margin-bottom: 6px;
    border-radius: 8px;
    font-family: 'SF Mono', 'Monaco', monospace;
    border-left: 3px solid;
}

#debugContent .debug-entry.debug-info {
    background: rgba(160, 201, 203, 0.08);
    color: var(--black-kite);
    border-left-color: var(--aqua-mist);
}

#debugContent .debug-entry.debug-success {
    background: rgba(160, 201, 203, 0.12);
    color: var(--black-kite);
    border-left-color: var(--aqua-mist);
}

#debugContent .debug-entry.debug-warning {
    background: rgba(255, 96, 55, 0.08);
    color: var(--black-kite);
    border-left-color: var(--toxic-orange);
}

#debugContent .debug-entry.debug-error {
    background: rgba(115, 54, 53, 0.1);
    color: var(--garnet);
    border-left-color: var(--garnet);
}

#debugContent .debug-entry.debug-api {
    background: rgba(115, 54, 53, 0.05);
    color: var(--black-kite);
    border-left-color: var(--garnet);
}

.debug-time {
    color: var(--garnet);
    opacity: 0.6;
    margin-right: 8px;
    min-width: 75px;
    font-size: 0.7rem;
}

.debug-type {
    font-weight: 700;
    margin-right: 8px;
    min-width: 65px;
    color: var(--toxic-orange);
}

.debug-message {
    flex: 1;
    white-space: pre-wrap;
    color: var(--black-kite);
}

/* Debug Controls */
.debug-controls {
    display: flex;
    gap: 6px;
}

.debug-btn {
    background: var(--amazon-mist);
    border: none;
    color: var(--garnet);
    padding: 6px 10px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.2s ease;
}

.debug-btn:hover {
    background: var(--aqua-mist);
}

/* Clear Log Button */
.clear-log {
    background: rgba(115, 54, 53, 0.1);
    border: none;
    color: var(--garnet);
    padding: 6px 10px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s ease;
    font-family: inherit;
}

.clear-log:hover {
    background: rgba(115, 54, 53, 0.15);
}

/* Settings Panel */
.settings-panel {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100vh;
    background: var(--morning-snow);
    border-left: 1px solid var(--amazon-mist);
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    overflow-y: auto;
    box-shadow: -4px 0 20px rgba(53, 30, 28, 0.1);
}

.settings-panel.open {
    right: 0;
}

.settings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px;
    border-bottom: 1px solid var(--amazon-mist);
    background: white;
}

.settings-header h3 {
    color: var(--black-kite);
    font-weight: 600;
}

.close-settings {
    background: none;
    border: none;
    color: var(--garnet);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 5px;
    transition: all 0.2s ease;
}

.close-settings:hover {
    color: var(--toxic-orange);
}

.settings-content {
    padding: 25px;
}

.settings-divider {
    margin: 24px 0;
    height: 1px;
    background: var(--amazon-mist);
    opacity: 0.75;
}

.settings-section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--black-kite);
    margin: 0 0 12px 0;
}

.settings-section-title i {
    color: var(--toxic-orange);
}

.settings-hint {
    font-size: 0.8rem;
    color: var(--garnet);
    margin-top: 6px;
}

.setting-item {
    margin-bottom: 25px;
}

.setting-item label {
    display: block;
    color: var(--garnet);
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.toggle-label {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--garnet);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    margin-bottom: 8px;
}

.toggle-label input[type="checkbox"] {
    margin: 0;
    accent-color: var(--toxic-orange);
}

.setting-item input[type="checkbox"] {
    margin-right: 10px;
    accent-color: var(--toxic-orange);
}

.setting-item input[type="number"] {
    width: 100%;
    padding: 12px;
    background: white;
    border: 1px solid var(--amazon-mist);
    border-radius: 10px;
    color: var(--black-kite);
    font-family: inherit;
}

.setting-item input[type="number"]:focus {
    outline: none;
    border-color: var(--aqua-mist);
    box-shadow: 0 0 0 3px rgba(160, 201, 203, 0.1);
}

/* Content Cards */
.content-cards-wrapper {
    margin-top: 20px;
    background: var(--amazon-mist);
    border: 1px solid var(--aqua-mist);
    border-radius: 12px;
    overflow: hidden;
}

.content-cards-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: white;
    border-bottom: 1px solid var(--amazon-mist);
}

.content-cards-header h3 {
    color: var(--black-kite);
    font-weight: 600;
    font-size: 1rem;
    margin: 0;
}

.close-cards {
    background: rgba(115, 54, 53, 0.1);
    border: none;
    color: var(--garnet);
    padding: 6px 10px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.close-cards:hover {
    background: rgba(115, 54, 53, 0.15);
}

#content-cards-feed {
    max-height: 500px;
    overflow-y: auto;
    padding: 12px;
    background: var(--morning-snow);
}

/* Override Braze Content Card styles */
#content-cards-feed .ab-feed {
    background: transparent !important;
    border: none !important;
}

#content-cards-feed .ab-card {
    background: white !important;
    border: 1px solid var(--amazon-mist) !important;
    border-radius: 12px !important;
    margin-bottom: 12px !important;
    box-shadow: 0 1px 3px rgba(53, 30, 28, 0.05) !important;
}

#content-cards-feed .ab-card .ab-title {
    color: var(--black-kite) !important;
}

#content-cards-feed .ab-card .ab-description {
    color: var(--garnet) !important;
}

#content-cards-feed .ab-card .ab-url-area {
    color: var(--toxic-orange) !important;
}

/* Push Status */
.push-status {
    margin-bottom: 20px;
    padding: 16px;
    background: var(--amazon-mist);
    border-radius: 12px;
    border: 1px solid var(--aqua-mist);
}

.push-status p {
    color: var(--black-kite);
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(245, 244, 237, 0.95);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    backdrop-filter: blur(10px);
}

.loading-overlay.show {
    display: flex;
}

.loading-spinner {
    text-align: center;
    color: var(--black-kite);
}

.loading-spinner i {
    font-size: 3rem;
    color: var(--toxic-orange);
    margin-bottom: 20px;
}

.loading-spinner p {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--garnet);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--amazon-mist);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb {
    background: var(--aqua-mist);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--garnet);
}

/* Minimal Mode (Blueprint) ------------------------------------------------ */
body.minimal-theme {
    --technical-ink: #304ffe;
    --technical-ink-soft: rgba(48, 79, 254, 0.45);
    --technical-ink-faint: rgba(48, 79, 254, 0.18);
    --morning-snow: #ffffff;
    --amazon-mist: rgba(48, 79, 254, 0.18);
    --aqua-mist: rgba(48, 79, 254, 0.32);
    --toxic-orange: #304ffe;
    --garnet: rgba(24, 35, 110, 0.85);
    --black-kite: #0f1c5a;
    background: var(--morning-snow);
    color: var(--technical-ink);
    font-family: 'Cormorant Garamond', serif;
}

body.minimal-theme ::selection {
    background: var(--technical-ink);
    color: #ffffff;
}

body.minimal-theme .container {
    max-width: 1200px;
    padding: 60px 40px 100px;
    margin: 0 auto;
    border: 1px solid var(--technical-ink-soft);
    box-shadow: 20px 20px 0 rgba(48, 79, 254, 0.12);
    background:
        repeating-linear-gradient(0deg, rgba(48, 79, 254, 0.05) 0, rgba(48, 79, 254, 0.05) 1px, transparent 1px, transparent 28px),
        repeating-linear-gradient(90deg, rgba(48, 79, 254, 0.04) 0, rgba(48, 79, 254, 0.04) 1px, transparent 1px, transparent 28px),
        #ffffff;
    position: relative;
}

body.minimal-theme .container::after {
    content: '+';
    position: absolute;
    top: 28px;
    right: 28px;
    font-family: 'Space Mono', monospace;
    font-size: 0.8rem;
    color: var(--technical-ink-soft);
}

body.minimal-theme [data-figure-label] {
    position: relative;
}

body.minimal-theme [data-figure-label]::before {
    content: attr(data-figure-label);
    position: absolute;
    top: -32px;
    left: 0;
    font-family: 'Space Mono', monospace;
    font-size: 0.7rem;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--technical-ink-soft);
}

body.technical-zine-theme .header {
    padding-bottom: 32px;
    border-bottom: 1px dotted var(--technical-ink-soft);
}

body.minimal-theme .logo {
    gap: 12px;
    align-items: flex-end;
}

body.minimal-theme #appTitle {
    font-family: 'Space Mono', monospace;
    text-transform: uppercase;
    letter-spacing: -0.06em;
    transform: scaleY(1.14);
    margin: 0;
}

body.minimal-theme .header-actions button,
body.minimal-theme .header-actions span {
    font-family: 'Space Mono', monospace;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.8rem;
}

body.minimal-theme .banner-placement,
body.minimal-theme .environment-selector,
body.minimal-theme .card,
body.minimal-theme .status-bar,
body.minimal-theme .right-sidebar,
body.minimal-theme .settings-panel,
body.minimal-theme .inbox-panel,
body.minimal-theme .content-cards-wrapper {
    background: transparent;
    border: 1px solid var(--technical-ink-soft);
    box-shadow: 6px 6px 0 rgba(48, 79, 254, 0.18);
    border-radius: 6px;
}

body.minimal-theme .banner-placement-header,
body.minimal-theme .card-header,
body.minimal-theme .settings-header,
body.minimal-theme .inbox-panel-header {
    border-bottom: 1px dotted var(--technical-ink-soft);
    padding-bottom: 20px;
    margin-bottom: 24px;
}

body.minimal-theme .banner-placement-header h2,
body.minimal-theme .card-header h2,
body.minimal-theme .settings-header h3,
body.minimal-theme .inbox-panel-header h3 {
    font-family: 'Space Mono', monospace;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 1rem;
}

body.minimal-theme .banner-subtitle,
body.minimal-theme .card-description,
body.minimal-theme .settings-hint,
body.minimal-theme .inbox-subtitle,
body.minimal-theme p,
body.minimal-theme li {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.05rem;
    letter-spacing: 0.01em;
}

body.minimal-theme .card-description {
    font-style: italic;
}

body.minimal-theme label,
body.minimal-theme .status-label,
body.minimal-theme .status-value,
body.minimal-theme .btn-secondary,
body.minimal-theme .btn-env,
body.minimal-theme .icon-button,
body.minimal-theme .settings-toggle,
body.minimal-theme .tab-btn,
body.minimal-theme .debug-btn,
body.minimal-theme .clear-log,
body.minimal-theme .banner-status,
body.minimal-theme .app-version-tag,
body.minimal-theme .inbox-empty-state,
body.minimal-theme .unread-indicator,
body.minimal-theme .environment-selector label {
    font-family: 'Space Mono', monospace;
    text-transform: uppercase;
    letter-spacing: 0.16em;
}

body.minimal-theme input,
body.minimal-theme select,
body.minimal-theme textarea {
    font-family: 'Space Mono', monospace;
    letter-spacing: 0.08em;
    background: #f8f9ff;
    border: 1px solid var(--technical-ink-soft);
    border-radius: 0;
    color: var(--technical-ink);
}

body.minimal-theme input:focus,
body.minimal-theme select:focus,
body.minimal-theme textarea:focus {
    outline: none;
    border-color: var(--technical-ink);
    box-shadow: 4px 4px 0 rgba(48, 79, 254, 0.35);
}

body.minimal-theme .btn-secondary,
body.minimal-theme .icon-button,
body.minimal-theme .settings-toggle,
body.minimal-theme .btn-env,
body.minimal-theme .tab-btn,
body.minimal-theme .debug-btn,
body.minimal-theme .clear-log {
    background: transparent;
    border-radius: 0;
    border: 1px solid var(--technical-ink-soft);
    color: var(--technical-ink);
    transition: background 0.15s ease, color 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
}

body.minimal-theme .btn-secondary:hover,
body.minimal-theme .icon-button:hover,
body.minimal-theme .settings-toggle:hover,
body.minimal-theme .btn-env:hover,
body.minimal-theme .tab-btn:hover,
body.minimal-theme .debug-btn:hover,
body.minimal-theme .clear-log:hover {
    background: var(--technical-ink);
    color: #ffffff;
    box-shadow: 4px 4px 0 rgba(48, 79, 254, 0.35);
}

body.minimal-theme .btn-secondary:active,
body.minimal-theme .icon-button:active,
body.minimal-theme .settings-toggle:active,
body.minimal-theme .btn-env:active,
body.minimal-theme .tab-btn:active,
body.minimal-theme .debug-btn:active,
body.minimal-theme .clear-log:active {
    transform: translateY(2px);
    box-shadow: none;
}

body.minimal-theme .settings-divider {
    border-top: 1px dotted var(--technical-ink-soft);
    margin: 34px 0;
    position: relative;
}

body.minimal-theme .settings-divider::after {
    content: '+';
    position: absolute;
    top: -11px;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'Space Mono', monospace;
    font-size: 0.8rem;
    color: var(--technical-ink-soft);
    background: var(--morning-snow);
    padding: 0 6px;
}

body.minimal-theme .banner-height-controls {
    border-top: 1px dotted var(--technical-ink-soft);
}

body.minimal-theme .status-chip {
    border-radius: 0;
    border: 1px solid var(--technical-ink);
    background: transparent;
    color: var(--technical-ink);
}

body.minimal-theme .status-chip.success {
    background: rgba(48, 79, 254, 0.12);
}

body.minimal-theme .content-card-item {
    border: 1px solid var(--technical-ink-soft);
    background: rgba(48, 79, 254, 0.04);
}

body.minimal-theme .content-card-item.unread {
    box-shadow: 6px 6px 0 rgba(48, 79, 254, 0.28);
}

body.minimal-theme code,
body.minimal-theme pre {
    font-family: 'Space Mono', monospace;
    background: rgba(48, 79, 254, 0.08);
    border: 1px solid var(--technical-ink-soft);
    border-radius: 0;
}

body.minimal-theme .settings-panel {
    max-width: 540px;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .content-wrapper {
        flex-direction: column;
    }
    
    body.minimal-theme .container {
        max-width: 100%;
        padding: 50px 32px 90px;
        box-shadow: 16px 16px 0 rgba(48, 79, 254, 0.12);
    }
    
    .right-sidebar {
        width: 100%;
        position: relative;
        top: 0;
        max-height: 500px;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 20px 15px;
    }
    
    body.minimal-theme .container {
        padding: 32px 18px 72px;
        box-shadow: 10px 10px 0 rgba(48, 79, 254, 0.12);
    }
    
    .inbox-panel {
        width: 100%;
        padding: 24px;
    }
    
    .inbox-header-actions {
        flex-wrap: wrap;
        justify-content: flex-end;
    }

    .icon-button {
        width: 38px;
        height: 38px;
    }
    
    .header {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .logo h1 {
        font-size: 1.5rem;
    }
    
    .environment-selector {
        flex-direction: column;
        align-items: stretch;
    }
    
    .env-selector-group {
        flex-direction: column;
        align-items: stretch;
    }
    
    .env-buttons {
        justify-content: stretch;
    }
    
    .btn-env {
        flex: 1;
    }
    
    .status-bar {
        flex-direction: column;
        gap: 15px;
    }
    
    .sdk-info {
        font-size: 0.8rem;
    }
    
    .sdk-info span {
        display: block;
        margin-top: 5px;
    }
    
    .button-group {
        flex-direction: column;
    }
    
    .session-controls {
        flex-direction: column;
    }
    
    .tabs {
        flex-direction: column;
    }
    
    .tab-btn {
        border-radius: 10px;
        margin-bottom: 2px;
    }
    
    .settings-panel {
        width: 100%;
        right: -100%;
    }
    
    .right-sidebar {
        max-height: 400px;
    }
}

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

.card {
    animation: fadeIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:nth-child(2) { animation-delay: 0.05s; }
.card:nth-child(3) { animation-delay: 0.1s; }
.card:nth-child(4) { animation-delay: 0.15s; }
.card:nth-child(5) { animation-delay: 0.2s; }
