/*=========================
GLOBAL & BASE WARM LIGHT THEME
=========================*/
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

html {
    scroll-behavior: auto !important;
}

body {
    background: #fbf9f5;
    background-image: 
        radial-gradient(circle at 15% 50%, rgba(79, 70, 229, 0.05) 0%, transparent 40%),
        radial-gradient(circle at 85% 30%, rgba(217, 119, 6, 0.04) 0%, transparent 40%);
    color: #1e293b;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow-x: hidden;
    overflow-anchor: none;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: auto;
}

/*=========================
HEADER & NAVIGATION
=========================*/
header {
    background: #f3efe6;
    padding: 20px 0;
    border-bottom: 1px solid #e7dfd3;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo, .logo a {
    font-size: 28px;
    font-weight: 700;
    color: #0f172a;
    text-decoration: none;
    letter-spacing: -0.5px;
}

nav ul {
    display: flex;
    list-style: none;
    align-items: center;
}

nav li {
    margin-left: 28px;
}

nav a {
    text-decoration: none;
    color: #475569;
    font-weight: 500;
    font-size: 15px;
    transition: .3s;
    position: relative;
    padding-bottom: 6px;
}

nav a:hover {
    color: #0f172a;
}

nav a.active {
    color: #4f46e5;
    font-weight: 600;
}

nav a.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
    background: #4f46e5;
    border-radius: 50%;
    box-shadow: 0 0 6px rgba(79, 70, 229, 0.4);
}

.register-btn {
    background: linear-gradient(135deg, #4f46e5, #6366f1);
    color: #ffffff !important;
    padding: 10px 24px;
    border-radius: 30px;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.25);
    transition: 0.3s;
}

.register-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.35);
}

.btn {
    display: inline-block;
    padding: 14px 32px;
    background: linear-gradient(135deg, #4f46e5, #4338ca);
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
    border-radius: 40px;
    transition: .3s;
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.2);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 25px rgba(79, 70, 229, 0.3);
}

/*=========================
HERO SECTION
=========================*/
.hero {
    background: transparent;
    color: #1e293b;
    padding: 50px 0 60px;
}

.hero-container {
    display: flex;
    justify-content: center;
    text-align: center;
}

.hero-left {
    max-width: 900px;
}

.hero-left h1 {
    font-size: 56px;
    line-height: 1.15;
    margin: 22px 0;
    font-weight: 700;
    color: #0f172a;
}

.hero-left p {
    max-width: 760px;
    margin: 0 auto;
    font-size: 20px;
    line-height: 1.9;
    color: #475569;
}

.hero-badge {
    display: inline-block;
    background: rgba(79, 70, 229, 0.08);
    border: 1px solid rgba(79, 70, 229, 0.2);
    padding: 10px 18px;
    border-radius: 50px;
    font-size: 15px;
    color: #4f46e5;
    font-weight: 600;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 35px;
    flex-wrap: wrap;
}

.hero-start-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 16px 38px;
    background: linear-gradient(135deg, #4f46e5, #6366f1);
    color: #ffffff;
    text-decoration: none;
    font-weight: 700;
    border-radius: 50px;
    transition: .30s;
    box-shadow: 0 10px 25px rgba(79, 70, 229, 0.25);
}

.hero-start-btn:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 30px rgba(79, 70, 229, 0.35);
}

.hero-register-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 16px 38px;
    border: 2px solid #dcd3c3;
    color: #334155;
    text-decoration: none;
    font-weight: 700;
    border-radius: 50px;
    transition: .30s;
    background: #f3efe6;
}

.hero-register-btn:hover {
    background: #e7dfd3;
    border-color: #4f46e5;
    color: #4f46e5;
}

/*=========================
QUICK PRACTICE SECTION
=========================*/
.quick-panel, #practice {
    margin-top: 15px;
    margin-bottom: 0px !important;
    padding-bottom: 15px !important;
    position: relative;
    z-index: 10;
}

.quick-practice-card {
    background: #f3efe6;
    border-radius: 28px;
    padding: 35px 40px;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
    border: 1px solid #e7dfd3;
}

.quick-practice-card::before {
    content: "";
    position: absolute;
    inset: -1.5px;
    border-radius: 29px;
    padding: 1.5px;
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.3), rgba(217, 119, 6, 0.2));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.quick-header {
    text-align: center;
    margin-bottom: 25px;
}

.quick-tag {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 30px;
    background: rgba(79, 70, 229, 0.08);
    color: #4f46e5;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 12px;
    border: 1px solid rgba(79, 70, 229, 0.2);
}

.quick-header h2 {
    font-size: 40px;
    color: #0f172a;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.quick-header p {
    color: #64748b;
    font-size: 16px;
}

.practice-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.practice-item {
    display: flex;
    flex-direction: column;
}

.practice-item label {
    font-weight: 600;
    color: #334155;
    font-size: 15px;
    margin-bottom: 10px;
}

.practice-item select {
    width: 100%;
    height: 54px;
    padding: 0 16px;
    border: 1px solid #dcd3c3;
    border-radius: 12px;
    background: #fbf9f5;
    color: #0f172a;
    font-size: 15px;
    transition: .3s;
    cursor: pointer;
}

.practice-item select option {
    background: #fbf9f5;
    color: #0f172a;
}

.practice-item select:hover {
    border-color: #4f46e5;
}

.practice-item select:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.15);
}

/*=========================
FEATURE BADGES
=========================*/
.practice-features {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin: 25px 0 30px;
}

.practice-features span {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 18px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #334155;
    background: #fbf9f5;
    border: 1px solid #e7dfd3;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.02);
}

.practice-features .check-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    font-size: 0.8rem;
    font-weight: 800;
    transition: all 0.3s ease;
}

/* --- BADGE 1: Real Time WPM (Teal) --- */
.practice-features span:nth-child(1) {
    border-color: #99f6e4;
}
.practice-features span:nth-child(1) .check-icon {
    background: #ccfbf1;
    color: #0d9488;
}
.practice-features span:nth-child(1):hover {
    border-color: #0d9488;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(13, 148, 136, 0.15);
}

/* --- BADGE 2: Accuracy Report (Emerald) --- */
.practice-features span:nth-child(2) {
    border-color: #a7f3d0;
}
.practice-features span:nth-child(2) .check-icon {
    background: #d1fae5;
    color: #059669;
}
.practice-features span:nth-child(2):hover {
    border-color: #059669;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.15);
}

/* --- BADGE 3: Error Analysis (Amber) --- */
.practice-features span:nth-child(3) {
    border-color: #fde68a;
}
.practice-features span:nth-child(3) .check-icon {
    background: #fef3c7;
    color: #d97706;
}
.practice-features span:nth-child(3):hover {
    border-color: #d97706;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(217, 119, 6, 0.15);
}

/* --- BADGE 4: Instant Result (Indigo) --- */
.practice-features span:nth-child(4) {
    border-color: #c7d2fe;
}
.practice-features span:nth-child(4) .check-icon {
    background: #e0e7ff;
    color: #4f46e5;
}
.practice-features span:nth-child(4):hover {
    border-color: #4f46e5;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.15);
}

.practice-button {
    text-align: center;
}

.start-btn {
    background: linear-gradient(135deg, #4f46e5, #6366f1);
    color: #ffffff;
    border: none;
    padding: 16px 45px;
    border-radius: 50px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: .3s;
    box-shadow: 0 10px 25px rgba(79, 70, 229, 0.25);
}

.start-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(79, 70, 229, 0.35);
}

/*=========================
TYPING TEST PAGE
=========================*/
.top-bar {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100%;
    margin-top: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.test-options {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 15px;
    color: #475569;
}

.test-options select {
    background: #f3efe6;
    color: #0f172a;
    border: 1px solid #dcd3c3;
    border-radius: 8px;
    padding: 8px 15px;
    font-size: 15px;
    outline: none;
    cursor: pointer;
}

.typing-info {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 14px !important;
}

.info-box {
    background: #f3efe6;
    border: 1px solid #e7dfd3;
    padding: 10px 22px;
    border-radius: 14px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
    min-width: 110px;
    text-align: center;
    transition: 0.3s;
}

.info-box:hover {
    border-color: #4f46e5;
    transform: translateY(-2px);
}

.info-box h4 {
    font-size: 11px;
    color: #64748b;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-box h2 {
    font-size: 24px;
    font-weight: 700;
    color: #4f46e5;
    line-height: 1;
    margin: 0;
}

.start-hint {
    font-size: 15px;
    color: #475569;
    margin: 15px 0;
    display: flex;
    align-items: center;
    gap: 8px;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: .6; }
    50% { opacity: 1; }
}

.paragraph-wrapper {
    position: relative;
    width: 100%;
    background: #f3efe6;
    border-radius: 20px;
    padding: 24px 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
    border: 1px solid #e7dfd3;
    margin: 8px 0 25px 0;
}

.paragraph-wrapper::before {
    content: "";
    position: absolute;
    inset: -1.5px;
    border-radius: 21px;
    padding: 1.5px;
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.2), rgba(217, 119, 6, 0.15));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

#paragraph {
    position: relative;
    height: 220px;
    overflow-y: hidden;
    scroll-behavior: smooth;
    font-size: 20px;
    line-height: 42px;
    font-weight: 500;
    color: #64748b;
    text-align: justify;
    text-justify: inter-word;
    white-space: normal;
    word-break: normal;
    overflow-wrap: break-word;
    user-select: none;
    cursor: text;
}

#typingArea {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.01;
    color: transparent;
    caret-color: transparent;
    background: transparent;
    border: none;
    outline: none;
    resize: none;
    overflow: hidden;
    z-index: 2;
    padding: 0;
    font-size: 20px;
    line-height: 42px;
    font-weight: 500;
}

/* Typing text status highlights */
.correct { color: #15803d; }
.incorrect { color: #b91c1c; background: #fee2e2; border-radius: 3px; }
.pending { color: #64748b; }
.current {
    background: #e0e7ff;
    color: #4f46e5;
    border-bottom: 2px solid #4f46e5;
    border-radius: 2px;
}

#finishBtn {
    margin-top: 10px;
}

/*=========================
BLOG LIST PAGE
=========================*/
.blog-list-section {
    padding: 50px 0 80px;
    background: transparent;
}

.page-title {
    text-align: center;
    font-size: 44px;
    font-weight: 700;
    margin-bottom: 12px;
    color: #0f172a;
    letter-spacing: -0.5px;
}

.page-subtitle {
    text-align: center;
    font-size: 17px;
    color: #64748b;
    margin-bottom: 45px;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.blog-card {
    background: #f3efe6;
    border-radius: 20px;
    overflow: hidden !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.03);
    transition: all .35s ease;
    display: flex;
    flex-direction: column;
    border: 1px solid #e7dfd3;
}

.blog-card:hover {
    transform: translateY(-8px);
    border-color: #dcd3c3;
    box-shadow: 0 20px 35px rgba(79, 70, 229, 0.1);
}

.blog-card-image {
    width: 100%;
    height: 220px;
    object-fit: contain;
    object-position: center;
    background-color: #e7dfd3;
    display: block;
    border-bottom: 1px solid #dcd3c3;
    image-rendering: -webkit-optimize-contrast;
}

.blog-card-body {
    padding: 26px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.blog-card h2 {
    font-size: 20px;
    margin-bottom: 14px;
    color: #0f172a;
    line-height: 1.4;
    font-weight: 600;
}

.blog-card p {
    color: #475569;
    line-height: 1.7;
    margin-bottom: 25px;
    font-size: 14px;
}

.read-more {
    display: inline-block;
    align-self: flex-start;
    padding: 10px 24px;
    background: linear-gradient(135deg, #4f46e5, #6366f1);
    color: #ffffff;
    text-decoration: none;
    border-radius: 30px;
    font-weight: 600;
    font-size: 14px;
    transition: .3s;
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.2);
}

.read-more:hover {
    background: linear-gradient(135deg, #4338ca, #4f46e5);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.3);
}

.no-blog {
    grid-column: 1 / -1;
    background: #f3efe6;
    border: 1px solid #e7dfd3;
    padding: 50px;
    text-align: center;
    font-size: 20px;
    color: #64748b;
    border-radius: 16px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.02);
}

/*=========================
BLOG DETAILS PAGE
=========================*/
.blog-section {
    padding: 50px 0 80px;
    background: transparent;
}

.blog-header {
    text-align: center;
    margin-bottom: 35px;
}

.blog-header h1 {
    font-size: 42px;
    line-height: 1.25;
    margin-bottom: 14px;
    color: #0f172a;
    font-weight: 700;
}

.blog-meta {
    color: #64748b;
    font-size: 15px;
    margin-bottom: 25px;
}

.blog-image {
    display: block;
    width: 100%;
    max-width: 900px;
    max-height: 480px;
    object-fit: contain;
    background-color: #e7dfd3;
    margin: 30px auto;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
    border: 1px solid #dcd3c3;
    image-rendering: -webkit-optimize-contrast;
}

.blog-content {
    max-width: 900px;
    margin: auto;
    background: #f3efe6;
    padding: 40px 50px;
    border-radius: 20px;
    border: 1px solid #e7dfd3;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
    font-size: 17px;
    line-height: 1.8;
    color: #334155;
}

.blog-content h2 {
    font-size: 30px;
    margin-top: 35px;
    margin-bottom: 15px;
    color: #4f46e5;
    line-height: 1.3;
}

.blog-content h3 {
    font-size: 24px;
    margin-top: 28px;
    margin-bottom: 12px;
    color: #0f172a;
}

.blog-content p {
    margin-bottom: 18px;
    line-height: 1.8;
}

.blog-content ul, .blog-content ol {
    margin-left: 30px;
    margin-bottom: 25px;
}

.blog-content li {
    margin-bottom: 8px;
    line-height: 1.7;
}

.blog-content strong {
    color: #0f172a;
}

.blog-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 30px 0;
}

.blog-content table th {
    background: #e7dfd3;
    color: #0f172a;
    padding: 15px;
    border: 1px solid #dcd3c3;
}

.blog-content table td {
    padding: 15px;
    border: 1px solid #dcd3c3;
    color: #334155;
}

.blog-content img {
    max-width: 100%;
    border-radius: 14px;
    margin: 30px 0;
}

.blog-content blockquote {
    background: rgba(79, 70, 229, 0.05);
    padding: 20px 25px;
    border-left: 4px solid #4f46e5;
    border-radius: 0 12px 12px 0;
    margin: 30px 0;
    font-style: italic;
    color: #3730a3;
}

.blog-content a {
    color: #4f46e5;
    text-decoration: none;
    font-weight: 600;
}

.blog-content a:hover {
    text-decoration: underline;
}

/*=========================
CONTACT PAGE
=========================*/
.contact-section {
    padding: 70px 0;
    background: transparent;
}

.contact-card {
    max-width: 700px;
    margin: auto;
    background: #f3efe6;
    padding: 50px 45px;
    border-radius: 20px;
    border: 1px solid #e7dfd3;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
    text-align: center;
}

.contact-card h1 {
    font-size: 40px;
    color: #0f172a;
    margin-bottom: 18px;
}

.contact-text {
    font-size: 17px;
    color: #475569;
    line-height: 1.8;
    margin-bottom: 35px;
}

.contact-email {
    background: #fbf9f5;
    border: 1px solid #e7dfd3;
    border-radius: 14px;
    padding: 25px;
}

.contact-email h3 {
    font-size: 22px;
    color: #4f46e5;
    margin-bottom: 10px;
}

.contact-email a {
    font-size: 20px;
    font-weight: 600;
    color: #4338ca;
    text-decoration: none;
    word-break: break-word;
}

.contact-email a:hover {
    text-decoration: underline;
}

/*=========================
DASHBOARD & TABLES
=========================*/
.dashboard-grid, .cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 30px;
}

.dash-card, .card {
    background: #f3efe6;
    padding: 30px;
    border-radius: 16px;
    text-align: center;
    border: 1px solid #e7dfd3;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
}

.card h3 {
    margin-bottom: 15px;
    color: #64748b;
}

.card h1 {
    font-size: 42px;
    color: #4f46e5;
}

.table, .dashboard-table {
    width: 100%;
    border-collapse: collapse;
    background: #f3efe6;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e7dfd3;
}

.table th, .dashboard-table th {
    background: #e7dfd3;
    color: #0f172a;
    padding: 15px;
    font-weight: 600;
}

.table td, .dashboard-table td {
    padding: 12px;
    border-bottom: 1px solid #e7dfd3;
    text-align: center;
    color: #334155;
}

/*=========================
ADMIN PANEL
=========================*/
.admin-wrapper {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 260px;
    background: #f3efe6;
    border-right: 1px solid #e7dfd3;
    color: #0f172a;
    padding: 30px;
}

.sidebar h2 {
    margin-bottom: 15px;
    color: #4f46e5;
}

.admin-name {
    margin-bottom: 30px;
    padding: 12px;
    background: #fbf9f5;
    border-radius: 8px;
    color: #64748b;
}

.sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar li {
    margin: 12px 0;
}

.sidebar a {
    display: block;
    padding: 10px 12px;
    color: #475569;
    text-decoration: none;
    border-radius: 6px;
    transition: .3s;
}

.sidebar a:hover {
    background: #e7dfd3;
    color: #4f46e5;
}

.content {
    flex: 1;
    padding: 35px;
    background: transparent;
}

/*=========================
FOOTER
=========================*/
footer, .footer, .footer-minimal {
    background: #f3efe6;
    border-top: 1px solid #e7dfd3;
    color: #0f172a;
    padding-top: 10px !important;
    padding-bottom: 15px !important;
    margin-top: 0px !important;
}

.footer-minimal hr {
    margin-top: 0 !important;
    margin-bottom: 15px !important;
    border-color: #e7dfd3;
}

.footer-bottom {
    display: flex;
    justify-content: center;
    align-items: center;
    color: #64748b;
    font-size: 14px;
    text-align: center;
}

/*=========================
RESPONSIVE DESIGN
=========================*/
@media(max-width:992px) {
    .practice-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .dashboard-grid, .cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media(max-width:768px) {
    .top-bar {
        flex-direction: column !important;
        align-items: flex-start !important;
    }
    .typing-info {
        width: 100%;
        justify-content: space-between;
        gap: 8px !important;
    }
    .info-box {
        min-width: auto;
        flex: 1;
        padding: 6px 10px;
    }
    .page-title { font-size: 34px; }
    .page-subtitle { font-size: 16px; }
    .blog-grid { grid-template-columns: 1fr; }
    .blog-content { padding: 25px; }
    .blog-header h1 { font-size: 32px; }
    .practice-grid {
        grid-template-columns: 1fr;
    }
    .quick-practice-card {
        padding: 25px 20px;
    }
}

@media(max-width:600px) {
    .dashboard-grid, .cards {
        grid-template-columns: 1fr;
    }
}