/* =============================================
   AnketKutusu - Vibrant Survey Platform CSS
   ============================================= */

/* --- CSS Variables --- */
:root {
    --purple-50: #faf5ff;
    --purple-100: #f3e8ff;
    --purple-200: #e9d5ff;
    --purple-300: #d8b4fe;
    --purple-400: #c084fc;
    --purple-500: #a855f7;
    --purple-600: #9333ea;
    --purple-700: #7e22ce;
    --purple-800: #6b21a8;
    --purple-900: #581c87;

    --teal-50: #f0fdfa;
    --teal-100: #ccfbf1;
    --teal-200: #99f6e4;
    --teal-300: #5eead4;
    --teal-400: #2dd4bf;
    --teal-500: #14b8a6;
    --teal-600: #0d9488;
    --teal-700: #0f766e;

    --pink-400: #f472b6;
    --pink-500: #ec4899;

    --orange-400: #fb923c;
    --orange-500: #f97316;

    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;

    --white: #ffffff;
    --black: #000000;

    --gradient-primary: linear-gradient(135deg, var(--purple-600), var(--teal-500));
    --gradient-hero: linear-gradient(135deg, var(--purple-700) 0%, var(--purple-500) 40%, var(--teal-500) 100%);
    --gradient-card: linear-gradient(135deg, var(--purple-50), var(--teal-50));
    --gradient-btn: linear-gradient(135deg, var(--purple-500), var(--purple-700));
    --gradient-btn-hover: linear-gradient(135deg, var(--purple-600), var(--purple-800));
    --gradient-teal-btn: linear-gradient(135deg, var(--teal-500), var(--teal-700));

    --shadow-sm: 0 1px 2px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 10px 30px rgba(0,0,0,0.12);
    --shadow-xl: 0 20px 50px rgba(0,0,0,0.15);
    --shadow-purple: 0 8px 24px rgba(147, 51, 234, 0.25);
    --shadow-teal: 0 8px 24px rgba(20, 184, 166, 0.25);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    --font-sans: 'Segoe UI', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;

    --transition-fast: 0.15s ease;
    --transition-base: 0.25s ease;
    --transition-slow: 0.4s ease;
}

/* --- Reset & Base --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.6;
    color: var(--gray-800);
    background: var(--gray-50);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
}

main {
    flex: 1;
}

a {
    color: var(--purple-600);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--purple-800);
}

img {
    max-width: 100%;
    display: block;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- Navbar --- */
.navbar {
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
    background: rgba(255,255,255,0.95);
}

.navbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.35rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.brand-icon {
    font-size: 1.6rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.navbar-menu {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link {
    padding: 8px 18px;
    border-radius: var(--radius-full);
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--gray-600);
    transition: all var(--transition-fast);
}

.nav-link:hover {
    color: var(--purple-600);
    background: var(--purple-50);
}

.nav-link.active {
    color: var(--white);
    background: var(--gradient-btn);
}

.navbar-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.navbar-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--gray-700);
    border-radius: 2px;
    transition: all var(--transition-fast);
}

/* --- Hero Section --- */
.hero {
    background: var(--gradient-hero);
    padding: 80px 0 100px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: rgba(255,255,255,0.05);
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: rgba(255,255,255,0.03);
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 720px;
    margin: 0 auto;
}

.hero-badge {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(255,255,255,0.15);
    border-radius: var(--radius-full);
    color: var(--white);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 24px;
    backdrop-filter: blur(4px);
}

.hero h1 {
    font-size: 3rem;
    font-weight: 800;
    color: var(--white);
    line-height: 1.15;
    margin-bottom: 20px;
}

.hero p {
    font-size: 1.2rem;
    color: rgba(255,255,255,0.85);
    margin-bottom: 36px;
    line-height: 1.7;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 32px;
    border-radius: var(--radius-full);
    font-size: 1rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all var(--transition-base);
    text-decoration: none;
    line-height: 1.4;
}

.btn-primary {
    background: var(--white);
    color: var(--purple-700);
    box-shadow: var(--shadow-lg);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
    color: var(--purple-800);
}

.btn-secondary {
    background: rgba(255,255,255,0.15);
    color: var(--white);
    border: 2px solid rgba(255,255,255,0.3);
    backdrop-filter: blur(4px);
}

.btn-secondary:hover {
    background: rgba(255,255,255,0.25);
    color: var(--white);
    transform: translateY(-2px);
}

.btn-purple {
    background: var(--gradient-btn);
    color: var(--white);
    box-shadow: var(--shadow-purple);
}

.btn-purple:hover {
    background: var(--gradient-btn-hover);
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(147, 51, 234, 0.35);
}

.btn-teal {
    background: var(--gradient-teal-btn);
    color: var(--white);
    box-shadow: var(--shadow-teal);
}

.btn-teal:hover {
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: var(--purple-600);
    border: 2px solid var(--purple-300);
}

.btn-outline:hover {
    background: var(--purple-50);
    border-color: var(--purple-500);
    color: var(--purple-700);
}

.btn-sm {
    padding: 8px 20px;
    font-size: 0.9rem;
}

.btn-lg {
    padding: 16px 40px;
    font-size: 1.1rem;
}

.btn-block {
    width: 100%;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* --- Section Styles --- */
.section {
    padding: 80px 0;
}

.section-title {
    font-size: 2.2rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 12px;
    color: var(--gray-900);
}

.section-subtitle {
    text-align: center;
    color: var(--gray-500);
    font-size: 1.1rem;
    margin-bottom: 48px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* --- Features Grid --- */
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.feature-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 32px;
    border: 1px solid var(--gray-200);
    transition: all var(--transition-base);
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--purple-200);
}

.feature-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 16px;
}

.feature-icon.purple { background: var(--purple-100); color: var(--purple-600); }
.feature-icon.teal { background: var(--teal-100); color: var(--teal-600); }
.feature-icon.pink { background: #fce7f3; color: var(--pink-500); }
.feature-icon.orange { background: #ffedd5; color: var(--orange-500); }

.feature-card h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--gray-900);
}

.feature-card p {
    color: var(--gray-500);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* --- Demo Poll --- */
.demo-section {
    background: var(--gradient-card);
    padding: 80px 0;
}

.demo-poll {
    max-width: 600px;
    margin: 0 auto;
    background: var(--white);
    border-radius: var(--radius-xl);
    padding: 40px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--gray-200);
}

.demo-poll h3 {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 24px;
    color: var(--gray-900);
}

/* --- Survey Card --- */
.survey-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 28px;
    border: 1px solid var(--gray-200);
    transition: all var(--transition-base);
    margin-bottom: 16px;
}

.survey-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--purple-200);
}

.survey-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.survey-card h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--gray-900);
}

.survey-card p {
    color: var(--gray-500);
    font-size: 0.9rem;
    margin-bottom: 16px;
}

.survey-meta {
    display: flex;
    gap: 16px;
    font-size: 0.85rem;
    color: var(--gray-400);
}

/* --- Custom Radio & Checkbox --- */
.poll-option {
    display: flex;
    align-items: center;
    padding: 14px 18px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-md);
    margin-bottom: 10px;
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
}

.poll-option:hover {
    border-color: var(--purple-300);
    background: var(--purple-50);
}

.poll-option.selected {
    border-color: var(--purple-500);
    background: var(--purple-50);
}

.poll-option input[type="radio"],
.poll-option input[type="checkbox"] {
    display: none;
}

.poll-option .custom-radio,
.poll-option .custom-checkbox {
    width: 22px;
    height: 22px;
    border: 2px solid var(--gray-300);
    border-radius: 50%;
    margin-right: 14px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.poll-option .custom-checkbox {
    border-radius: 6px;
}

.poll-option.selected .custom-radio {
    border-color: var(--purple-500);
    background: var(--purple-500);
}

.poll-option.selected .custom-radio::after {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--white);
}

.poll-option.selected .custom-checkbox {
    border-color: var(--purple-500);
    background: var(--purple-500);
}

.poll-option.selected .custom-checkbox::after {
    content: '';
    width: 12px;
    height: 12px;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 12 12' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M2 6L5 9L10 3' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
}

.poll-option .option-label {
    font-weight: 500;
    color: var(--gray-700);
    font-size: 0.95rem;
}

/* --- Progress Bars for Results --- */
.result-item {
    margin-bottom: 16px;
}

.result-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
}

.result-label {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--gray-700);
}

.result-value {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--purple-600);
}

.result-bar {
    width: 100%;
    height: 12px;
    background: var(--gray-100);
    border-radius: var(--radius-full);
    overflow: hidden;
    position: relative;
}

.result-bar-fill {
    height: 100%;
    border-radius: var(--radius-full);
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 0;
}

.result-bar-fill.purple {
    background: var(--gradient-btn);
}

.result-bar-fill.teal {
    background: var(--gradient-teal-btn);
}

.result-bar-fill.pink {
    background: linear-gradient(135deg, var(--pink-400), var(--pink-500));
}

.result-bar-fill.orange {
    background: linear-gradient(135deg, var(--orange-400), var(--orange-500));
}

.result-bar-fill:nth-child(1) { background: var(--gradient-btn); }

.result-total {
    text-align: center;
    margin-top: 20px;
    font-size: 0.9rem;
    color: var(--gray-400);
}

/* --- Rating Stars --- */
.rating-group {
    display: flex;
    gap: 6px;
    direction: rtl;
    justify-content: flex-end;
    margin: 8px 0;
}

.rating-group input {
    display: none;
}

.rating-group label {
    font-size: 2rem;
    color: var(--gray-200);
    cursor: pointer;
    transition: all var(--transition-fast);
    line-height: 1;
}

.rating-group label:hover,
.rating-group label:hover ~ label,
.rating-group input:checked ~ label {
    color: #fbbf24;
    transform: scale(1.1);
}

.rating-display {
    display: flex;
    gap: 2px;
    align-items: center;
}

.rating-display .star {
    font-size: 1.2rem;
    color: var(--gray-200);
}

.rating-display .star.filled {
    color: #fbbf24;
}

.rating-avg {
    margin-left: 8px;
    font-weight: 700;
    color: var(--gray-700);
}

/* --- Form Styles --- */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--gray-700);
    margin-bottom: 6px;
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-md);
    font-family: var(--font-sans);
    font-size: 1rem;
    color: var(--gray-800);
    background: var(--white);
    transition: all var(--transition-fast);
    outline: none;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    border-color: var(--purple-400);
    box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.15);
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
}

.form-hint {
    font-size: 0.85rem;
    color: var(--gray-400);
    margin-top: 4px;
}

.form-error {
    font-size: 0.85rem;
    color: #ef4444;
    margin-top: 4px;
}

/* --- Toggle Switch --- */
.toggle-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
}

.toggle {
    position: relative;
    width: 48px;
    height: 26px;
}

.toggle input {
    display: none;
}

.toggle-slider {
    position: absolute;
    inset: 0;
    background: var(--gray-300);
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.toggle-slider::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--white);
    top: 3px;
    left: 3px;
    transition: all var(--transition-fast);
}

.toggle input:checked + .toggle-slider {
    background: var(--purple-500);
}

.toggle input:checked + .toggle-slider::before {
    transform: translateX(22px);
}

/* --- Builder Page --- */
.builder-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px;
}

.builder-header {
    text-align: center;
    margin-bottom: 40px;
}

.builder-header h1 {
    font-size: 2rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
}

.builder-header p {
    color: var(--gray-500);
}

.builder-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 32px;
    border: 1px solid var(--gray-200);
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
}

.builder-card-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.builder-card-title .step-badge {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--gradient-btn);
    color: var(--white);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

/* --- Question Builder --- */
.question-block {
    background: var(--gray-50);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-md);
    padding: 24px;
    margin-bottom: 16px;
    position: relative;
    transition: all var(--transition-fast);
}

.question-block:hover {
    border-color: var(--purple-200);
}

.question-block.dragging {
    opacity: 0.6;
    border-color: var(--purple-400);
    background: var(--purple-50);
}

.question-block-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.question-drag-handle {
    cursor: grab;
    padding: 4px 8px;
    color: var(--gray-400);
    font-size: 1.2rem;
    user-select: none;
}

.question-drag-handle:active {
    cursor: grabbing;
}

.question-number {
    font-weight: 700;
    color: var(--purple-600);
    font-size: 0.9rem;
}

.question-remove {
    background: none;
    border: none;
    color: var(--gray-400);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.question-remove:hover {
    color: #ef4444;
    background: #fef2f2;
}

.option-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.option-row .form-input {
    flex: 1;
}

.option-remove {
    background: none;
    border: none;
    color: var(--gray-400);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 6px;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.option-remove:hover {
    color: #ef4444;
    background: #fef2f2;
}

.add-option-btn {
    background: none;
    border: 2px dashed var(--gray-300);
    border-radius: var(--radius-sm);
    padding: 10px 16px;
    color: var(--gray-500);
    font-size: 0.9rem;
    cursor: pointer;
    width: 100%;
    transition: all var(--transition-fast);
    font-family: var(--font-sans);
}

.add-option-btn:hover {
    border-color: var(--purple-400);
    color: var(--purple-600);
    background: var(--purple-50);
}

.add-question-btn {
    background: none;
    border: 2px dashed var(--purple-300);
    border-radius: var(--radius-lg);
    padding: 24px;
    color: var(--purple-500);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    transition: all var(--transition-base);
    font-family: var(--font-sans);
    margin-bottom: 20px;
}

.add-question-btn:hover {
    border-color: var(--purple-500);
    background: var(--purple-50);
    transform: translateY(-2px);
}

/* --- Participation Page --- */
.survey-page {
    max-width: 700px;
    margin: 0 auto;
    padding: 40px 20px;
}

.survey-header {
    text-align: center;
    margin-bottom: 40px;
}

.survey-header h1 {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--gray-900);
    margin-bottom: 8px;
}

.survey-header p {
    color: var(--gray-500);
    font-size: 1.05rem;
}

.question-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 28px;
    border: 1px solid var(--gray-200);
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
}

.question-card h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 16px;
}

.question-card .required-mark {
    color: #ef4444;
    margin-left: 4px;
}

/* --- Results Page --- */
.results-page {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 20px;
}

.results-header {
    text-align: center;
    margin-bottom: 40px;
}

.results-header h1 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--gray-900);
    margin-bottom: 8px;
}

.results-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--white);
    border-radius: var(--radius-md);
    padding: 20px;
    text-align: center;
    border: 1px solid var(--gray-200);
}

.stat-value {
    font-size: 2rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--gray-500);
    margin-top: 4px;
}

.chart-container {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 28px;
    border: 1px solid var(--gray-200);
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
}

.chart-container h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 20px;
}

.chart-canvas-wrapper {
    position: relative;
    width: 100%;
    max-width: 100%;
}

.chart-canvas-wrapper canvas {
    width: 100% !important;
    height: auto !important;
}

/* --- Share & Embed --- */
.share-box {
    background: var(--gray-50);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-top: 20px;
}

.share-box h4 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--gray-700);
    margin-bottom: 12px;
}

.share-input-group {
    display: flex;
    gap: 8px;
}

.share-input-group input {
    flex: 1;
    padding: 10px 14px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-family: monospace;
    color: var(--gray-600);
    background: var(--white);
    outline: none;
}

.share-input-group input:focus {
    border-color: var(--purple-400);
}

.copy-btn {
    padding: 10px 18px;
    background: var(--gradient-btn);
    color: var(--white);
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    white-space: nowrap;
    transition: all var(--transition-fast);
    font-family: var(--font-sans);
}

.copy-btn:hover {
    opacity: 0.9;
}

.copy-btn.copied {
    background: var(--gradient-teal-btn);
}

/* --- Badge / Tag --- */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-active {
    background: #dcfce7;
    color: #16a34a;
}

.badge-inactive {
    background: var(--gray-100);
    color: var(--gray-500);
}

.badge-purple {
    background: var(--purple-100);
    color: var(--purple-700);
}

/* --- Alerts / Toast --- */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    padding: 14px 24px;
    border-radius: var(--radius-md);
    color: var(--white);
    font-weight: 600;
    font-size: 0.95rem;
    z-index: 9999;
    transform: translateY(100px);
    opacity: 0;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-lg);
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast-success { background: #16a34a; }
.toast-error { background: #ef4444; }
.toast-info { background: var(--purple-600); }

/* --- Loading Spinner --- */
.spinner {
    width: 36px;
    height: 36px;
    border: 3px solid var(--gray-200);
    border-top-color: var(--purple-500);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255,255,255,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9998;
    backdrop-filter: blur(4px);
}

/* --- Bar Chart Animation --- */
@keyframes barGrow {
    from {
        width: 0;
    }
    to {
        width: var(--bar-width, 0%);
    }
}

.result-bar-fill.animate {
    animation: barGrow 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* --- Empty State --- */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state-icon {
    font-size: 3rem;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--gray-700);
    margin-bottom: 8px;
}

.empty-state p {
    color: var(--gray-400);
    margin-bottom: 24px;
}

/* --- Footer --- */
.footer {
    background: var(--gray-900);
    color: var(--gray-400);
    padding: 48px 0 24px;
    margin-top: auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 32px;
}

.footer-title {
    color: var(--white);
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.footer-text {
    font-size: 0.9rem;
    line-height: 1.6;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 8px;
}

.footer-links a {
    color: var(--gray-400);
    font-size: 0.9rem;
    transition: color var(--transition-fast);
}

.footer-links a:hover {
    color: var(--white);
}

.footer-bottom {
    border-top: 1px solid var(--gray-700);
    padding-top: 20px;
    text-align: center;
    font-size: 0.85rem;
}

/* --- Utility --- */
.text-center { text-align: center; }
.text-purple { color: var(--purple-600); }
.text-teal { color: var(--teal-600); }
.text-gray { color: var(--gray-500); }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }
.hidden { display: none !important; }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.gap-2 { gap: 16px; }
.gap-1 { gap: 8px; }

/* --- Responsive --- */
@media (max-width: 768px) {
    .hero {
        padding: 60px 0 80px;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .results-stats {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .navbar-menu {
        display: none;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        padding: 16px;
        border-bottom: 1px solid var(--gray-200);
        box-shadow: var(--shadow-md);
    }

    .navbar-menu.open {
        display: flex;
    }

    .navbar-toggle {
        display: flex;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .builder-card {
        padding: 20px;
    }

    .question-block {
        padding: 16px;
    }

    .demo-poll {
        padding: 24px;
    }

    .share-input-group {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.65rem;
    }

    .section-title {
        font-size: 1.6rem;
    }

    .btn-lg {
        padding: 14px 28px;
        font-size: 1rem;
    }
}
