html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}

.advisor-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 70px 20px;
}

.hero-section {
    text-align: center;
    margin-bottom: 45px;
}

.badge {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.5px;
    background: #f1f5f9;
    color: #475569;
}

.hero-section h1 {
    font-size: 56px;
    line-height: 1.05;
    margin: 25px 0 20px;
    font-weight: 800;
}

    .hero-section h1 span {
        color: #6366f1;
    }

.hero-description {
    max-width: 650px;
    margin: auto;
    font-size: 18px;
    line-height: 1.7;
    color: #64748b;
}

.prompt-card {
    max-width: 800px;
    margin: auto;
    background: white;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.08);
}

    .prompt-card label {
        display: block;
        font-weight: 700;
        margin-bottom: 12px;
    }

    .prompt-card textarea {
        width: 100%;
        border: 1px solid #e2e8f0;
        border-radius: 14px;
        padding: 18px;
        font-size: 16px;
        resize: vertical;
        outline: none;
    }

        .prompt-card textarea:focus {
            border-color: #6366f1;
        }

.analyze-button {
    width: 100%;
    margin-top: 20px;
    border: none;
    border-radius: 12px;
    padding: 15px;
    background: #6366f1;
    color: white;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
}

    .analyze-button:hover {
        background: #4f46e5;
    }

.validation-message {
    color: #dc2626;
    font-size: 14px;
}

.advisor-navbar {
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    padding: 14px 0;
}

.advisor-brand {
    font-size: 20px;
    font-weight: 800;
    color: #111827 !important;
}

.brand-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    margin-right: 8px;
    border-radius: 10px;
    background: #6366f1;
    color: white;
    font-size: 17px;
}

.advisor-navbar .nav-link {
    color: #64748b !important;
    font-weight: 600;
    margin-left: 20px;
}

    .advisor-navbar .nav-link:hover {
        color: #6366f1 !important;
    }

.improved-prompt-content {
    margin-top: 25px;
    padding: 28px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
}

    .improved-prompt-content pre {
        margin: 0;
        white-space: pre-wrap;
        word-wrap: break-word;
        font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
        font-size: 15px;
        line-height: 1.8;
        color: #334155;
        background: transparent;
    }

.analysis-page {
    max-width: 1100px;
    margin: 0 auto;
    padding: 60px 20px 100px;
}

.analysis-title {
    margin-bottom: 40px;
}

.page-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.5px;
    color: #6366f1;
    margin-bottom: 12px;
}

.analysis-title h1 {
    font-size: 42px;
    font-weight: 800;
    margin: 0 0 12px;
}

.analysis-title p {
    color: #64748b;
    font-size: 17px;
}

.analysis-score-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 35px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 22px;
    margin-bottom: 50px;
}

.section-label {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 1px;
    color: #64748b;
}

.score-content h2 {
    font-size: 54px;
    margin: 8px 0;
}

    .score-content h2 small {
        font-size: 20px;
        color: #94a3b8;
    }

.score-content p {
    color: #64748b;
}

.score-low {
    color: #ef4444;
}

.score-medium {
    color: #f59e0b;
}

.score-good {
    color: #10b981;
}

.score-ring {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 8px solid currentColor;
    font-size: 28px;
    font-weight: 800;
}

.section-heading {
    margin-bottom: 20px;
}

    .section-heading h2 {
        font-size: 24px;
        margin-bottom: 5px;
    }

    .section-heading p {
        color: #64748b;
    }

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin-bottom: 50px;
}

.metric-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 22px;
}

    .metric-card span {
        display: block;
        color: #64748b;
        font-size: 14px;
    }

    .metric-card strong {
        display: block;
        font-size: 30px;
        margin: 8px 0;
    }

.metric-bar {
    height: 6px;
    background: #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
}

    .metric-bar div {
        height: 100%;
        background: #6366f1;
    }

.task-card {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    margin-bottom: 50px;
}

.task-item {
    padding: 24px;
    border-right: 1px solid #e5e7eb;
}

    .task-item:last-child {
        border-right: none;
    }

    .task-item span {
        display: block;
        font-size: 13px;
        color: #64748b;
        margin-bottom: 8px;
    }

    .task-item strong {
        font-size: 16px;
    }

.two-column-section {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 50px;
}

.content-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    padding: 25px;
}

.card-heading {
    display: flex;
    gap: 14px;
    align-items: center;
    margin-bottom: 20px;
}

    .card-heading h3 {
        margin: 0;
    }

    .card-heading p {
        margin: 4px 0 0;
        color: #64748b;
        font-size: 13px;
    }

.card-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: #eef2ff;
    color: #6366f1;
    font-weight: 800;
}

.clean-list {
    padding: 0;
    margin: 0;
    list-style: none;
}

    .clean-list li {
        display: flex;
        gap: 10px;
        margin-bottom: 12px;
        color: #475569;
        line-height: 1.5;
    }

        .clean-list li span {
            color: #6366f1;
            font-weight: 800;
        }

.improved-prompt-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 22px;
    padding: 30px;
}

.improved-prompt-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

    .improved-prompt-header h2 {
        margin: 0 0 5px;
    }

    .improved-prompt-header p {
        color: #64748b;
        margin: 0;
    }

.copy-button {
    border: none;
    background: #6366f1;
    color: white;
    padding: 11px 18px;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
}

    .copy-button:hover {
        background: #4f46e5;
    }

@media (max-width: 768px) {

    .analysis-page {
        padding: 40px 15px 70px;
    }

    .analysis-title h1 {
        font-size: 32px;
    }

    .analysis-score-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 25px;
    }

    .metrics-grid {
        grid-template-columns: 1fr;
    }

    .task-card {
        grid-template-columns: 1fr;
    }

    .task-item {
        border-right: none;
        border-bottom: 1px solid #e5e7eb;
    }

        .task-item:last-child {
            border-bottom: none;
        }

    .two-column-section {
        grid-template-columns: 1fr;
    }

    .improved-prompt-header {
        flex-direction: column;
        gap: 20px;
    }

    .copy-button {
        width: 100%;
    }
}

.improved-prompt-content {
    margin-top: 25px;
    padding: 30px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    color: #334155;
}

    .improved-prompt-content h1,
    .improved-prompt-content h2,
    .improved-prompt-content h3,
    .improved-prompt-content h4 {
        color: #0f172a;
        margin-top: 24px;
        margin-bottom: 10px;
        font-weight: 700;
    }

        .improved-prompt-content h1:first-child,
        .improved-prompt-content h2:first-child,
        .improved-prompt-content h3:first-child {
            margin-top: 0;
        }

    .improved-prompt-content p {
        margin-bottom: 15px;
        line-height: 1.75;
    }

    .improved-prompt-content ul,
    .improved-prompt-content ol {
        margin: 12px 0 20px;
        padding-left: 25px;
    }

    .improved-prompt-content li {
        margin-bottom: 8px;
        line-height: 1.6;
    }

    .improved-prompt-content strong {
        color: #111827;
        font-weight: 700;
    }

    .improved-prompt-content code {
        padding: 3px 6px;
        border-radius: 5px;
        background: #e2e8f0;
        font-size: 13px;
    }

    .improved-prompt-content blockquote {
        margin: 20px 0;
        padding: 12px 18px;
        border-left: 4px solid #6366f1;
        background: #eef2ff;
        color: #475569;
    }

.history-page {
    max-width: 1050px;
    margin: 0 auto;
    padding: 60px 20px 100px;
}

.history-header {
    margin-bottom: 40px;
}

    .history-header h1 {
        font-size: 42px;
        font-weight: 800;
        margin: 0 0 10px;
    }

    .history-header p {
        color: #64748b;
        font-size: 17px;
    }

.history-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.history-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    padding: 24px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

    .history-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    }

.history-card-content {
    min-width: 0;
}

.history-prompt {
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.history-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 12px;
    color: #64748b;
    font-size: 13px;
}

.history-status {
    padding: 4px 10px;
    background: #eef2ff;
    color: #6366f1;
    border-radius: 20px;
    font-weight: 600;
}

.history-action {
    flex-shrink: 0;
}

.history-view-button {
    display: inline-block;
    padding: 10px 16px;
    border-radius: 10px;
    background: #6366f1;
    color: white !important;
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
}

    .history-view-button:hover {
        background: #4f46e5;
    }

.empty-history {
    text-align: center;
    padding: 80px 20px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 22px;
}

.empty-history-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    background: #eef2ff;
    color: #6366f1;
    font-size: 25px;
}

.empty-history h2 {
    margin-bottom: 8px;
}

.empty-history p {
    color: #64748b;
    margin-bottom: 25px;
}

.history-primary-button {
    display: inline-block;
    padding: 12px 20px;
    background: #6366f1;
    color: white !important;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 700;
}

.history-error {
    margin-bottom: 20px;
    padding: 14px 18px;
    border-radius: 10px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
}

@media (max-width: 768px) {

    .history-page {
        padding: 40px 15px 70px;
    }

    .history-header h1 {
        font-size: 32px;
    }

    .history-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .history-action {
        width: 100%;
    }

    .history-view-button {
        width: 100%;
        text-align: center;
    }
}

/* Mobile Navbar */
@media (max-width: 991.98px) {

    .advisor-navbar {
        padding: 12px 0;
    }

    .advisor-navbar .navbar-collapse {
        margin-top: 15px;
        padding: 10px 0;
        border-top: 1px solid #e5e7eb;
    }

    .advisor-navbar .navbar-nav {
        width: 100%;
    }

    .advisor-navbar .nav-item {
        width: 100%;
    }

    .advisor-navbar .nav-link {
        display: block;
        margin-left: 0;
        padding: 12px 10px;
        border-radius: 8px;
    }

    .advisor-navbar .nav-link:hover {
        background: #f8fafc;
    }

    .advisor-navbar .navbar-toggler {
        border: 1px solid #e5e7eb;
        border-radius: 8px;
        padding: 7px 10px;
    }

    .advisor-navbar .navbar-toggler:focus {
        box-shadow: 0 0 0 0.15rem rgba(99, 102, 241, 0.25);
    }
}