:root {
    --bg-color: #0f172a;
    --text-color: #e2e8f0;
    --text-muted: #94a3b8;
    --primary-color: #3b82f6;
    --primary-hover: #2563eb;
    --glass-bg: rgba(30, 41, 59, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    --input-bg: rgba(15, 23, 42, 0.6);
    --danger-color: #ef4444;
    --success-color: #22c55e;
    /* Google Ad Colors */
    --ad-blue: #8ab4f8;
    --ad-green: #202124;
    /* Dark mode text usually white/gray, but links are blue */
    --ad-text: #bdc1c6;
    --ad-black: #202124;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Background Blobs */
.background-blobs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
}

.blob-1 {
    top: -10%;
    left: -10%;
    width: 50vw;
    height: 50vw;
    background: #4f46e5;
    animation: float 20s infinite alternate;
}

.blob-2 {
    bottom: -10%;
    right: -10%;
    width: 40vw;
    height: 40vw;
    background: #ec4899;
    animation: float 15s infinite alternate-reverse;
}

.blob-3 {
    top: 40%;
    left: 40%;
    width: 30vw;
    height: 30vw;
    background: #06b6d4;
    animation: float 18s infinite alternate;
}

@keyframes float {
    0% {
        transform: translate(0, 0);
    }

    100% {
        transform: translate(50px, 50px);
    }
}

/* Layout */
.app-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

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

.app-header h1 {
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(to right, #fff, #94a3b8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.header-actions {
    display: flex;
    gap: 1rem;
}

.content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: start;
}

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

/* Glass Panel */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

/* Forms */
.input-section h2 {
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}

input[type="text"],
input[type="url"] {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--input-bg);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: var(--text-color);
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}

input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

/* Assets List */
.assets-container {
    margin-top: 2rem;
}

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

.assets-header h3 {
    font-size: 1rem;
    font-weight: 600;
}

.asset-count {
    font-size: 0.75rem;
    color: var(--text-muted);
    transform: translateY(-10px);
}

.remove-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 4px;
    transition: color 0.2s, background 0.2s;
}

.remove-btn:hover {
    color: var(--danger-color);
    background: rgba(239, 68, 68, 0.1);
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    border: none;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

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

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-color);
}

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

.btn-ghost {
    background: transparent;
    color: var(--primary-color);
    padding: 0.5rem 0;
    width: 100%;
    border: 1px dashed var(--glass-border);
    margin-top: 0.5rem;
}

.btn-ghost:hover {
    background: rgba(59, 130, 246, 0.05);
    border-color: var(--primary-color);
}

.btn-icon {
    padding: 0.5rem;
}

.preview-controls {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.device-toggle {
    background: rgba(0, 0, 0, 0.2);
    padding: 0.25rem;
    border-radius: 8px;
    display: flex;
}

.toggle-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.875rem;
    transition: all 0.2s;
}

.toggle-btn.active {
    background: var(--glass-bg);
    color: var(--text-color);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Ad Preview Card */
.preview-card {
    background: #202124;
    border: 1px solid #3c4043;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.ad-preview {
    font-family: 'Roboto', arial, sans-serif;
    width: 100%;
    max-width: 600px;
    text-align: left;
}

.ad-preview.mobile {
    max-width: 360px;
}

.ad-label {
    color: var(--text-color);
    font-weight: 700;
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
    display: none;
}

.ad-label {
    display: block;
    color: #bdc1c6;
    font-weight: 700;
    font-size: 12px;
    margin-bottom: 4px;
}

.ad-header {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.ad-icon {
    width: 28px;
    height: 28px;
    background: #303134;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    overflow: hidden;
}

.ad-icon img {
    width: 16px;
    height: 16px;
}

.ad-url-group {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
}

.ad-display-name {
    color: #bdc1c6;
    font-size: 14px;
    font-weight: 400;
}

.ad-display-path {
    color: #bdc1c6;
    font-size: 12px;
}

.ad-menu-dots {
    margin-left: auto;
    width: 3px;
    height: 14px;
    background: radial-gradient(circle, #bdc1c6 1.5px, transparent 2px);
    background-size: 100% 33%;
}

.ad-headline {
    color: #8ab4f8;
    font-size: 20px;
    line-height: 1.3;
    font-weight: 400;
    margin-bottom: 4px;
    cursor: pointer;
}

.ad-headline:hover {
    text-decoration: underline;
}

.ad-description {
    color: #bdc1c6;
    font-size: 14px;
    line-height: 1.58;
}

.ad-extensions {
    margin-top: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

/* Text overflow fixes */
.ad-url-group {
    flex: 1;
    min-width: 0;
}

.ad-display-name,
.ad-display-path,
.ad-headline,
.ad-description {
    overflow-wrap: break-word;
    word-break: break-word;
}

.ad-menu-dots {
    flex-shrink: 0;
}

/* Character counter and input wrapper styles - Google Ads style */
.asset-item {
    margin-bottom: 1rem;
}

.asset-header-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
}

.asset-label-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.asset-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-color);
}

.char-counter {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.char-counter.at-limit {
    color: var(--danger-color);
    font-weight: 600;
}

.asset-input {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--input-bg);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: var(--text-color);
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.asset-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}