/* Reset và Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    border-radius: 0 !important;
    box-shadow: none;
    filter: none !important;
}

:root {
    --primary-green: #7fb069;
    --dark-green: #2d5a27;
    --light-green: #a8e6cf;
    --blue-shadow: #b8e6e1;
    --white: #ffffff;
    --light-gray: #f8f9fa;
    --shadow: rgba(0, 0, 0, 0.1);
}

html, body {
    width: 100vw;
    height: 100vh;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Press Start 2P', monospace !important;
    letter-spacing: 1px;
    font-size: 14px;
    min-height: 100vh;
    min-width: 100vw;
    background: url('../assets/bg.png') center center / cover no-repeat fixed, linear-gradient(135deg, var(--light-green) 0%, #dcedc8 50%, #f1f8e9 100%);
    overflow-x: hidden;
    position: relative;
    cursor: default;
}

/* Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--light-green);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loading-screen.hidden {
    opacity: 0;
    visibility: hidden;
}

.loading-dino {
    width: 80px;
    height: 80px;
    background: var(--primary-green);
    border-radius: 10px;
    animation: loadingBounce 1s ease-in-out infinite;
    margin-bottom: 20px;
}

@keyframes loadingBounce {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-20px) scale(1.1); }
}

.loading-screen p {
    color: var(--dark-green);
    font-size: 1.2rem;
    font-weight: 600;
}

/* Background Elements */
.bg-elements {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.cloud {
    position: absolute;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50px;
    opacity: 0.6;
}

.cloud::before,
.cloud::after {
    content: '';
    position: absolute;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50px;
}

.cloud1 {
    width: 100px;
    height: 40px;
    top: 20%;
    left: 10%;
    animation: float 20s ease-in-out infinite;
}

.cloud1::before {
    width: 50px;
    height: 50px;
    top: -25px;
    left: 10px;
}

.cloud1::after {
    width: 60px;
    height: 40px;
    top: -15px;
    right: 10px;
}

.cloud2 {
    width: 80px;
    height: 30px;
    top: 15%;
    right: 20%;
    animation: float 25s ease-in-out infinite reverse;
}

.cloud3 {
    width: 120px;
    height: 50px;
    top: 30%;
    right: 10%;
    animation: float 30s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateX(0) translateY(0); }
    25% { transform: translateX(20px) translateY(-10px); }
    50% { transform: translateX(-10px) translateY(5px); }
    75% { transform: translateX(15px) translateY(-5px); }
}

/* Profile Container */
.profile-container {
    position: relative;
    min-height: 100vh;
    z-index: 2;
}

/* Header */
.profile-header {
    text-align: center;
    padding: 60px 20px 40px;
    position: relative;
    z-index: 10;
}

.profile-title,
.profile-title .char {
    font-family: 'Press Start 2P', monospace !important;
    font-size: 32px !important;
    letter-spacing: 0px !important;
    color: var(--dark-green) !important;
    text-shadow: none !important;
}

/* Xóa hiệu ứng balloon highlight trên từng ký tự */
.profile-title .char::after,
.profile-title .char[data-balloon-x][data-balloon-y]::after,
.profile-title .char[data-balloon-x][data-balloon-y] {
    background: none !important;
    filter: none !important;
    box-shadow: none !important;
    text-shadow: none !important;
    transition: none !important;
    opacity: 1 !important;
}

.profile-title .char::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, 
        rgba(255, 255, 255, 0.4) 0%,
        rgba(255, 255, 255, 0.2) 30%,
        rgba(255, 255, 255, 0.1) 50%,
        transparent 70%);
    border-radius: 50%;
    z-index: -1;
    opacity: 0;
    transition: all 0.3s ease;
    filter: blur(2px);
}

.profile-title .char:hover::before {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.5);
}

.profile-title .char:hover::after {
    opacity: 1;
}

.profile-subtitle {
    font-size: 1.2rem;
    color: var(--dark-green);
    opacity: 0.8;
    animation: fadeInUp 1s ease-out 0.5s both;
}

@keyframes titleBounce {
    0% { transform: translateY(-50px) scale(0.8); opacity: 0; }
    60% { transform: translateY(10px) scale(1.05); }
    100% { transform: translateY(0) scale(1); opacity: 1; }
}

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

/* Dinosaur */
.dino-container {
    position: absolute;
    width: 72px;
    height: 72px;
    cursor: pointer;
    z-index: 15;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.dino {
    width: 100%;
    height: 100%;
    background-size: auto 100%;
    background-repeat: no-repeat;
    background-position: 0 0;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    image-rendering: pixelated !important;
    filter: none !important;
    position: relative;
    z-index: 2;
}

.shadow {
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 10px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0.7 !important;
    z-index: 1;
    filter: none !important;
}

.dino:hover {
    transform: scale(1.1);
}

.dino.running {
    animation: runningBounce 0.6s ease-in-out infinite alternate;
}

.dino.jumping {
    animation: jumpAnimation 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

@keyframes runningBounce {
    0% { transform: translateY(0) rotate(-1deg); }
    100% { transform: translateY(-8px) rotate(1deg); }
}

@keyframes jumpAnimation {
    0% { transform: translateY(0) scale(1) rotate(0deg); }
    50% { transform: translateY(-30px) scale(1.2) rotate(180deg); }
    100% { transform: translateY(0) scale(1) rotate(360deg); }
}

/* Speech Bubble */
.speech-bubble {
    position: absolute;
    bottom: 130px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--white);
    padding: 12px 18px;
    border-radius: 0 !important;
    border: 4px solid #222 !important;
    font-size: 14px;
    font-weight: 600;
    color: var(--dark-green);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    box-shadow: 0 4px 0 #222 !important;
    max-width: 200px;
    text-align: center;
}

.speech-bubble::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 12px solid transparent;
    border-top-color: var(--primary-green);
    border-radius: 0 !important;
}

.speech-bubble::before {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 9px solid transparent;
    border-top-color: var(--white);
    z-index: 1;
    border-radius: 0 !important;
}

.speech-bubble.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-10px);
}

/* Profile Content */
.profile-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 32px 24px !important;
    position: relative;
    z-index: 5;
}

.about-section,
.projects-section {
    border: 4px solid #2d5a27 !important;
    background: #fff !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    padding: 32px 24px !important;
    margin-bottom: 24px !important;
    backdrop-filter: blur(10px);
    animation: fadeInUp 1s ease-out;
}

.about-section h2,
.projects-section h2 {
    color: var(--dark-green);
    font-size: 2rem;
    margin-bottom: 15px;
    font-weight: 700;
}

.about-section p,
.projects-section p {
    color: #555;
    line-height: 1.6;
    margin-bottom: 20px;
}

.skills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.skill-tag {
    border: 3px solid #2d5a27 !important;
    background: #e0e0e0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    font-size: 12px !important;
    padding: 6px 12px !important;
    color: #2d5a27 !important;
    font-weight: bold;
    display: inline-block;
}

.skill-tag:hover {
    transform: translateY(-2px);
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px !important;
}

.project-card {
    background: var(--light-gray);
    padding: 20px;
    border-radius: 15px;
    border-left: 4px solid var(--primary-green);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin-bottom: 10px;
    font-weight: 600;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px var(--shadow);
}

.project-card h3 {
    color: var(--dark-green);
    margin-bottom: 10px;
    font-weight: 600;
}

/* Responsive Design */
@media (max-width: 768px) {
    .profile-header {
        padding: 40px 15px 30px;
    }
    
    .dino-container {
        width: 72px;
        height: 72px;
    }
    
    .speech-bubble {
        font-size: 12px;
        padding: 10px 14px;
        max-width: 150px;
        bottom: 90px;
    }
    
    .profile-content {
        padding: 20px 15px;
    }
    
    .about-section,
    .projects-section {
        padding: 20px;
        margin-bottom: 20px;
    }
    
    .project-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .skills {
        justify-content: center;
    }
    
    .skill-tag {
        font-size: 0.8rem;
        padding: 6px 12px;
    }
}

/* Special Effects */
.rainbow-mode {
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4, #45b7d1, #96ceb4, #feca57, #ff9ff3);
    background-size: 400% 400%;
    animation: rainbow 3s ease infinite;
}

@keyframes rainbow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

body, .profile-content, .about-section, .projects-section, .project-card, h1, h2, h3, p, span, .skills, .skill-tag {
  cursor: default;
  user-select: none;
}
.dino-container, .dino {
  cursor: pointer;
}

input, textarea, select {
  border-radius: 0 !important;
  font-family: 'Press Start 2P', monospace !important;
}
