@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: #333;
    overflow-x: hidden;
    background: #f8f9fa;
}

.nav-container, .content-container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

:root {
    --primary-color: #FFC107;
    --primary-dark: #FF8F00;
    --primary-light: #FFF9C4;
    --accent-color: #795548;
    --dark-color: #212121;
    --light-color: #f8f9fa;
    --white: #ffffff;
    --gray: #757575;
    --gradient-1: linear-gradient(135deg, #FFC107 0%, #FF8F00 100%);
    --gradient-2: linear-gradient(135deg, #FF8F00 0%, #FFC107 100%);
    --shadow-light: 0 8px 25px rgba(255, 193, 7, 0.15);
    --shadow-medium: 0 15px 35px rgba(255, 193, 7, 0.2);
    --shadow-heavy: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.programming-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -2;
    overflow: hidden;
}

.code-elements {
    position: absolute;
    width: 100%;
    height: 100%;
}

.code-element {
    position: absolute;
    opacity: 0.1;
    animation: float 20s infinite linear;
}

.code-element-1 {
    top: 10%;
    left: 10%;
    width: 60px;
    height: 60px;
    background: var(--gradient-1);
    border-radius: 50%;
    animation-delay: 0s;
}

.code-element-2 {
    top: 70%;
    left: 80%;
    width: 40px;
    height: 40px;
    background: var(--gradient-2);
    border-radius: 50%;
    animation-delay: -5s;
}

.code-element-3 {
    top: 20%;
    left: 60%;
    width: 80px;
    height: 80px;
    background: var(--primary-color);
    clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
    animation-delay: -10s;
}

.code-element-4 {
    top: 60%;
    left: 20%;
    width: 50px;
    height: 50px;
    background: var(--primary-dark);
    border-radius: 10px;
    animation-delay: -15s;
}

.code-element-5 {
    top: 40%;
    left: 90%;
    width: 30px;
    height: 30px;
    background: var(--gradient-1);
    clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
    animation-delay: -7s;
}

.code-element-6 {
    top: 80%;
    left: 50%;
    width: 70px;
    height: 70px;
    background: var(--gradient-2);
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    animation-delay: -12s;
}

.programming-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        linear-gradient(90deg, transparent 24%, rgba(255, 193, 7, 0.03) 25%, rgba(255, 193, 7, 0.03) 26%, transparent 27%, transparent 74%, rgba(255, 193, 7, 0.03) 75%, rgba(255, 193, 7, 0.03) 76%, transparent 77%, transparent),
        linear-gradient(0deg, transparent 24%, rgba(255, 193, 7, 0.03) 25%, rgba(255, 193, 7, 0.03) 26%, transparent 27%, transparent 74%, rgba(255, 193, 7, 0.03) 75%, rgba(255, 193, 7, 0.03) 76%, transparent 77%, transparent);
    background-size: 50px 50px;
}

.top-navigation {
    background: rgba(255, 255, 255);
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow-light);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.top-navigation .nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
}

.brand-logo {
    font-size: 28px;
    font-weight: 800;
    color: var(--primary-dark);
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.brand-image {
    width: 40px;
    height: 40px;
    object-fit: contain;
    border-radius: 8px;
    transition: all 0.3s ease;
    transform: scale(4.18);
    margin-left: 1.5em;
}

.brand-logo:hover {
    transform: scale(0.918);
    color: var(--primary-color);
}

.nav-menu {
    display: flex;
    gap: 30px;
    align-items: center;
}

.nav-menu a {
    text-decoration: none;
    color: var(--dark-color);
    font-weight: 500;
    position: relative;
    padding: 8px 0;
    transition: all 0.3s ease;
    font-size: 14px;
}

.nav-menu a:hover {
    color: var(--primary-dark);
    transform: translateY(-2px);
}

.nav-menu a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 3px;
    background: var(--gradient-1);
    bottom: 0;
    left: 0;
    transition: width 0.3s ease;
    border-radius: 2px;
}

.nav-menu a:hover::after {
    width: 100%;
}

.menu-toggle {
    display: none;
    cursor: pointer;
    padding: 5px;
    z-index: 1002;
}

.toggle-bar {
    width: 25px;
    height: 3px;
    background: var(--gradient-1);
    margin: 5px 0;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.languages-content {
    padding: 130px 0 60px;
    min-height: 100vh;
}

.languages-header {
    text-align: center;
    margin-bottom: 50px;
    animation: fadeInUp 1s ease;
}

.main-heading {
    font-size: 3rem;
    font-weight: 800;
    color: var(--primary-dark);
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
}

.main-heading::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--gradient-1);
    border-radius: 2px;
}

.header-description {
    font-size: 1.2rem;
    color: var(--gray);
    font-weight: 500;
    animation: fadeInUp 1s ease 0.2s both;
}

.language-search {
    max-width: 600px;
    margin: 0 auto 50px;
    animation: fadeInUp 1s ease 0.4s both;
}

.search-box {
    position: relative;
    background: var(--white);
    border-radius: 50px;
    box-shadow: var(--shadow-light);
    border: 2px solid transparent;
    transition: all 0.3s ease;
    overflow: hidden;
}

.search-box:hover {
    box-shadow: var(--shadow-medium);
    border-color: var(--primary-light);
}

.search-box:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(255, 193, 7, 0.2);
}

.search-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray);
    font-size: 18px;
    z-index: 2;
    transition: all 0.3s ease;
}

.search-box:focus-within .search-icon {
    color: var(--primary-dark);
    transform: translateY(-50%) scale(1.1);
}

.search-field {
    width: 100%;
    padding: 18px 60px 18px 55px;
    border: none;
    outline: none;
    font-size: 16px;
    font-family: 'Poppins', sans-serif;
    background: transparent;
    color: var(--dark-color);
    font-weight: 500;
}

.search-field::placeholder {
    color: var(--gray);
    font-weight: 400;
}

.clear-search {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--gradient-1);
    color: var(--white);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    font-size: 12px;
}

.clear-search.active {
    opacity: 1;
    visibility: visible;
}

.clear-search:hover {
    transform: translateY(-50%) scale(1.1);
    box-shadow: var(--shadow-light);
}

.search-counter {
    text-align: center;
    margin-top: 15px;
    color: var(--gray);
    font-size: 14px;
    font-weight: 500;
    opacity: 0.8;
}

.languages-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 25px;
    animation: fadeInUp 1s ease 0.6s both;
}

.language-card {
    background: var(--white);
    border-radius: 20px;
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: var(--shadow-light);
    transition: all 0.4s ease;
    cursor: pointer;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.language-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--gradient-1);
    opacity: 0.05;
    transition: left 0.4s ease;
    z-index: 1;
}

.language-card:hover::before {
    left: 0;
}

.language-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-heavy);
    border-color: var(--primary-color);
}

.language-icon {
    width: 80px;
    height: 80px;
    background: var(--gradient-1);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--white);
    transition: all 0.4s ease;
    position: relative;
    z-index: 2;
    flex-shrink: 0;
}

.language-card:hover .language-icon {
    transform: scale(1.1) rotate(5deg);
    box-shadow: var(--shadow-medium);
}

.language-details {
    flex: 1;
    position: relative;
    z-index: 2;
}

.language-title {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--primary-dark);
    margin-bottom: 8px;
    transition: all 0.3s ease;
}

.language-card:hover .language-title {
    transform: translateX(5px);
}

.language-summary {
    color: var(--gray);
    font-size: 0.95rem;
    line-height: 1.5;
    transition: all 0.3s ease;
}

.language-card:hover .language-summary {
    color: var(--dark-color);
    transform: translateX(5px);
}

.navigate-arrow {
    font-size: 1.2rem;
    color: var(--gray);
    transition: all 0.4s ease;
    position: relative;
    z-index: 2;
}

.language-card:hover .navigate-arrow {
    color: var(--primary-dark);
    transform: translateX(10px) scale(1.2);
}

.empty-results {
    text-align: center;
    padding: 80px 20px;
    animation: fadeInUp 0.5s ease;
}

.empty-content {
    max-width: 400px;
    margin: 0 auto;
}

.empty-content i {
    font-size: 4rem;
    color: var(--primary-light);
    margin-bottom: 30px;
}

.empty-content h3 {
    font-size: 1.8rem;
    color: var(--primary-dark);
    margin-bottom: 15px;
    font-weight: 600;
}

.empty-content p {
    color: var(--gray);
    font-size: 1.1rem;
}

.scroll-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: var(--gradient-1);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: var(--shadow-light);
    transition: all 0.4s ease;
    opacity: 0;
    visibility: hidden;
    z-index: 100;
}

.scroll-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-top:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: var(--shadow-medium);
}

@keyframes float {
    0% { transform: translateY(0px) rotate(0deg); }
    33% { transform: translateY(-20px) rotate(120deg); }
    66% { transform: translateY(20px) rotate(240deg); }
    100% { transform: translateY(0px) rotate(360deg); }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 193, 7, 0.7);
        transform: scale(1);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(255, 193, 7, 0);
        transform: scale(1.1);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 193, 7, 0);
        transform: scale(1);
    }
}

.language-card {
    opacity: 0;
    transform: translateY(20px);
    animation: cardFadeIn 0.5s ease forwards;
}

@keyframes cardFadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.language-card:nth-child(1) { animation-delay: 0.1s; }
.language-card:nth-child(2) { animation-delay: 0.2s; }
.language-card:nth-child(3) { animation-delay: 0.3s; }
.language-card:nth-child(4) { animation-delay: 0.4s; }
.language-card:nth-child(5) { animation-delay: 0.5s; }
.language-card:nth-child(6) { animation-delay: 0.6s; }
.language-card:nth-child(7) { animation-delay: 0.7s; }
.language-card:nth-child(8) { animation-delay: 0.8s; }
.language-card:nth-child(9) { animation-delay: 0.9s; }
.language-card:nth-child(10) { animation-delay: 1.0s; }
.language-card:nth-child(11) { animation-delay: 1.1s; }
.language-card:nth-child(12) { animation-delay: 1.2s; }

@media (max-width: 1024px) {
    .languages-list {
        grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
        gap: 20px;
    }
    
    .language-card {
        padding: 20px;
    }
    
    .language-icon {
        width: 70px;
        height: 70px;
        font-size: 1.8rem;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 90px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 90px);
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        padding-top: 50px;
        transition: all 0.5s ease;
        z-index: 999;
        gap: 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-menu a {
        font-size: 18px;
        margin: 15px 0;
        padding: 15px 20px;
        width: 90%;
        text-align: center;
        border-radius: 10px;
        transition: all 0.3s ease;
    }

    .nav-menu a:hover {
        background: var(--primary-light);
        color: var(--primary-dark);
        transform: translateY(0);
    }

    .menu-toggle {
        display: block;
    }

    .menu-toggle.active .toggle-bar:nth-child(1) {
        transform: rotate(45deg) translate(8px, 8px);
    }

    .menu-toggle.active .toggle-bar:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle.active .toggle-bar:nth-child(3) {
        transform: rotate(-45deg) translate(8px, -8px);
    }

    .languages-content {
        padding: 120px 0 60px;
    }

    .main-heading {
        font-size: 2.5rem;
        margin-bottom: 10px;
    }

    .header-description {
        font-size: 1.1rem;
    }

    .language-search {
        margin-bottom: 40px;
    }

    .search-field {
        font-size: 16px;
        padding: 16px 55px 16px 50px;
    }

    .search-icon {
        font-size: 16px;
        left: 18px;
    }

    .clear-search {
        right: 18px;
        width: 28px;
        height: 28px;
    }

    .languages-list {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .language-card {
        padding: 20px;
        gap: 15px;
    }

    .language-icon {
        width: 65px;
        height: 65px;
        font-size: 1.6rem;
        border-radius: 15px;
    }

    .language-title {
        font-size: 1.3rem;
    }

    .language-summary {
        font-size: 0.9rem;
    }

    .scroll-top {
        width: 55px;
        height: 55px;
        bottom: 25px;
        right: 25px;
        font-size: 1.3rem;
    }
}

@media (max-width: 480px) {
    .nav-container, .content-container {
        width: 95%;
        padding: 0 10px;
    }

    .top-navigation .nav-container {
        padding: 15px 15px;
    }

    .brand-logo {
        font-size: 24px;
    }

    .languages-content {
        padding: 110px 0 40px;
    }

    .languages-header {
        margin-bottom: 35px;
    }

    .main-heading {
        font-size: 2rem;
        line-height: 1.2;
    }

    .header-description {
        font-size: 1rem;
    }

    .language-search {
        margin-bottom: 30px;
    }

    .search-field {
        font-size: 15px;
        padding: 14px 50px 14px 45px;
    }

    .search-icon {
        font-size: 15px;
        left: 16px;
    }

    .clear-search {
        right: 16px;
        width: 26px;
        height: 26px;
        font-size: 11px;
    }

    .languages-list {
        gap: 12px;
    }

    .language-card {
        padding: 18px 15px;
        gap: 12px;
        border-radius: 15px;
    }

    .language-icon {
        width: 60px;
        height: 60px;
        font-size: 1.4rem;
        border-radius: 12px;
    }

    .language-title {
        font-size: 1.2rem;
        margin-bottom: 6px;
    }

    .language-summary {
        font-size: 0.85rem;
        line-height: 1.4;
    }

    .navigate-arrow {
        font-size: 1.1rem;
    }

    .empty-results {
        padding: 60px 15px;
    }

    .empty-content i {
        font-size: 3rem;
        margin-bottom: 20px;
    }

    .empty-content h3 {
        font-size: 1.5rem;
        margin-bottom: 10px;
    }

    .empty-content p {
        font-size: 1rem;
    }

    .scroll-top {
        width: 50px;
        height: 50px;
        bottom: 20px;
        right: 20px;
        font-size: 1.2rem;
    }
}

@media (max-width: 360px) {
    .main-heading {
        font-size: 1.8rem;
    }

    .language-search {
        margin-bottom: 25px;
    }

    .language-card {
        padding: 15px 12px;
    }

    .language-icon {
        width: 55px;
        height: 55px;
        font-size: 1.3rem;
    }

    .language-title {
        font-size: 1.1rem;
    }

    .language-summary {
        font-size: 0.8rem;
    }
}

.search-field:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.language-card:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.nav-menu a:focus,
.scroll-top:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

* {
    -webkit-tap-highlight-color: transparent;
}

html, body {
    max-width: 100vw;
    overflow-x: hidden;
}

.code-element,
.language-card,
.search-box {
    will-change: transform;
}

.languages-list.loading .language-card {
    opacity: 0.5;
    transform: scale(0.95);
}

.highlight {
    background: var(--primary-light);
    color: var(--primary-dark);
    font-weight: 600;
    padding: 2px 4px;
    border-radius: 4px;
}

.fade-in {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease forwards;
}

.slide-up {
    transform: translateY(100px);
    opacity: 0;
    animation: slideUp 0.8s ease forwards;
}

@keyframes slideUp {
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@media print {
    .programming-background,
    .code-elements,
    .programming-grid,
    .scroll-top {
        display: none;
    }
    
    .top-navigation {
        position: static;
        background: white;
        box-shadow: none;
    }
    
    .languages-content {
        padding-top: 0;
    }
    
    .language-card {
        break-inside: avoid;
        page-break-inside: avoid;
    }
}

.language-link {
    display: contents;
    text-decoration: none;
    color: inherit;
}

.help-link {
    cursor: help;
}

/* --- Premium Developer Profile Dashboard Styles --- */
.skills-dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 30px;
    max-width: 1100px;
    margin: 0 auto 50px;
    animation: fadeInUp 1s cubic-bezier(0.16, 1, 0.3, 1) both;
    padding: 0 20px;
}

@media (max-width: 900px) {
    .skills-dashboard-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

.skills-profile-card, .skills-goals-card {
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 24px;
    padding: 28px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.03), 0 1px 2px rgba(0, 0, 0, 0.01), inset 0 0 0 1px rgba(255,255,255,0.6);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.skills-profile-card:hover, .skills-goals-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 30px 60px rgba(255, 149, 0, 0.06), 0 2px 8px rgba(0, 0, 0, 0.02);
    border-color: rgba(255, 149, 0, 0.25);
}

/* Profile Header Section */
.profile-header {
    display: flex;
    align-items: center;
    gap: 20px;
}

.profile-avatar-wrap {
    position: relative;
    width: 68px;
    height: 68px;
    flex-shrink: 0;
}

.profile-avatar {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #212121 0%, #3a3a3a 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 1.6rem;
    z-index: 2;
    position: relative;
    border: 2px solid rgba(255, 255, 255, 0.8);
}

.profile-rank-glow {
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    z-index: 1;
    opacity: 0.85;
    animation: rotateGlow 8s linear infinite;
}

@keyframes rotateGlow {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.profile-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.profile-name-edit {
    display: flex;
    align-items: center;
    gap: 10px;
}

.profile-name {
    font-size: 1.4rem;
    font-weight: 800;
    color: #212121;
    letter-spacing: -0.3px;
    font-family: 'Poppins', sans-serif;
}

.profile-name-input {
    font-size: 1.3rem;
    font-weight: 800;
    color: #ff9500;
    border: none;
    border-bottom: 2px solid #ff9500;
    background: transparent;
    outline: none;
    width: 100%;
    padding: 2px 0;
    font-family: 'Poppins', sans-serif;
}

.edit-name-btn {
    background: none;
    border: none;
    color: #a2a2a2;
    cursor: pointer;
    font-size: 0.85rem;
    transition: color 0.2s, transform 0.2s;
    padding: 4px;
}

.edit-name-btn:hover {
    color: #ff9500;
    transform: scale(1.1);
}

.profile-rank-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    border: 1.5px solid transparent;
    width: fit-content;
}

.profile-stats-divider {
    height: 1px;
    background: rgba(0, 0, 0, 0.06);
    margin: 22px 0;
}

.profile-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    text-align: center;
}

.profile-stat-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.profile-stat-val {
    font-size: 1.35rem;
    font-weight: 800;
    color: #212121;
    font-family: 'Oxanium', sans-serif;
}

.profile-stat-lbl {
    font-size: 0.72rem;
    font-weight: 600;
    color: #888888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Goals Card styling */
.goals-card-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #ff9500;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.goals-rank-milestone {
    margin-bottom: 22px;
}

.goals-rank-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    font-weight: 600;
    color: #757575;
    margin-bottom: 8px;
}

.goals-progress-bar-wrap {
    height: 8px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 10px;
}

.goals-progress-bar-fill {
    height: 100%;
    border-radius: 10px;
    transition: width 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.goals-milestone-hint {
    font-size: 0.82rem;
    color: #555555;
    font-weight: 500;
    line-height: 1.4;
}

.goals-recommendation-section {
    margin-top: auto;
}

.recommendation-header {
    font-size: 0.75rem;
    font-weight: 700;
    color: #888888;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.recommendation-task-link {
    text-decoration: none !important;
    display: block;
}

.recommendation-task-card {
    background: rgba(0,0,0,0.02);
    border: 1px dashed rgba(255, 149, 0, 0.2);
    border-radius: 16px;
    padding: 14px 18px;
    display: flex;
    gap: 14px;
    align-items: center;
    transition: all 0.3s ease;
}

.recommendation-task-card:hover {
    background: rgba(255, 149, 0, 0.03);
    border-color: #ff9500;
    transform: scale(1.01);
}

.task-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: rgba(255, 149, 0, 0.1);
    color: #ff9500;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.task-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.task-text {
    font-size: 0.85rem;
    font-weight: 600;
    color: #212121;
    margin: 0;
    line-height: 1.35;
}

.task-action-btn {
    font-size: 0.75rem;
    font-weight: 700;
    color: #ff9500;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 2px;
}

/* Card Badge Completed */
.card-completed-badge-glowing {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #10b981;
    color: #ffffff;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
    z-index: 10;
}

/* --- Premium Language Card Re-Architecture --- */
.language-card {
    background: var(--white);
    border-radius: 24px;
    padding: 26px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.02), 0 1px 3px rgba(0, 0, 0, 0.01);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
    border: 2px solid rgba(0, 0, 0, 0.03) !important;
    position: relative;
    overflow: hidden;
    gap: 0 !important; /* Eliminate old spacing conflicts */
}

/* Hover effects */
.language-card:hover {
    transform: translateY(-6px) scale(1.01) !important;
    box-shadow: 0 20px 40px rgba(255, 193, 7, 0.06), 0 2px 8px rgba(0, 0, 0, 0.01) !important;
    border-color: var(--primary-color) !important;
}

.language-card:hover .card-icon-box {
    transform: scale(1.08) rotate(3deg);
}

.language-card:hover .card-title-heading {
    transform: translateX(3px);
}

.language-card:hover .card-action-arrow {
    color: var(--primary-dark) !important;
    transform: translateX(4px) scale(1.1);
}

/* TOP SECTION */
.card-top-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    width: 100%;
}

.card-identity-wrap {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
    min-width: 0;
}

.card-icon-box {
    width: 54px;
    height: 54px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.card-title-wrap {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.card-title-heading {
    font-size: 1.25rem;
    font-weight: 700;
    color: #212121;
    margin: 0;
    line-height: 1.2;
    transition: transform 0.3s ease;
}

.card-desc-summary {
    font-size: 0.85rem;
    color: #757575;
    margin: 0;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
}

.card-action-arrow {
    font-size: 1.1rem;
    color: #bdbdbd;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    flex-shrink: 0;
}

/* MIDDLE SECTION */
.card-middle-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-top: 1px dashed rgba(0, 0, 0, 0.06);
    border-bottom: 1px dashed rgba(0, 0, 0, 0.06);
    margin-top: 16px;
}

.card-badge-label {
    font-size: 0.72rem;
    font-weight: 600;
    color: #9e9e9e;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.card-level-badge {
    padding: 4px 10px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
}

/* PROGRESS STATS GRID */
.card-progress-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
    margin-top: 16px;
    text-align: center;
}

.card-stat-box {
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: rgba(0, 0, 0, 0.015);
    padding: 8px 4px;
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, 0.02);
}

.card-stat-number {
    font-size: 1.05rem;
    font-weight: 700;
    color: #212121;
}

.card-stat-label {
    font-size: 0.68rem;
    font-weight: 600;
    color: #9e9e9e;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* BOTTOM SECTION */
.card-bottom-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 18px;
}

.card-progress-bar-wrapper {
    height: 6px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 10px;
    overflow: hidden;
    width: 100%;
}

.card-progress-bar-fill {
    height: 100%;
    border-radius: 10px;
    transition: width 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.card-next-milestone-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.75rem;
    color: #757575;
    font-weight: 500;
}

/* 100% Completed Glowing Border Override */
.language-card:has(.card-completed-badge-glowing) {
    border-color: #10b981 !important;
    box-shadow: 0 10px 30px rgba(16, 185, 129, 0.08) !important;
}

.language-card:hover:has(.card-completed-badge-glowing) {
    box-shadow: 0 20px 40px rgba(16, 185, 129, 0.15) !important;
}