:root {
    /* Branding - "Hunabkuh" inspired (Cosmic/Premium/Nature) */
    --bg-color: #0d1117; /* Very dark blue-gray */
    --card-bg: #161b22;
    --text-primary: #e6edf3;
    --text-secondary: #8b949e;
    --accent-color: #58a6ff; /* Bright blue */
    --accent-hover: #1f6feb;
    --border-color: #30363d;
    --success-color: #238636;
    --warning-color: #d29922;
    --danger-color: #f85149;
    
    /* Typography */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    /* Google SERP Variables (Light Mode Only for fidelity) */
    --serp-bg: #ffffff;
    --serp-title-color: #1a0dab;
    --serp-url-color: #202124;
    --serp-desc-color: #4d5156;
    --serp-font-family: arial, sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

/* Header */
.main-header {
    background-color: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    padding: 1.5rem 0;
    margin-bottom: 2rem;
}

.logo {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.tool-name {
    font-weight: 400;
    color: var(--text-secondary);
    font-size: 1.2rem;
}

/* Main Content Layout */
.main-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    flex: 1;
}

@media (max-width: 768px) {
    .main-content {
        grid-template-columns: 1fr;
    }
}

/* Cards */
.card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

h2 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Form Styles */
.form-group {
    margin-bottom: 2rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

input[type="text"],
textarea {
    width: 100%;
    background-color: #0d1117;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 0.75rem;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

textarea {
    resize: vertical;
}

input[type="text"]:focus,
textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(88, 166, 255, 0.2);
}

/* Character Counters */
.count-wrapper {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
    gap: 1rem;
}

.limit {
    opacity: 0.7;
}

.progress-bar {
    width: 60px;
    height: 4px;
    background-color: var(--border-color);
    border-radius: 2px;
    overflow: hidden;
}

.fill {
    height: 100%;
    background-color: var(--success-color);
    width: 0%;
    transition: width 0.3s ease, background-color 0.3s;
}

/* SERP Preview Styles - Mimicking Google */
.preview-card {
    /* Keep the card container dark, but maybe a lighter background for the preview area specifically? 
       Actually, Google Search has Dark Mode too. But usually tools show Light Mode as standard.
       Let's wrap the actual result in a white container to represent "Browser view".
    */
}

.google-preview-container {
    background-color: #ffffff;
    border-radius: 8px;
    padding: 20px;
    font-family: var(--serp-font-family);
    border: 1px solid var(--border-color);
}

.result-item {
    max-width: 600px;
}

.result-url-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.result-icon {
    width: 26px;
    height: 26px;
    background-color: #f1f3f4;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #dadce0;
}

.globe-icon {
    font-size: 14px;
}

.result-url-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    line-height: 1.3;
}

.site-name {
    font-size: 14px;
    color: var(--serp-url-color);
    font-weight: 400;
}

.url-path {
    font-size: 12px;
    color: var(--serp-desc-color);
}

.three-dots {
    color: #70757a;
    font-size: 18px;
    margin-left: auto;
    cursor: pointer;
}

.result-title {
    font-size: 20px;
    line-height: 1.3;
    margin: 0 0 4px 0;
    font-weight: 400;
}

.result-title a {
    text-decoration: none;
    color: var(--serp-title-color);
    cursor: auto;
}

.result-title a:hover {
    text-decoration: underline;
}

.result-snippet {
    font-size: 14px;
    line-height: 1.58;
    color: var(--serp-desc-color);
    word-wrap: break-word;
}

/* Footer */
.main-footer {
    margin-top: auto;
    padding: 2rem 0;
    border-top: 1px solid var(--border-color);
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Utils */
.warning-text {
    color: var(--warning-color);
}

.danger-text {
    color: var(--danger-color);
}
