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

html, body {
    width: 100%;
    min-height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
    transition: background-color 0.2s ease-in-out;
    overflow-x: hidden;
}

body.default-mode {
    background: linear-gradient(135deg, #1a0b2e 0%, #090312 100%);
    background-attachment: fixed;
}

body.ad-mode {
    background-color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
    margin: 0;
    overflow: hidden;
}

#app {
    width: 100%;
    min-height: 100vh;
}

.content-container {
    display: flex;
    flex-direction: column;
    width: 100%;
    min-height: 100vh;
    align-items: center;
    justify-content: flex-start;
    padding: 20px 10px;
}

.side-frame {
    width: 160px;
    height: 600px;
    max-height: 80vh;
    border: none;
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    background: #111;
    border-radius: 4px;
}

.side-frame.left { left: 10px; }
.side-frame.right { right: 10px; }
.side-frame.bottom {
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    transform: none;
    width: 100%;
    max-width: 600px;
    height: 150px;
    margin: 0 20px 50px 20px;
    display: block;
}

.main-area {
    position: relative;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    color: white;
    height: auto;
    width: 100%;
    max-width: 600px;
    padding: 30px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    margin: 0 20px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    margin-bottom: 50px;
}

.main-title {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    font-weight: 800;
    background: linear-gradient(to right, #fff, #a855f7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.main-subtext {
    font-size: 1rem;
    opacity: 0.7;
    margin-bottom: 2rem;
}

.reloaded-title {
    font-size: 1.4rem;
    font-weight: 900;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
    background: linear-gradient(to right, #ef4444, #f97316, #eab308, #22c55e, #3b82f6, #a855f7, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.secondary-btn {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: 0.2s;
}

.secondary-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.ad-form {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 15px;
    background: rgba(0,0,0,0.2);
    padding: 20px;
    border-radius: 12px;
}

.preview-container {
    width: 100%;
    height: 120px;
    border: 2px dashed rgba(255,255,255,0.1);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-top: 5px;
    background: rgba(0,0,0,0.1);
}

.preview-container img, .preview-container video {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 600;
    opacity: 0.9;
}

.form-group input:not([type="range"]):not([type="file"]) {
    padding: 12px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.05);
    color: white;
    font-size: 1rem;
}

/* Custom File Input Styles */
.custom-file-input-wrapper {
    position: relative;
    width: 100%;
    margin-bottom: 5px;
}

.custom-file-input-wrapper input[type="file"] {
    position: absolute;
    left: 0;
    top: 0;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    z-index: 2;
}

.file-input-trigger {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px dashed rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    color: #fff;
    font-size: 0.95rem;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.custom-file-input-wrapper:hover .file-input-trigger {
    background: rgba(168, 85, 247, 0.08);
    border-color: rgba(168, 85, 247, 0.4);
    box-shadow: 0 0 15px rgba(168, 85, 247, 0.1);
}

.file-input-trigger .material-symbols-outlined {
    color: #a855f7;
    font-size: 24px;
}

#file-label-text, #update-file-label-text {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    opacity: 0.8;
}

.slider-container {
    width: 100%;
    padding: 10px 0;
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    opacity: 0.7;
    margin-top: 8px;
}

#coverage-val {
    color: #a855f7;
    font-weight: bold;
    font-size: 0.9rem;
    opacity: 1;
}

input[type="range"] {
    -webkit-appearance: none;
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    outline: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    background: #a855f7;
    cursor: pointer;
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(168, 85, 247, 0.5);
}

.credit-info {
    font-weight: bold;
    color: #a855f7;
    margin-top: 5px;
    font-size: 1.1rem;
}

.publish-btn {
    background: #a855f7;
    color: white;
    border: none;
    padding: 15px;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.2s;
    margin-top: 10px;
}

.publish-btn:hover { background: #9333ea; }
.publish-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.benefits-section {
    width: 100%;
    margin-top: 30px;
    padding: 20px;
    background: rgba(168, 85, 247, 0.08);
    border: 1px solid rgba(168, 85, 247, 0.2);
    border-radius: 12px;
}

.benefits-section h3 {
    margin-bottom: 12px;
    font-size: 1.1rem;
    color: #a855f7;
}

.benefits-section ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.benefits-section li {
    font-size: 0.85rem;
    line-height: 1.4;
    opacity: 0.9;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.benefits-section li::before {
    content: "✦";
    color: #a855f7;
    font-weight: bold;
}

.qa-section {
    width: 100%;
    margin-top: 25px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
}

.qa-item {
    margin-bottom: 20px;
}

.qa-item:last-child {
    margin-bottom: 0;
}

.qa-question {
    font-weight: bold;
    color: #fff;
    margin-bottom: 5px;
    font-size: 0.95rem;
}

.qa-answer {
    font-size: 0.85rem;
    opacity: 0.8;
    line-height: 1.5;
}

.distraction-feature {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.distraction-feature .comparison-grid {
    flex-basis: 100%;
}

.comparison-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 15px;
    width: 100%;
}

.comparison-card {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.comparison-label {
    font-size: 0.65rem;
    font-weight: 900;
    text-transform: uppercase;
    color: #ef4444;
    letter-spacing: 1px;
}

.comparison-label.us {
    color: #a855f7;
}

.comparison-image-container {
    position: relative;
    width: 100%;
    aspect-ratio: 16/10;
    overflow: hidden;
    border-radius: 6px;
    background: #000;
}

.comparison-image-container img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.comparison-text {
    font-size: 0.7rem !important;
    line-height: 1.4 !important;
    opacity: 0.8;
    font-style: italic;
    color: #eee;
    margin: 0 !important;
}

@media (max-width: 500px) {
    .comparison-grid {
        grid-template-columns: 1fr;
    }
}

.campaigns-list, .partner-sites-section {
    width: 100%;
    margin-top: 30px;
}

.campaign-item {
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(255,255,255,0.03);
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 10px;
    border: 1px solid rgba(255,255,255,0.05);
    position: relative;
    width: 100%;
}

.clickable-campaign {
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}
.clickable-campaign:hover {
    border-color: rgba(168, 85, 247, 0.5);
    background: rgba(168, 85, 247, 0.08);
}

.gear-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    z-index: 5;
    flex-shrink: 0;
}

.gear-btn:hover {
    background: rgba(168, 85, 247, 0.3);
    border-color: #a855f7;
}

.gear-btn svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.gear-btn:hover svg {
    transform: rotate(90deg);
}

.manage-btn-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    margin-top: 20px;
}

.home-actions-row {
    display: flex;
    gap: 10px;
    width: 100%;
    margin-bottom: 0;
}

.home-actions-row + .home-actions-row {
    margin-top: 10px;
}

.home-analytics-row + .benefits-section {
    margin-top: 25px;
}

.home-actions-row .secondary-btn {
    flex: 1;
    padding: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.recent-clicks-button {
    width: 100%;
    margin-bottom: 25px;
    padding: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.recent-clicks-list {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.recent-click-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    padding: 14px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.recent-click-main {
    min-width: 0;
}

.recent-click-label {
    color: #a855f7;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 4px;
}

.recent-click-target {
    color: #fff;
    font-size: 0.9rem;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.recent-click-source {
    margin-top: 5px;
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.72rem;
    overflow-wrap: anywhere;
}

.recent-click-source span {
    color: #60a5fa;
}

.recent-click-time {
    flex-shrink: 0;
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.68rem;
    white-space: nowrap;
}

.recent-clicks-empty {
    padding: 20px;
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.82rem;
}

.danger-btn {
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.3);
    padding: 12px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
}

.danger-btn:hover {
    background: rgba(239, 68, 68, 0.3);
    border-color: #ef4444;
}

.campaign-thumb {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
}

.campaign-info { flex: 1; overflow: hidden; }
.campaign-info h4 { font-size: 0.9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.campaign-info p { font-size: 0.8rem; opacity: 0.6; }

/* Analytics UI */
.analytics-card {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 20px;
    width: 100%;
}

.stat-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 25px;
    background: linear-gradient(145deg, rgba(168, 85, 247, 0.15), rgba(0, 0, 0, 0.3));
    border-radius: 16px;
    border: 1px solid rgba(168, 85, 247, 0.3);
    margin: 20px 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    width: 100%;
}

.stat-hero-icon {
    font-size: 64px !important;
    color: #a855f7;
    margin-bottom: 10px;
    filter: drop-shadow(0 0 10px rgba(168, 85, 247, 0.5));
}

.stat-hero-value {
    font-size: 3rem;
    font-weight: 800;
    color: white;
    line-height: 1;
}

.stat-hero-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    opacity: 0.6;
    margin-top: 5px;
}



.user-volume-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.user-vol-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px;
    background: rgba(255,255,255,0.03);
    border-radius: 8px;
    font-size: 0.85rem;
}

/* Dynamic screen Ad display using flex to prevent overlap */
.ad-display-container {
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 10px;
    gap: 8px;
    text-decoration: none;
    box-sizing: border-box;
    overflow: hidden;
    transition: opacity 0.8s ease-in-out;
}

.ad-media {
    flex: 1;
    min-height: 0; /* Important for shrinking inside flex */
    max-width: 100%;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.6);
}

.user-input-class {
    flex: 0 0 auto;
    font-size: 7px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.8;
    font-weight: 800;
    color: #bbb;
    pointer-events: none;
    background: rgba(15, 5, 5, 0.95);
    padding: 2px 8px;
    border-radius: 3px;
    white-space: nowrap;
    border: 1px solid rgba(255, 0, 0, 0.1);
}

.ad-info-button {
    flex: 0 0 auto;
    width: 14px;
    height: 14px;
    line-height: 1;
    font-size: 9px;
    font-weight: 800;
    color: #bbb;
    background: rgba(15, 5, 5, 0.95);
    border: 1px solid rgba(255, 0, 0, 0.1);
    border-radius: 3px;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
    opacity: 0.8;
    box-sizing: border-box;
    transition: opacity 0.15s ease, color 0.15s ease;
}

.ad-info-button:hover {
    opacity: 1;
    color: #a855f7;
}

.ad-project-link {
    flex: 0 0 auto;
    font-size: 7px;
    color: white;
    opacity: 0.5;
    background: rgba(0, 0, 0, 0.4);
    padding: 3px 10px;
    border-radius: 4px;
    pointer-events: none;
    max-width: 90%;
    border: 1px solid rgba(255,255,255,0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    line-height: 1.1;
}

.ad-project-link span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    display: block;
}

.ad-display-container.horizontal {
    flex-direction: row;
    gap: 12px;
}

.loading-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.8);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.ad-loader-wrapper {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 5;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 900px) {
    .side-frame.left, .side-frame.right { display: none; }
    .main-area { 
        margin-left: 10px;
        margin-right: 10px;
        margin-bottom: 50px;
    }
}

/* Advertisement Information View */
.info-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.info-card {
    background: #0f0718;
    border: 1px solid rgba(168, 85, 247, 0.35);
    border-radius: 18px;
    padding: 32px 28px;
    max-width: 460px;
    width: 100%;
    text-align: center;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.5);
    box-sizing: border-box;
}

.info-title {
    font-size: 1.6rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.5px;
    margin: 0 0 4px;
}

.info-tabs {
    display: flex;
    gap: 6px;
    margin: 20px 0 24px;
    padding: 4px;
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid rgba(168, 85, 247, 0.2);
    border-radius: 10px;
}

.info-tab {
    flex: 1;
    border: 0;
    border-radius: 7px;
    padding: 10px 8px;
    background: transparent;
    color: #9ca3af;
    font: inherit;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.info-tab:hover {
    color: #fff;
}

.info-tab.is-active {
    color: #fff;
    background: rgba(168, 85, 247, 0.28);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}

.info-panel[hidden] {
    display: none;
}

.info-panel-title {
    margin: 0 0 16px;
    color: #d8b4fe;
    font-size: 1.05rem;
    font-weight: 800;
}

.info-copy {
    margin: 0 0 14px;
    color: #d1d5db;
    font-size: 0.9rem;
    line-height: 1.6;
    text-align: left;
}

.info-copy:last-child {
    margin-bottom: 0;
}

.info-copy-emphasis {
    color: #d8b4fe;
    font-weight: 700;
}

.info-sub {
    font-size: 0.8rem;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    color: #a855f7;
    opacity: 0.85;
    word-break: break-all;
}

.info-divider {
    height: 1px;
    background: rgba(168, 85, 247, 0.25);
    margin: 20px 0 16px;
}

.info-row {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 12px;
    text-align: left;
}

.info-label {
    flex: 0 0 90px;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #9ca3af;
    font-weight: 700;
}

.info-value {
    flex: 1 1 auto;
    font-size: 0.85rem;
    color: #fff;
    word-break: break-word;
}

.info-media {
    margin: 18px 0;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    overflow: hidden;
    background: #000;
    min-height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.info-media-wrapper {
    position: relative;
    width: 100%;
}

.info-volume-indicator {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 4px;
    padding: 2px;
    align-items: center;
    pointer-events: none;
    z-index: 10;
}

.info-media img.info-media-image,
.info-media video.info-media-video {
    width: 100%;
    max-height: 320px;
    object-fit: contain;
    display: block;
}

.info-media-empty {
    color: #6b7280;
    font-size: 0.8rem;
    padding: 40px;
}

.info-actions {
    display: flex;
    gap: 10px;
    margin-top: 4px;
}

.info-actions button {
    flex: 1;
}

.info-close-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 6px;
}

.info-home-btn {
    width: 100%;
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 800;
}

.info-btn-icon {
    font-size: 20px !important;
    line-height: 1;
}

/* Rankings and Admin Styles */
.ranking-summary {
    width: 100%;
    margin: 25px 0 0;
    padding: 22px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    border: 1px solid rgba(168, 85, 247, 0.32);
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.11), rgba(255, 255, 255, 0.025));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.ranking-summary-copy {
    min-width: 0;
}

.ranking-summary-kicker {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 7px;
    color: #d8b4fe;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.ranking-summary-kicker .material-symbols-outlined {
    font-size: 18px;
}

.ranking-summary h3 {
    margin-bottom: 6px;
    color: #fff;
    font-size: 0.98rem;
}

.ranking-summary p {
    max-width: 460px;
    color: rgba(255, 255, 255, 0.58);
    font-size: 0.75rem;
    line-height: 1.45;
}

.ranking-total {
    flex: 0 0 auto;
    min-width: 92px;
    padding: 12px 16px;
    border: 1px solid rgba(168, 85, 247, 0.28);
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.2);
    color: #d8b4fe;
    font-size: 2.1rem;
    font-weight: 800;
    line-height: 1;
    text-align: center;
    text-shadow: 0 0 18px rgba(168, 85, 247, 0.45);
}

.ranking-section {
    width: 100%;
    margin: 15px 0 0;
    padding: 18px 20px;
}

.ranking-heading {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 14px;
    padding-bottom: 9px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.95rem;
    font-weight: 700;
}

.ranking-heading .material-symbols-outlined {
    font-size: 19px;
}

.partner-ranking-heading {
    color: #60a5fa;
}

.campaign-ranking-heading {
    color: #fbbf24;
}

.ranking-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ranking-row {
    display: flex;
    align-items: center;
    gap: 11px;
    min-width: 0;
    padding: 10px 12px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.035);
}

.ranking-rank {
    flex: 0 0 26px;
    color: rgba(255, 255, 255, 0.45);
    font-size: 0.75rem;
    font-weight: 800;
    text-align: center;
}

.ranking-name {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.ranking-name > span {
    overflow: hidden;
    color: #fff;
    font-size: 0.82rem;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ranking-name small {
    overflow: hidden;
    color: rgba(255, 255, 255, 0.45);
    font-size: 0.68rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ranking-count {
    flex: 0 0 auto;
    color: #d8b4fe;
    font-size: 0.78rem;
    white-space: nowrap;
}

.ranking-empty {
    padding: 8px 0 2px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.78rem;
    text-align: center;
}

.admin-trigger-btn {
    position: fixed;
    top: 15px;
    right: 15px;
    background: #ef4444;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex !important;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    transition: background 0.2s;
    z-index: 10000;
}

.admin-trigger-btn:hover {
    background: #dc2626;
}

.admin-trigger-btn span {
    font-size: 20px;
}

.admin-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    width: 100%;
    margin-bottom: 20px;
}

.admin-tab {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 0;
    padding: 10px 8px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.7);
    font: inherit;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.admin-tab .material-symbols-outlined {
    font-size: 18px;
}

.admin-tab:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.admin-tab.is-active {
    border-color: rgba(239, 68, 68, 0.65);
    background: rgba(239, 68, 68, 0.18);
    color: #fecaca;
}

.notification-control {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin: 18px 0 0;
    padding: 13px 14px;
    border: 1px solid rgba(96, 165, 250, 0.3);
    border-radius: 12px;
    background: rgba(59, 130, 246, 0.08);
}

.notification-control > div {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 3px;
}

.notification-control strong { font-size: 0.84rem; }

.notification-control span:not(.material-symbols-outlined) {
    font-size: 0.7rem;
    line-height: 1.35;
    opacity: 0.68;
}

#notification-toggle {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 5px;
    padding: 8px 10px;
    font-size: 0.75rem;
}

#notification-toggle .material-symbols-outlined { font-size: 17px; }

#notification-toggle.is-muted { opacity: 0.78; }

.notification-control + .benefits-section {
    margin-top: 18px;
}

.notification-test-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.notification-test-btn {
    min-height: 42px;
    padding: 8px;
    font-size: 0.72rem;
}

.admin-section[hidden] {
    display: none !important;
}

.ad-rain-card {
    margin: 0 0 24px;
    padding: 20px;
    border: 1px solid rgba(56, 189, 248, 0.34);
    border-radius: 14px;
    background:
        radial-gradient(ellipse at 94% 0%, rgba(56, 189, 248, 0.16), transparent 48%),
        rgba(14, 30, 48, 0.82);
}

.ad-rain-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.ad-rain-heading h3 {
    margin-bottom: 6px;
    color: #7dd3fc;
    font-size: 1rem;
    letter-spacing: 0.04em;
}

.ad-rain-heading p {
    max-width: 430px;
    color: rgba(224, 242, 254, 0.72);
    font-size: 0.78rem;
    line-height: 1.5;
}

.ad-rain-heading > .material-symbols-outlined {
    color: #38bdf8;
    font-size: 27px;
}

.ad-rain-count {
    margin-top: 16px;
    color: rgba(224, 242, 254, 0.8);
    font-size: 0.75rem;
}

.ad-rain-btn {
    width: 100%;
    margin-top: 8px;
    background: linear-gradient(105deg, #0284c7, #4f46e5);
    box-shadow: 0 5px 18px rgba(2, 132, 199, 0.18);
}

.ad-rain-btn:hover:not(:disabled) {
    background: linear-gradient(105deg, #0369a1, #4338ca);
}

.ad-rain-status {
    min-height: 1em;
    margin-top: 9px;
    color: rgba(224, 242, 254, 0.62);
    font-size: 0.7rem;
    line-height: 1.4;
}

.admin-user-activity-list,
.admin-subscribers-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
    max-height: 520px;
    overflow-y: auto;
    padding-right: 8px;
}

#admin-campaign-list, .admin-grid, #list-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 15px;
    width: 100%;
}

.campaign-card .gear-btn {
    position: absolute;
    top: 8px;
    right: 8px;
}

@media (max-width: 600px) {
    .ranking-summary {
        align-items: flex-start;
        flex-direction: column;
    }

    .ranking-total {
        align-self: stretch;
        font-size: 2rem;
    }
}

.admin-message-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 15px;
    width: 100%;
}

.admin-copy-box {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 12px;
    background: rgba(249, 115, 22, 0.08);
    border: 1px solid rgba(249, 115, 22, 0.25);
    border-radius: 12px;
}

.admin-copy-text {
    width: 100%;
    min-height: 150px;
    resize: vertical;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.28);
    color: #fff;
    font: inherit;
    font-size: 0.82rem;
    line-height: 1.45;
}

.admin-copy-text:focus {
    outline: 2px solid rgba(249, 115, 22, 0.55);
    outline-offset: 1px;
}

.admin-copy-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex: 1;
}

.admin-copy-actions {
    display: flex;
    gap: 10px;
    width: 100%;
}

.admin-select-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex: 1;
}

.payroll-comment-generator {
    padding: 20px;
    border: 1px solid rgba(168, 85, 247, 0.28);
    border-radius: 16px;
    background: rgba(168, 85, 247, 0.06);
}

.payroll-comment-generator h3 {
    margin-bottom: 8px;
    color: #d8b4fe;
    font-size: 1rem;
}

.payroll-comment-generator-intro {
    margin-bottom: 14px;
    font-size: 0.78rem;
    opacity: 0.72;
}

.payroll-comment-fields {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 12px;
}

.payroll-comment-fields label,
.payroll-template-label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.72rem;
    font-weight: 700;
}

.payroll-comment-fields input,
.payroll-template-input,
.payroll-comment-output {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.24);
    color: #fff;
    font: inherit;
    font-size: 0.8rem;
}

.payroll-comment-fields input {
    min-height: 38px;
    padding: 9px 10px;
}

.payroll-template-input {
    min-height: 88px;
    padding: 10px;
    resize: vertical;
    line-height: 1.45;
}

.payroll-template-label span {
    font-size: 0.68rem;
    font-weight: 400;
    opacity: 0.55;
}

.payroll-comment-result {
    display: flex;
    align-items: stretch;
    gap: 10px;
    margin-top: 12px;
}

.payroll-comment-output {
    min-height: 78px;
    padding: 10px;
    resize: vertical;
    line-height: 1.45;
}

.payroll-comment-copy-btn {
    align-self: flex-start;
    min-width: 140px;
}

@media (max-width: 600px) {
    .payroll-comment-fields {
        grid-template-columns: 1fr;
    }

    .payroll-comment-result {
        flex-direction: column;
    }

    .payroll-comment-copy-btn {
        width: 100%;
    }
}

@media (max-width: 600px) {
    .admin-message-grid {
        grid-template-columns: 1fr;
    }

    .admin-copy-actions {
        flex-direction: column;
    }
}

.payroll-request-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
}

.payroll-request-img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: contain;
    background: #000;
}

.payroll-request-info {
    padding: 12px;
    flex: 1;
}

.payroll-user-card {
    background: rgba(168, 85, 247, 0.1);
    border: 1px solid rgba(168, 85, 247, 0.3);
    padding: 15px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.payroll-user-actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    align-self: flex-start;
    gap: 8px;
    min-width: 112px;
}

.payroll-remove-btn,
.payroll-project-btn {
    padding: 6px 12px;
    font-size: 0.75rem;
    text-align: center;
    white-space: nowrap;
}

.payroll-project-btn {
    text-decoration: none;
}

.payroll-project-unavailable {
    padding: 6px 4px;
    color: rgba(255, 255, 255, 0.45);
    font-size: 0.7rem;
    text-align: center;
}

.payroll-comment-check {
    margin-top: 8px;
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.68rem;
    line-height: 1.35;
}

.payroll-comment-check.is-found {
    color: #86efac;
    font-weight: 700;
}

.payroll-comment-check.is-missing {
    color: #fbbf24;
}

.payroll-comment-check.is-unavailable {
    color: #fca5a5;
}

.payroll-grid-area {
    width: 100%;
    margin-top: 2px;
}

.payroll-copy-all-btn {
    align-self: flex-start;
    border-color: rgba(134, 239, 172, 0.35);
    color: #86efac;
    padding: 6px 10px;
    font-size: 0.72rem;
}

.payroll-grid-block {
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: rgba(0, 0, 0, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 12px;
}

.payroll-grid-title {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    opacity: 0.7;
}

.payroll-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(30px, 1fr));
    gap: 6px;
}

.pay-square {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 30px;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 700;
    border: 1px solid transparent;
    color: #fff;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.pay-square.pay-current {
    border: 3px solid #fbbf24;
    box-shadow: 0 0 8px rgba(251, 191, 36, 0.45);
}

.pay-square.pay-paid {
    background: rgba(34, 197, 94, 0.55);
    border-color: rgba(34, 197, 94, 0.8);
}

.pay-square.pay-unpaid {
    background: rgba(239, 68, 68, 0.55);
    border-color: rgba(239, 68, 68, 0.8);
}

.pay-square.pay-future {
    background: rgba(59, 130, 246, 0.5);
    border-color: rgba(59, 130, 246, 0.75);
    opacity: 0.85;
}

.payroll-grid-legend {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    font-size: 0.66rem;
    opacity: 0.85;
}

.payroll-grid-legend span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.pay-legend {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 3px;
}

.pay-legend-paid {
    background: rgba(34, 197, 94, 0.7);
}

.pay-legend-unpaid {
    background: rgba(239, 68, 68, 0.7);
}

.pay-legend-future {
    background: rgba(59, 130, 246, 0.7);
}

.payroll-grid-pager {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.pay-grid-nav {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    width: 28px;
    height: 26px;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
}

.pay-grid-nav:hover:not(.disabled) {
    background: rgba(168, 85, 247, 0.4);
}

.pay-grid-nav.disabled {
    opacity: 0.3;
    cursor: default;
}

.pay-grid-label {
    font-size: 0.68rem;
    opacity: 0.85;
}

.pay-grid-label em {
    font-style: normal;
    opacity: 0.6;
    margin-left: 6px;
}

.payroll-grid-unavailable {
    margin-top: 2px;
    padding: 8px 10px;
    border-radius: 8px;
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
    font-size: 0.7rem;
}

.payroll-rules-card {
    box-sizing: border-box;
    padding: 20px;
    border: 1px solid rgba(34, 197, 94, 0.28);
    border-radius: 16px;
    overflow: hidden;
    border-color: rgba(34, 197, 94, 0.28) !important;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.08), rgba(168, 85, 247, 0.06));
}

.payroll-rules-card h3 {
    margin-bottom: 8px;
    font-size: 1rem;
    color: #86efac;
    border-bottom: 1px solid rgba(134, 239, 172, 0.2);
    padding-bottom: 8px;
}

.payroll-rules-intro {
    font-size: 0.78rem;
    opacity: 0.72;
    line-height: 1.45;
    margin-bottom: 14px;
}

.payroll-rules-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.payroll-rule {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
    padding: 12px;
    border-radius: 9px;
    background: rgba(0, 0, 0, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.72rem;
    opacity: 0.86;
}

.payroll-rule strong {
    color: #fff;
    font-size: 0.95rem;
    overflow-wrap: anywhere;
}

.payroll-rule-label {
    color: #86efac;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.payroll-rules-formula {
    margin-top: 12px;
    padding: 11px 12px;
    border-radius: 9px;
    background: rgba(168, 85, 247, 0.12);
    border: 1px solid rgba(168, 85, 247, 0.22);
    color: #e9d5ff;
    font-size: 0.8rem;
    line-height: 1.45;
}

.payroll-rules-list {
    margin: 12px 0 0;
    padding-left: 20px;
    font-size: 0.76rem;
    line-height: 1.55;
    opacity: 0.82;
}

.payroll-rules-list li + li {
    margin-top: 4px;
}

@media (max-width: 620px) {
    .payroll-details-grid.has-pay-date {
        grid-template-columns: 1fr;
    }

    .payroll-rules-grid {
        grid-template-columns: 1fr;
    }
}

.payroll-status-banner {
    background: rgba(34, 197, 94, 0.08);
    border: 1px solid rgba(34, 197, 94, 0.25);
    border-radius: 12px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    text-align: left;
}

.payroll-status-header {
    display: flex;
    align-items: center;
    gap: 8px;
}

.payroll-details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    background: rgba(0, 0, 0, 0.2);
    padding: 12px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.payroll-details-grid.has-pay-date {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.payroll-detail-item {
    display: flex;
    flex-direction: column;
}

.payroll-due-today {
    padding-left: 10px;
    border-left: 2px solid #fbbf24;
}

.detail-label {
    font-size: 0.65rem;
    opacity: 0.6;
    text-transform: uppercase;
    font-weight: 700;
}

.detail-value {
    font-size: 0.85rem;
    color: #fff;
    font-weight: 600;
}

.payroll-payment-number {
    margin-top: 3px;
    color: #fbbf24;
    font-size: 0.68rem;
    font-weight: 800;
}

.payroll-benefit-text {
    font-size: 0.8rem;
    line-height: 1.4;
    opacity: 0.9;
}

.payroll-opt-out-text {
    font-size: 0.7rem;
    opacity: 0.5;
    font-style: italic;
    border-top: 1px solid rgba(255,255,255,0.05);
    padding-top: 8px;
}

.admin-item {
    background: rgba(255, 255, 255, 0.05);
    flex-direction: column;
    align-items: stretch;
    padding: 0;
    overflow: hidden;
    gap: 0;
    border-radius: 10px;
}

.admin-media-wrapper {
    width: 100%;
    aspect-ratio: 16/9;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.admin-media-wrapper img, .admin-media-wrapper video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.admin-item .campaign-info {
    padding: 12px;
}

.admin-item .admin-actions {
    padding: 10px 12px 15px 12px;
    border-top: 1px solid rgba(255,255,255,0.05);
    justify-content: space-around;
}

.admin-actions {
    display: flex;
    gap: 8px;
}

.admin-action-btn {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.2s;
    color: white;
}

.admin-action-btn.cutoff {
    background: #fbbf24;
    color: #000;
}

.admin-action-btn.stop {
    background: #ef4444;
}

.admin-action-btn.reset {
    background: #64748b;
}

.admin-action-btn.insights {
    background: #a855f7;
}

.admin-action-btn.project {
    background: #3b82f6;
}

.admin-action-btn.approve {
    background: #22c55e;
}

.admin-action-btn.decline {
    background: #ef4444;
}

.admin-action-btn:hover {
    filter: brightness(1.2);
    transform: translateY(-2px);
}

.admin-action-btn span {
    font-size: 18px;
}

#websim-logo-container, 
.websim-logo-container, 
[id*="websim-logo"], 
[class*="websim-logo"],
div[style*="z-index: 2147483647"],
div[style*="z-index:9999999"],
body > div:not(#app):not([class*="TipSDK"]):not([class*="tipsdk"]):not([class*="tip-sdk"]):not([style*="z-index: 15000000"]):not(script):not(style):not(iframe),
body > a[href*="websim.ai"] {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
    opacity: 0 !important;
    width: 0 !important;
    height: 0 !important;
    max-width: 0 !important;
    max-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    position: absolute !important;
    left: -9999px !important;
}

/* Partner welcome modal (exempt from body overlay hiding above) */
.partner-welcome-overlay {
    display: flex !important;
    visibility: visible !important;
    pointer-events: auto !important;
    opacity: 1 !important;
    position: fixed !important;
    left: 0 !important;
    top: 0 !important;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: auto !important;
    background: rgba(3, 7, 18, 0.84);
    align-items: center;
    justify-content: center;
    z-index: 999999;
}

.partner-welcome-modal {
    position: relative;
    color: #f8fafc;
    background: #111827;
    border: 1px solid rgba(192, 132, 252, 0.65);
    border-radius: 16px;
    padding: 28px;
    max-width: 420px;
    width: 90%;
    text-align: center;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.72);
}

.partner-welcome-close {
    position: absolute;
    top: 12px;
    right: 14px;
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 8px;
    color: #f8fafc;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
}

.partner-welcome-close:hover {
    color: #fff;
}

.partner-welcome-title {
    font-size: 1.2rem;
    font-weight: 800;
    color: #d8b4fe;
    margin-bottom: 8px;
}

.partner-welcome-sub {
    font-size: 0.85rem;
    color: #cbd5e1;
    opacity: 1;
    margin-bottom: 20px;
}

.partner-welcome-box {
    background: #1e293b;
    border: 1px solid rgba(192, 132, 252, 0.28);
    border-radius: 12px;
    padding: 14px;
    display: flex;
    align-items: center;
    gap: 15px;
    text-align: left;
}
