:root {
    --soft-red-50: #FFF5F5;
    --soft-red-100: #FED7D7;
    --soft-red-200: #FEB2B2;
    --soft-red-300: #FC8181;
    --soft-red-400: #F56565;
    --soft-red-500: #E53E3E;
    --soft-red-600: #C53030;
    --soft-red-700: #9B2C2C;
    --soft-red-800: #822727;
    --soft-red-900: #63171B;
    
    --primary: #E53E3E;
    --primary-light: #F56565;
    --secondary: #C53030;
    --secondary-light: #9B2C2C;
    --accent: #FEB2B2;
    --success: #9AE6B4;
    --danger: #FC8181;
    
    --transition: all 0.3s ease;
    --radius: 20px;
}

.light-mode {
    --bg-primary: #FFF5F5;
    --bg-secondary: #FFFFFF;
    --bg-card: #FFFFFF;
    --text-primary: #742A2A;
    --text-secondary: #9B2C2C;
    --border: #FED7D7;
    --shadow: 0 10px 30px rgba(229, 62, 62, 0.1);
    --shadow-hover: 0 20px 40px rgba(229, 62, 62, 0.15);
    --nav-bg: rgba(255, 245, 245, 0.9);
    --nav-hover: rgba(229, 62, 62, 0.05);
    --nav-active: rgba(229, 62, 62, 0.1);
    --game-bg: linear-gradient(145deg, #FFF5F5, #FFFFFF);
    --game-card-bg: rgba(255, 255, 255, 0.95);
    --game-text: #742A2A;
}

.dark-mode {
    --bg-primary: #63171B;
    --bg-secondary: #742A2A;
    --bg-card: #822727;
    --text-primary: #FED7D7;
    --text-secondary: #FEB2B2;
    --border: #9B2C2C;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    --shadow-hover: 0 20px 40px rgba(0, 0, 0, 0.4);
    --nav-bg: rgba(99, 23, 27, 0.95);
    --nav-hover: rgba(229, 62, 62, 0.2);
    --nav-active: rgba(229, 62, 62, 0.3);
    --game-bg: linear-gradient(145deg, #63171B, #742A2A);
    --game-card-bg: rgba(130, 39, 39, 0.95);
    --game-text: #FED7D7;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: var(--transition);
    min-height: 100vh;
    position: relative;
    padding-top: 70px;
}

.theme-toggle {
    position: fixed;
    top: 85px;
    right: 20px;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
    box-shadow: var(--shadow);
    transition: var(--transition);
    backdrop-filter: blur(5px);
}

.theme-toggle i {
    font-size: 1.2rem;
    color: var(--primary);
    transition: var(--transition);
}

.theme-toggle .fa-sun {
    display: none;
}

.dark-mode .theme-toggle .fa-moon {
    display: none;
}

.dark-mode .theme-toggle .fa-sun {
    display: block;
    color: #FEB2B2;
}

.theme-toggle:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-hover);
}

.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
    background: var(--primary);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 998;
    border: 2px solid var(--bg-secondary);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-5px) scale(1.1);
    background: var(--secondary);
}

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

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--nav-bg);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow);
    z-index: 1000;
    animation: slideDown 0.5s ease;
    border-bottom: 1px solid var(--border);
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
    }
    to {
        transform: translateY(0);
    }
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand a {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-decoration: none;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    transition: var(--transition);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--primary);
}

.section {
    min-height: 100vh;
    padding: 40px 0 60px;
    display: block;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 40px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 15px;
}

.section-title i {
    color: var(--primary);
}

/* Dashboard Styles */
.dashboard-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
    min-height: calc(100vh - 100px);
}

.dashboard-text {
    animation: slideInLeft 0.6s ease;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.dashboard-title {
    font-size: 3rem;
    line-height: 1.2;
    margin-bottom: 20px;
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.dashboard-subtitle {
    font-size: 1.2rem;
    color: var(--secondary);
    margin-bottom: 20px;
}

.dashboard-description {
    color: var(--text-secondary);
    margin-bottom: 30px;
    line-height: 1.8;
}

.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 40px;
}

.stat-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 20px;
    display: flex;
    gap: 15px;
    align-items: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--border);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary);
}

.stat-card i {
    font-size: 2rem;
    color: var(--primary);
    background: var(--soft-red-100);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-info h3 {
    font-size: 1.1rem;
    margin-bottom: 5px;
    color: var(--text-primary);
}

.stat-info p {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 10px;
}

.stat-link {
    color: var(--primary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: var(--transition);
}

.stat-link:hover {
    gap: 10px;
    color: var(--secondary);
}

.dashboard-image {
    animation: slideInRight 0.6s ease;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.image-wrapper {
    width: 350px;
    height: 350px;
    margin: 0 auto;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: var(--shadow-hover);
    border: 5px solid var(--bg-card);
    background: var(--soft-red-100);
}

.image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* CV Styles */
.cv-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--border);
    backdrop-filter: blur(5px);
}

.cv-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary);
}

.cv-header {
    display: flex;
    gap: 30px;
    align-items: center;
}

.cv-photo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--primary);
    background: var(--soft-red-100);
}

.cv-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cv-title h3 {
    font-size: 1.8rem;
    margin-bottom: 5px;
    color: var(--text-primary);
}

.cv-title p {
    color: var(--primary);
    margin-bottom: 15px;
}

.cv-contact {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.cv-contact span {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.cv-contact i {
    color: var(--primary);
}

.cv-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.card-title {
    font-size: 1.3rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-primary);
}

.card-title i {
    color: var(--primary);
}

.about-text {
    color: var(--text-secondary);
    line-height: 1.8;
}

.education-item {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.education-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
}

.edu-year {
    min-width: 100px;
    padding: 5px 15px;
    background: var(--soft-red-100);
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--primary);
    text-align: center;
    height: fit-content;
}

.edu-detail h4 {
    margin-bottom: 5px;
    color: var(--text-primary);
}

.edu-detail p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.skills-container {
    display: grid;
    gap: 20px;
}

.skill-item {
    width: 100%;
}

.skill-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.skill-bar {
    height: 8px;
    background: var(--border);
    border-radius: 4px;
    overflow: hidden;
}

.skill-progress {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 4px;
    transition: width 1s ease;
}

/* Portfolio Styles */
.portfolio-filters {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 30px;
    border: none;
    background: var(--bg-card);
    border-radius: 50px;
    cursor: pointer;
    font-weight: 500;
    color: var(--text-primary);
    transition: var(--transition);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.filter-btn.active,
.filter-btn:hover {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border-color: transparent;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.portfolio-item {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    cursor: pointer;
    animation: scaleIn 0.5s ease;
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.portfolio-link {
    text-decoration: none;
    color: inherit;
    display: block;
    width: 100%;
    height: 100%;
}

.portfolio-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4/3;
}

.portfolio-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.portfolio-item:hover .portfolio-image img {
    transform: scale(1.1);
}

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(229, 62, 62, 0.9), transparent);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
    color: white;
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
}

.portfolio-overlay h3 {
    margin-bottom: 5px;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.portfolio-overlay p {
    font-size: 0.9rem;
    transform: translateY(20px);
    transition: transform 0.3s ease 0.1s;
}

.portfolio-item:hover .portfolio-overlay h3,
.portfolio-item:hover .portfolio-overlay p {
    transform: translateY(0);
}

.github-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 10px;
    padding: 5px 15px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    font-size: 0.85rem;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.github-link i {
    font-size: 1rem;
}

.portfolio-admin-panel {
    background: var(--bg-card);
    border: 2px solid var(--secondary);
    border-radius: var(--radius);
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: var(--shadow-hover);
    display: none;
}

.portfolio-admin-panel.visible {
    display: block;
    animation: slideDown 0.3s ease;
}

.portfolio-admin-toggle-container {
    text-align: center;
    margin-bottom: 30px;
}

.btn-portfolio-admin-toggle {
    background: linear-gradient(135deg, var(--secondary), var(--primary));
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 50px;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: var(--shadow);
}

.btn-portfolio-admin-toggle:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

.portfolio-admin-hint {
    display: block;
    margin-top: 8px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-style: italic;
}

.portfolio-item-actions {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    gap: 5px;
    z-index: 10;
    opacity: 0;
    transition: var(--transition);
}

.portfolio-item:hover .portfolio-item-actions {
    opacity: 1;
}

.btn-delete-portfolio {
    background: var(--danger);
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    font-size: 0.9rem;
}

.btn-delete-portfolio:hover {
    transform: scale(1.1);
    background: #e53e3e;
}

.btn-edit-portfolio {
    background: var(--primary);
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    font-size: 0.9rem;
}

.btn-edit-portfolio:hover {
    transform: scale(1.1);
    background: var(--secondary);
}

.empty-portfolio {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 2px dashed var(--border);
    color: var(--text-secondary);
}

.empty-portfolio i {
    font-size: 4rem;
    color: var(--primary);
    margin-bottom: 20px;
}

.empty-portfolio h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.portfolio-stats {
    text-align: center;
    margin-bottom: 20px;
    padding: 15px;
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.portfolio-stats span {
    color: var(--primary);
    font-weight: 600;
    margin: 0 5px;
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.pagination-btn {
    min-width: 40px;
    height: 40px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-primary);
    border-radius: 10px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.95rem;
}

.pagination-btn:hover:not(:disabled) {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.pagination-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Certificate Styles */
.certificates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.certificate-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 25px;
    display: flex;
    gap: 20px;
    align-items: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(5px);
}

.certificate-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary);
}

.certificate-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: white;
    flex-shrink: 0;
}

.certificate-content {
    flex: 1;
}

.certificate-content h3 {
    font-size: 1.1rem;
    margin-bottom: 5px;
    color: var(--text-primary);
}

.cert-issuer {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 8px;
}

.cert-year {
    display: inline-block;
    padding: 3px 10px;
    background: var(--soft-red-100);
    border-radius: 15px;
    font-size: 0.8rem;
    color: var(--primary);
    margin-bottom: 10px;
}

.cert-actions {
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-view-cert {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 25px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 5px;
    border: 1px solid transparent;
}

.btn-view-cert:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(229, 62, 62, 0.3);
}

.cert-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--primary);
    text-decoration: none;
    font-size: 0.9rem;
    padding: 5px 10px;
    background: var(--bg-primary);
    border-radius: 20px;
    transition: var(--transition);
}

.cert-link:hover {
    background: var(--primary);
    color: white;
    text-decoration: none;
}

.cert-badge-container {
    margin-top: 10px;
    text-align: center;
}

.cert-badge-img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary);
    transition: var(--transition);
}

.cert-badge-img:hover {
    transform: scale(1.1);
    box-shadow: 0 5px 15px rgba(229, 62, 62, 0.3);
}

.cert-stats {
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 30px;
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 30px;
}

.cert-stat-item {
    text-align: center;
    min-width: 120px;
}

.cert-stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
}

.cert-stat-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.credly-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--primary);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    transition: var(--transition);
    border: 1px solid transparent;
}

.credly-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(229, 62, 62, 0.3);
}

.certificate-categories {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.category-btn {
    padding: 12px 30px;
    border: none;
    background: var(--bg-card);
    border-radius: 50px;
    cursor: pointer;
    font-weight: 500;
    color: var(--text-primary);
    transition: var(--transition);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    font-size: 1rem;
}

.category-btn.active,
.category-btn:hover {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border-color: transparent;
}

.cert-item-actions {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    gap: 5px;
    z-index: 10;
    opacity: 0;
    transition: var(--transition);
}

.certificate-card:hover .cert-item-actions {
    opacity: 1;
}

/* Admin Panel Styles */
.admin-panel {
    background: var(--bg-card);
    border: 2px solid var(--primary);
    border-radius: var(--radius);
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: var(--shadow-hover);
    display: none;
}

.admin-panel.visible {
    display: block;
    animation: slideDown 0.3s ease;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.admin-header h3 {
    margin: 0;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-logout {
    background: var(--danger);
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.9rem;
}

.btn-logout:hover {
    background: #e53e3e;
    transform: translateY(-2px);
}

.admin-note {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-style: italic;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px dashed var(--border);
}

.admin-form {
    display: grid;
    gap: 20px;
}

.admin-form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.admin-form-group label {
    font-weight: 500;
    color: var(--text-primary);
}

.admin-select,
.admin-input {
    padding: 12px 15px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 1rem;
    transition: var(--transition);
}

.admin-select:focus,
.admin-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(229, 62, 62, 0.1);
}

textarea.admin-input {
    resize: vertical;
    min-height: 80px;
}

.input-hint {
    color: var(--text-secondary);
    font-size: 0.8rem;
    margin-top: 4px;
}

.admin-buttons {
    display: flex;
    gap: 15px;
    margin-top: 10px;
}

.btn-admin {
    padding: 12px 25px;
    border: none;
    border-radius: 10px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    justify-content: center;
}

.btn-save {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
}

.btn-save:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(229, 62, 62, 0.3);
}

.btn-close {
    background: var(--border);
    color: var(--text-primary);
}

.btn-close:hover {
    background: var(--danger);
    color: white;
    transform: translateY(-2px);
}

.admin-toggle-container {
    text-align: center;
    margin-bottom: 30px;
}

.btn-admin-toggle {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 50px;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: var(--shadow);
}

.btn-admin-toggle:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

.admin-hint {
    display: block;
    margin-top: 8px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-style: italic;
}

.login-form {
    padding: 20px 0;
}

.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-primary);
    font-weight: 500;
}

/* Game Styles */
.game-container {
    background: var(--game-bg);
    border-radius: 48px;
    padding: 2rem;
    box-shadow: var(--shadow-hover);
    max-width: 600px;
    margin: 0 auto;
    border: 1px solid var(--border);
    backdrop-filter: blur(10px);
}

.game-screen {
    text-align: center;
    color: var(--game-text);
}

.game-title {
    font-size: 2.8rem;
    margin-bottom: 0.75rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.game-subtitle {
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.game-input {
    width: 80%;
    padding: 16px;
    font-size: 1.3rem;
    border: 2px solid var(--border);
    border-radius: 60px;
    text-align: center;
    outline: none;
    background: var(--bg-card);
    color: var(--text-primary);
    font-weight: 600;
    box-shadow: var(--shadow);
    transition: var(--transition);
    margin: 20px 0;
}

.game-input:focus {
    border-color: var(--primary);
    transform: scale(1.02);
}

.game-info {
    color: var(--text-secondary);
    margin: 20px 0;
    line-height: 1.6;
}

.btn-game {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    padding: 14px 36px;
    font-size: 1.3rem;
    font-weight: bold;
    border-radius: 60px;
    cursor: pointer;
    transition: var(--transition);
    margin-top: 24px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(255,255,255,0.3);
    animation: pulse 2s ease-in-out infinite;
}

.btn-game:hover {
    transform: scale(1.07) translateY(-3px);
    box-shadow: var(--shadow-hover);
}

.btn-game:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    animation: none;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.hidden {
    display: none !important;
}

.player-name {
    font-size: 1.2rem;
    color: var(--primary);
    margin: 10px 0;
    background: var(--bg-card);
    padding: 8px 20px;
    border-radius: 40px;
    display: inline-block;
    border: 1px solid var(--border);
}

.quest-number {
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--text-primary);
    margin: 15px 0;
}

.timer-bar {
    width: 100%;
    height: 12px;
    background: var(--border);
    border-radius: 40px;
    margin: 20px 0;
    overflow: hidden;
}

.timer-progress {
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 40px;
    transition: width 1s linear;
}

.question {
    font-size: 4rem;
    font-weight: 800;
    margin: 20px 0;
    color: var(--text-primary);
    background: var(--bg-card);
    padding: 20px 10px;
    border-radius: 60px;
    letter-spacing: 4px;
    animation: pulse 2s ease-in-out infinite;
    border: 1px solid var(--border);
}

.answer-input {
    width: 160px;
    font-size: 2rem;
}

.hint-text {
    color: var(--text-secondary);
    font-style: italic;
}

.result-title {
    font-size: 2.5rem;
    margin-bottom: 20px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.result-message {
    font-size: 1.5rem;
    margin: 10px 0;
    padding: 10px;
    border-radius: 30px;
    background: var(--bg-card);
    border: 1px solid var(--border);
}

.score-badge {
    font-size: 2.2rem;
    font-weight: 800;
    background: var(--bg-card);
    padding: 10px 30px;
    border-radius: 60px;
    display: inline-block;
    margin: 15px 0;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.result-container {
    margin-top: 20px;
    overflow-x: auto;
    border-radius: 24px;
    background: var(--bg-card);
    padding: 10px;
    border: 1px solid var(--border);
}

.result-table {
    width: 100%;
    border-collapse: collapse;
    color: var(--text-primary);
}

.result-table th,
.result-table td {
    padding: 14px 8px;
    text-align: center;
    border-bottom: 1px solid var(--border);
}

.result-table th {
    background: var(--soft-red-100);
    color: var(--primary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.row-correct {
    color: #48BB78;
    font-weight: bold;
}

.row-wrong {
    color: #F56565;
    font-weight: bold;
}

/* Loading Animation */
.loading-icon {
    font-size: 4rem;
    animation: loadingPulse 1s ease-in-out infinite;
    margin: 20px 0;
}

@keyframes loadingPulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.7; }
    100% { transform: scale(1); opacity: 1; }
}

.loading-text {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary);
    margin: 20px 0;
    animation: blink 1.5s ease-in-out infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.loading-dots {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 30px 0;
}

.loading-dot {
    width: 20px;
    height: 20px;
    background: var(--primary);
    border-radius: 50%;
    animation: bounce 0.6s ease-in-out infinite;
    box-shadow: 0 0 20px var(--primary);
}

.loading-dot:nth-child(2) { animation-delay: 0.2s; }
.loading-dot:nth-child(3) { animation-delay: 0.4s; }
.loading-dot:nth-child(4) { animation-delay: 0.6s; }
.loading-dot:nth-child(5) { animation-delay: 0.8s; }

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

.loading-spinner {
    width: 80px;
    height: 80px;
    margin: 30px auto;
    border: 6px solid var(--border);
    border-top: 6px solid var(--primary);
    border-right: 6px solid var(--secondary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-bar-container {
    width: 80%;
    height: 20px;
    background: var(--border);
    border-radius: 30px;
    margin: 30px auto;
    overflow: hidden;
    border: 2px solid var(--primary-light);
}

.loading-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 30px;
    animation: loadingBar 2s ease-in-out forwards;
    box-shadow: 0 0 20px var(--primary);
}

@keyframes loadingBar {
    0% { width: 0%; }
    20% { width: 20%; }
    50% { width: 60%; }
    80% { width: 90%; }
    100% { width: 100%; }
}

.loading-percentage {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--primary);
    margin: 20px 0;
    animation: pulse 1s ease-in-out infinite;
}

.loading-tips {
    background: var(--bg-card);
    padding: 15px;
    border-radius: 30px;
    margin: 20px 0;
    border: 1px solid var(--border);
}

.loading-tip {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin: 5px 0;
    animation: slideInRight 0.5s ease-out forwards;
    opacity: 0;
}

.loading-tip:nth-child(1) { animation-delay: 0.5s; }
.loading-tip:nth-child(2) { animation-delay: 1s; }
.loading-tip:nth-child(3) { animation-delay: 1.5s; }

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.error-message {
    color: #F56565;
    font-size: 0.9rem;
    margin-top: 5px;
    display: none;
}

/* Footer Styles */
.footer {
    background: var(--bg-card);
    padding: 30px 0;
    margin-top: 60px;
    border-top: 1px solid var(--border);
}

.footer-content {
    text-align: center;
}

.footer-social {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
}

.footer-social a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    transition: var(--transition);
    text-decoration: none;
    border: 1px solid var(--border);
}

.footer-social a:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-3px);
}

.footer-text {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background-color: var(--bg-card);
    margin: 5% auto;
    padding: 0;
    width: 90%;
    max-width: 800px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-hover);
    animation: slideInDown 0.4s ease;
    border: 1px solid var(--border);
    overflow: hidden;
}

@keyframes slideInDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    padding: 20px 25px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
}

.modal-header h3 {
    margin: 0;
    font-size: 1.5rem;
}

.close-modal {
    color: white;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
    line-height: 1;
}

.close-modal:hover {
    transform: scale(1.2);
    color: var(--accent);
}

.modal-body {
    padding: 25px;
    max-height: 60vh;
    overflow-y: auto;
    text-align: center;
}

.certificate-viewer {
    width: 100%;
}

.certificate-viewer img {
    max-width: 100%;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.certificate-viewer iframe {
    border: none;
    border-radius: 10px;
}

.certificate-placeholder {
    background: var(--bg-primary);
    border: 2px dashed var(--border);
    border-radius: 10px;
    padding: 50px 20px;
    text-align: center;
    color: var(--text-secondary);
}

.certificate-placeholder i {
    font-size: 5rem;
    color: var(--primary);
    margin-bottom: 15px;
}

.certificate-placeholder h4 {
    font-size: 2rem;
    margin: 20px 0;
    color: var(--primary);
}

.certificate-placeholder p {
    font-size: 1.1rem;
    margin: 5px 0;
}

.certificate-placeholder .text-muted {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 15px;
}

.modal-footer {
    padding: 20px 25px;
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    text-align: right;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.btn-download {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 50px;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid transparent;
}

.btn-download:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(229, 62, 62, 0.3);
}

.confirm-modal .modal-header {
    background: var(--danger);
}

/* Toast Styles */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
}

.toast {
    min-width: 300px;
    margin-bottom: 10px;
    padding: 15px 20px;
    border-radius: 10px;
    color: white;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideInRight 0.3s ease, fadeOut 0.3s ease 2.7s;
    box-shadow: var(--shadow-hover);
}

.toast.success {
    background: linear-gradient(135deg, #48BB78, #38A169);
}

.toast.error {
    background: linear-gradient(135deg, #F56565, #E53E3E);
}

.toast.warning {
    background: linear-gradient(135deg, #FBBF24, #F59E0B);
}

.toast.info {
    background: linear-gradient(135deg, #4299E1, #3182CE);
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes confettiFall {
    0% {
        transform: translateY(-100px) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

.win-badge {
    background: linear-gradient(135deg, #9AE6B4, #68D391);
    color: white;
    border: none;
    box-shadow: 0 0 30px #9AE6B4;
}

.lose-badge {
    background: linear-gradient(135deg, #FC8181, #F56565);
    color: white;
    border: none;
    box-shadow: 0 0 30px #FC8181;
}

/* Responsive */
@media (max-width: 968px) {
    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: var(--nav-bg);
        backdrop-filter: blur(10px);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        transition: 0.3s;
        gap: 2rem;
        z-index: 999;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-toggle {
        display: block;
    }

    .theme-toggle {
        top: 85px;
        right: 15px;
        width: 40px;
        height: 40px;
    }

    .dashboard-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 30px;
    }

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

    .stat-card {
        text-align: left;
    }

    .cv-header {
        flex-direction: column;
        text-align: center;
    }

    .cv-contact {
        justify-content: center;
    }

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

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

@media (max-width: 768px) {
    body {
        padding-top: 60px;
    }

    .theme-toggle {
        top: 75px;
        right: 10px;
        width: 35px;
        height: 35px;
    }

    .theme-toggle i {
        font-size: 1rem;
    }

    .dashboard-title {
        font-size: 2rem;
    }

    .image-wrapper {
        width: 250px;
        height: 250px;
    }

    .portfolio-filters {
        flex-direction: column;
        align-items: center;
    }

    .filter-btn {
        width: 200px;
    }

    .education-item {
        flex-direction: column;
        gap: 10px;
    }

    .edu-year {
        width: fit-content;
    }

    .certificate-card {
        flex-direction: column;
        text-align: center;
    }

    .cert-actions {
        justify-content: center;
    }

    .cert-stats {
        flex-direction: column;
        gap: 15px;
    }

    .admin-buttons {
        flex-direction: column;
    }

    .game-title {
        font-size: 2rem;
    }

    .question {
        font-size: 2.5rem;
    }

    .answer-input {
        width: 120px;
        font-size: 1.5rem;
    }

    .modal-content {
        width: 95%;
        margin: 15% auto;
    }

    .modal-header h3 {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .theme-toggle {
        top: 70px;
        right: 8px;
        width: 32px;
        height: 32px;
    }

    .back-to-top {
        width: 35px;
        height: 35px;
        bottom: 15px;
        right: 15px;
    }
}