/* Inter Font - Self-hosted */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('/static/fonts/inter-400.ttf') format('truetype');
}

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('/static/fonts/inter-500.ttf') format('truetype');
}

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('/static/fonts/inter-600.ttf') format('truetype');
}

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('/static/fonts/inter-700.ttf') format('truetype');
}

:root {
    /* Brand Colors */
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --primary-light: #eef2ff;

    /* Neutral Palette */
    --slate-50: #f8fafc;
    --slate-100: #f1f5f9;
    --slate-200: #e2e8f0;
    --slate-600: #475569;
    --slate-900: #0f172a;

    /* Semantic Colors */
    --error: #ef4444;
    --success: #10b981;
    --warning: #f59e0b;

    /* UI Elements */
    --bg-body: var(--slate-50);
    --bg-card: #ffffff;
    --text-main: var(--slate-900);
    --text-muted: var(--slate-600);
    --border-color: var(--slate-200);

    /* Effects */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --radius-md: 12px;
    --radius-lg: 16px;
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

.container {
    max-width: 640px;
    width: 100%;
    margin: 60px auto;
    padding: 0 1.5rem;
}

/* Typography */
h1 {
    font-size: clamp(1.5rem, 5vw, 1.875rem);
    font-weight: 700;
    letter-spacing: -0.025em;
    color: var(--slate-900);
    margin-bottom: 0.5rem;
}

.subtitle {
    color: var(--text-muted);
    font-size: clamp(0.9rem, 2.5vw, 1rem);
    margin-bottom: 2rem;
}

/* Info Banner */
.info-banner {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
    border: 1px solid #c7d2fe;
    border-radius: var(--radius-lg);
    padding: 1.25rem 1.5rem;
    margin-bottom: 2rem;
}

.info-icon {
    width: 24px;
    height: 24px;
    color: var(--primary);
    flex-shrink: 0;
    margin-top: 2px;
}

.info-content {
    color: var(--slate-900);
    font-size: 0.9375rem;
    line-height: 1.6;
}

.info-content strong {
    color: var(--primary);
    font-weight: 600;
}

/* How It Works Section */
.how-it-works {
    margin-top: 3rem;
    padding-top: 3rem;
    border-top: 1px solid var(--border-color);
}

.how-it-works h2 {
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 2.5rem;
    color: var(--slate-900);
}

.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 2rem;
}

.step {
    text-align: center;
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
    color: white;
    border-radius: 50%;
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.2);
}

.step h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--slate-900);
}

.step p {
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.6;
}


/* Header & Branding */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.brand-name {
    font-weight: 800;
    font-size: 1.25rem;
    color: var(--primary);
    text-decoration: none;
}

.brand-logo {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

/* Cards */
.card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 2.5rem;
    border: 1px solid var(--border-color);
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--slate-900);
}

input[type="url"],
textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 1rem;
    color: var(--slate-900);
    transition: var(--transition);
}

input[type="url"]:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-light);
}

.hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.4rem;
}

.hint.limit {
    color: var(--error);
    font-weight: 600;
}

.error {
    color: var(--error);
    font-size: 0.875rem;
    margin-top: 0.5rem;
    display: none;
}

/* Buttons */
.actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 2rem;
}

button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    border: none;
}

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

.primary-btn:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.2);
}

.secondary-btn {
    background-color: var(--slate-100);
    color: var(--slate-900);
    border: 1px solid var(--border-color);
    flex: 1;
}

.secondary-btn:hover {
    background-color: var(--slate-200);
}

/* Messages */
.message {
    margin-top: 1.5rem;
    padding: 1rem;
    border-radius: var(--radius-md);
    font-weight: 500;
    display: none;
}

.message.success {
    background-color: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.message.error {
    background-color: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* Dashboard & Cards */
.feedback-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    transition: var(--transition);
}

.feedback-card:hover {
    box-shadow: var(--shadow-md);
}

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

.feedback-date {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-muted);
}

.feedback-content {
    font-size: 1rem;
    color: var(--slate-900);
    margin-bottom: 0.75rem;
}

.feedback-content.blurred {
    filter: blur(12px);
    user-select: none;
    pointer-events: none;
    background: var(--slate-50);
    border-radius: var(--radius-md);
    padding: 1rem;
    margin-top: 0.5rem;
    opacity: 0.7;
}

/* Sentiment Badges */
.sentiment-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.025em;
    text-transform: uppercase;
}

.sentiment-very-positive {
    background-color: #dcfce7;
    color: #166534;
}

.sentiment-positive {
    background-color: #f0fdf4;
    color: #15803d;
}

.sentiment-neutral {
    background-color: #f1f5f9;
    color: #475569;
}

.sentiment-negative {
    background-color: #fef2f2;
    color: #991b1b;
}

.sentiment-very-negative {
    background-color: #fee2e2;
    color: #b91c1c;
}

/* Dashboard Actions */
.card-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.reveal-btn {
    background-color: var(--primary);
    color: white;
    padding: 0.4rem 1rem;
    font-size: 0.875rem;
    border-radius: var(--radius-md);
    width: auto;
    min-width: 70px;
}

.reveal-btn.secondary-btn {
    background-color: var(--slate-100);
    color: var(--slate-600);
}

.nav-link {
    font-weight: 600;
    color: var(--primary);
    text-decoration: none;
    font-size: 0.875rem;
}

.nav-link.logout {
    color: var(--error);
}

.nav-link:hover {
    text-decoration: underline;
}

/* Dashboard Specific Styles */
.dashboard-nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.dashboard-info {
    margin-bottom: 2rem;
}

.profile-url {
    word-break: break-all;
    color: var(--primary);
    font-weight: 600;
}

.delete-btn {
    background-color: transparent;
    color: var(--slate-400);
    font-size: 1.75rem;
    padding: 0.25rem 0.5rem;
    width: auto;
    transition: var(--transition);
    line-height: 1;
}

.delete-btn:hover {
    color: var(--error);
    transform: scale(1.1);
}

/* Responsive LinkedIn Button Redesign */
.linkedin-signin-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    background-color: var(--primary);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    white-space: nowrap;
}

.linkedin-signin-btn:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.2);
    text-decoration: none;
}

.linkedin-icon {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

/* Override for mock login or full-width needs */
.linkedin-signin-btn.w-full {
    width: 100%;
}

@media (max-width: 600px) {
    header {
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
        margin-bottom: 2rem;
        gap: 0.5rem;
    }

    .logo-container {
        flex-shrink: 0;
        gap: 0.3rem;
    }

    .brand-logo {
        width: 32px;
        height: 32px;
    }

    .brand-name {
        font-size: 1rem;
    }

    .linkedin-signin-btn {
        padding: 0.625rem 1rem;
        font-size: 0.875rem;
        gap: 0.5rem;
        flex-shrink: 0;
    }

    .linkedin-icon {
        width: 18px;
        height: 18px;
    }

    .container {
        padding: 0 1rem;
        margin: 40px auto;
    }

    .card {
        padding: 1.5rem 1rem;
    }

    .feedback-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .card-actions {
        width: 100%;
        justify-content: space-between;
    }

    .info-banner {
        padding: 1rem;
        gap: 0.75rem;
    }

    .info-icon {
        width: 20px;
        height: 20px;
    }

    .info-content {
        font-size: 0.875rem;
    }

    .steps {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .how-it-works h2 {
        font-size: 1.25rem;
    }

    /* Dashboard mobile improvements */
    .dashboard-nav {
        gap: 0.5rem;
        flex-shrink: 0;
    }

    .dashboard-nav .nav-link {
        font-size: 0.75rem;
        padding: 0.375rem 0.5rem;
        white-space: nowrap;
    }

    .dashboard-info h1 {
        font-size: 1.5rem;
    }

    .feedback-card {
        padding: 1.25rem;
    }

    .feedback-date {
        font-size: 0.75rem;
    }

    .sentiment-badge {
        font-size: 0.6875rem;
        padding: 0.2rem 0.625rem;
    }

    .reveal-btn {
        padding: 0.375rem 0.875rem;
        font-size: 0.8125rem;
        min-width: 65px;
    }

    .delete-btn {
        font-size: 1.5rem;
    }
}

@media (max-width: 640px) {
    .container {
        margin: 20px auto;
    }

    .card {
        padding: 1.5rem;
    }

    .actions {
        flex-direction: column;
    }
}

/* Extra small screens - more compact button */
@media (max-width: 400px) {
    .brand-name {
        font-size: 1rem;
    }

    .linkedin-signin-btn {
        padding: 0.5rem 0.875rem;
        font-size: 0.8125rem;
    }

    .linkedin-signin-btn span {
        display: none;
    }

    .linkedin-signin-btn::after {
        content: 'View';
    }

    /* Dashboard extra small optimizations */
    .dashboard-nav .nav-link {
        font-size: 0.6875rem;
        padding: 0.25rem 0.375rem;
    }

    .brand-name {
        font-size: 0.875rem;
    }

    .brand-logo {
        width: 28px;
        height: 28px;
    }
}