:root {
    --bg: #0a0f14;
    --bg2: #121820;
    --glass: rgba(18, 24, 32, .85);
    --text: #fff;
    --text2: #7a8a9a;
    --accent: #0ea5e9;
    --accent2: #38bdf8;
    --gradient: linear-gradient(135deg, #0ea5e9, #38bdf8);
    --success: #22c55e;
    --warning: #f59e0b;
    --error: #ef4444;
    --border: rgba(255, 255, 255, .08);
    --radius: 16px
}

[data-theme=light] {
    --bg: #f0f9ff;
    --bg2: #fff;
    --glass: rgba(255, 255, 255, .9);
    --text: #0f172a;
    --text2: #64748b;
    --border: rgba(0, 0, 0, .1)
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh
}

.app {
    min-height: 100vh;
    padding: 20px;
    max-width: 700px;
    margin: 0 auto;
    position: relative
}

.bg {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden
}

.orb {
    position: absolute;
    width: 400px;
    height: 400px;
    top: 20%;
    left: -100px;
    background: var(--accent);
    filter: blur(120px);
    opacity: .2;
    border-radius: 50%
}

.glass {
    background: var(--glass);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 16px
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    position: relative;
    z-index: 1
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.3rem
}

.logo h1 {
    font-size: 1.4rem;
    font-weight: 400
}

.logo h1 span {
    font-weight: 700;
    color: var(--accent)
}

#theme-btn {
    width: 40px;
    height: 40px;
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 1.1rem;
    cursor: pointer
}

main {
    position: relative;
    z-index: 1
}

.input-group {
    margin-bottom: 16px
}

.input-group label {
    display: block;
    font-size: .85rem;
    color: var(--text2);
    margin-bottom: 6px
}

.input-group input,
.input-group textarea {
    width: 100%;
    padding: 14px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text);
    font-family: inherit;
    font-size: .95rem;
    resize: none
}

.input-group input:focus,
.input-group textarea:focus {
    outline: none;
    border-color: var(--accent)
}

.primary-btn {
    width: 100%;
    padding: 16px;
    background: var(--gradient);
    border: none;
    border-radius: 12px;
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: .2s
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(14, 165, 233, .3)
}

.result-card {
    position: relative
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px
}

.result-header h3 {
    font-size: .95rem
}

.char-count {
    font-size: .8rem;
    padding: 4px 10px;
    background: var(--bg);
    border-radius: 8px
}

.char-count.warning {
    color: var(--warning)
}

.char-count.error {
    color: var(--error)
}

.char-count.success {
    color: var(--success)
}

.result-card input,
.result-card textarea {
    width: 100%;
    padding: 14px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text);
    font-family: inherit;
    font-size: .95rem;
    resize: none
}

.copy-btn {
    position: absolute;
    right: 12px;
    bottom: 12px;
    padding: 8px 16px;
    background: var(--accent);
    border: none;
    border-radius: 8px;
    color: #fff;
    font-size: .8rem;
    cursor: pointer;
    transition: .2s
}

.copy-btn:hover {
    transform: scale(1.05)
}

.preview-section h3 {
    margin-bottom: 16px;
    font-size: .95rem
}

.google-preview {
    background: #fff;
    padding: 16px;
    border-radius: 12px;
    font-family: Arial, sans-serif
}

.preview-url {
    font-size: .8rem;
    color: #202124;
    margin-bottom: 4px
}

.preview-title {
    font-size: 1.1rem;
    color: #1a0dab;
    margin-bottom: 4px;
    cursor: pointer
}

.preview-title:hover {
    text-decoration: underline
}

.preview-desc {
    font-size: .85rem;
    color: #4d5156;
    line-height: 1.5
}

.tips-section h3 {
    margin-bottom: 12px;
    font-size: .95rem
}

.tips-grid {
    display: grid;
    gap: 10px
}

.tip {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px;
    background: var(--bg);
    border-radius: 10px;
    font-size: .85rem
}

.tip-icon {
    font-size: 1.1rem
}

.tip.pass .tip-icon {
    color: var(--success)
}

.tip.warn .tip-icon {
    color: var(--warning)
}

.tip.fail .tip-icon {
    color: var(--error)
}

.bulk-section h3 {
    margin-bottom: 12px;
    font-size: .95rem
}

.secondary-btn {
    width: 100%;
    padding: 14px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text);
    font-size: .95rem;
    cursor: pointer;
    margin-top: 10px;
    transition: .2s
}

.secondary-btn:hover {
    border-color: var(--accent);
    background: rgba(14, 165, 233, .1)
}

.bulk-output {
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px
}

.bulk-item {
    padding: 14px;
    background: var(--bg);
    border-radius: 12px;
    border-left: 3px solid var(--accent)
}

.bulk-item h4 {
    font-size: .85rem;
    color: var(--accent);
    margin-bottom: 6px
}

.bulk-item p {
    font-size: .8rem;
    color: var(--text2);
    margin-bottom: 4px
}

.fab {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: var(--gradient);
    border: none;
    border-radius: 50%;
    font-size: 1.3rem;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(14, 165, 233, .3);
    z-index: 10
}

.toast {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: var(--bg2);
    border: 1px solid var(--accent);
    padding: 12px 20px;
    border-radius: 12px;
    opacity: 0;
    transition: .3s;
    z-index: 100
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0)
}