/*
Theme Name: Content Shortener Theme
Theme URI: https://example.com
Author: Antigravity
Description: A premium, modern URL shortener theme with glassmorphism and gradients.
Version: 2.0
*/

:root {
    /* Brand Colors (Premium Teal Gradient) */
    --primary-gradient: linear-gradient(135deg, #00b4db 0%, #0083b0 100%);
    --primary-color: #0083b0;
    --accent-color: #00b4db;

    /* UI Colors */
    --bg-body: #f7f9fc;
    --bg-white: #ffffff;
    --bg-glass: rgba(255, 255, 255, 0.85);

    /* Text Colors */
    --text-main: #2d3748;
    --text-muted: #718096;
    --text-light: #ffffff;

    /* Spacing & Borders */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-pill: 50px;
    --shadow-soft: 0 10px 40px -10px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 20px 40px -10px rgba(0, 0, 0, 0.12);

    --container-width: 1100px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-body);
    background-image:
        radial-gradient(at 10% 10%, rgba(0, 180, 219, 0.05) 0px, transparent 50%),
        radial-gradient(at 90% 90%, rgba(0, 131, 176, 0.05) 0px, transparent 50%);
    color: var(--text-main);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Typography */
h1,
h2,
h3,
h4 {
    color: var(--text-main);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: all 0.25s ease;
}

/* Layout */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
}

/* -----------------------
   Header (Glassmorphism)
----------------------- */
.site-header {
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 1rem 0;
    transition: padding 0.3s ease;
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-branding h1 {
    font-size: 1.5rem;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 0;
}

.main-navigation ul {
    list-style: none;
    display: flex;
    gap: 32px;
}

.main-navigation a {
    color: var(--text-main);
    font-weight: 600;
    font-size: 0.95rem;
}

.main-navigation a:hover {
    color: var(--accent-color);
}

/* -----------------------
   Hero & Tool Section
----------------------- */
.site-main {
    flex: 1;
    padding: 3rem 0;
}

.hero-section {
    text-align: center;
    padding: 5rem 2rem;
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    position: relative;
    overflow: hidden;
    margin-bottom: 3rem;
    border: 1px solid rgba(255, 255, 255, 0.5);
}

/* Decorative background blob */
.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(0, 180, 219, 0.03) 0%, transparent 70%);
    z-index: 0;
    pointer-events: none;
}

.hero-section h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
}

.hero-section p {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 3rem;
    position: relative;
    z-index: 1;
}

/* Form Styling */
.shortener-form-container {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.url-input-group {
    display: flex;
    gap: 16px;
    background: #fff;
    padding: 8px;
    border-radius: var(--radius-pill);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    border: 1px solid #edf2f7;
    transition: box-shadow 0.3s ease;
}

.url-input-group:focus-within {
    box-shadow: 0 8px 30px rgba(0, 180, 219, 0.15);
    border-color: rgba(0, 180, 219, 0.3);
}

.url-input {
    border: none;
    background: transparent;
    padding: 16px 24px;
    font-size: 1.05rem;
    flex: 1;
    outline: none;
    color: var(--text-main);
}

/* Input specific overrides */
#url-input {
    flex: 2;
}

#alias-input {
    border-left: 1px solid #edf2f7;
    flex: 0 0 220px;
}

.btn-primary {
    background: var(--primary-gradient);
    color: white;
    border: none;
    padding: 0 32px;
    font-size: 1rem;
    font-weight: 700;
    border-radius: var(--radius-pill);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    white-space: nowrap;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 131, 176, 0.3);
}

/* Result Area */
#shortened-result {
    margin-top: 2rem;
    padding: 0;
    /* Clear previous padding */
    background: transparent;
    border: none;
    display: none;
}

#shortened-result.success .result-content {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #15803d;
}

#shortened-result.error .result-content {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
}

.result-content {
    padding: 1.5rem;
    border-radius: var(--radius-md);
    display: inline-block;
    width: 100%;
    max-width: 600px;
}

.result-link-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
}

.result-link {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    background: rgba(255, 255, 255, 0.5);
    padding: 10px 20px;
    border-radius: var(--radius-sm);
}

/* QR Code */
#qr-image {
    border-radius: var(--radius-sm);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

#qr-image:hover {
    transform: scale(1.05);
}

/* -----------------------
   Pages & Footer
----------------------- */
.page-header h1 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    text-align: center;
}

.page-content {
    background: var(--bg-white);
    padding: 3rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-soft);
}

.site-footer {
    background: var(--bg-white);
    padding: 4rem 0 2rem;
    border-top: 1px solid #edf2f7;
    margin-top: auto;
}

.footer-widgets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-widgets h4 {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.copyright {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    padding-top: 2rem;
    border-top: 1px solid #edf2f7;
}

/* -----------------------
   Responsive
----------------------- */
@media (max-width: 768px) {
    .url-input-group {
        flex-direction: column;
        background: transparent;
        box-shadow: none;
        border: none;
        gap: 10px;
    }

    .url-input,
    #alias-input {
        background: #fff;
        border: 1px solid #edf2f7;
        border-radius: var(--radius-md);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
        width: 100%;
        flex: auto;
    }

    .btn-primary {
        width: 100%;
        padding: 16px;
        border-radius: var(--radius-md);
    }

    .hero-section h2 {
        font-size: 2rem;
    }
}