:root {
    --vn-red: #DA251D;
    --vn-red-dark: #B81D16;
    --vn-red-light: #E84C46;
    --vn-gold: #FFFF00;
    --vn-gold-dark: #D4AF37;
    --primary-color: #DA251D;
    --secondary-color: #1a1a2e;
    --accent-color: #D4AF37;
    --text-dark: #1a1a2e;
    --text-light: #6c757d;
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.15);
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    color: var(--text-dark);
    background-color: var(--bg-light);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    transition: color var(--transition-fast);
}

img {
    max-width: 100%;
    height: auto;
}

.navbar {
    padding: 1rem 0;
    background: var(--bg-white) !important;
    border-bottom: 3px solid var(--vn-red);
}

.navbar-brand {
    font-weight: 700;
}

.brand-text {
    font-size: 0.7rem;
    letter-spacing: 0.5px;
}

.logo-icon svg {
    filter: drop-shadow(0 2px 4px rgba(218, 37, 29, 0.3));
}

.nav-link {
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    margin: 0 0.25rem;
    border-radius: 8px;
    transition: all var(--transition-normal);
    color: var(--text-dark) !important;
}

.nav-link:hover {
    background: rgba(218, 37, 29, 0.1);
    color: var(--vn-red) !important;
}

.nav-link.active {
    background: var(--vn-red);
    color: white !important;
}

.nav-link i {
    font-size: 0.9rem;
}

.hero-section {
    background: linear-gradient(135deg, var(--vn-red) 0%, var(--vn-red-dark) 100%);
    color: white;
    padding: 100px 0;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M20 8L23.5 17H33L25.5 22.5L28.5 32L20 26L11.5 32L14.5 22.5L7 17H16.5L20 8Z' fill='rgba(255,255,255,0.03)'/%3E%3C/svg%3E");
    pointer-events: none;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.hero-subtitle {
    font-size: 1.5rem;
    font-weight: 400;
    opacity: 0.95;
    margin-bottom: 2rem;
}

.hero-desc {
    font-size: 1.1rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto 2rem;
}

.hero-star {
    position: absolute;
    opacity: 0.1;
    animation: float 6s ease-in-out infinite;
}

.hero-star-1 {
    top: 20%;
    left: 10%;
    font-size: 4rem;
    animation-delay: 0s;
}

.hero-star-2 {
    top: 60%;
    right: 15%;
    font-size: 3rem;
    animation-delay: 2s;
}

.hero-star-3 {
    bottom: 20%;
    left: 20%;
    font-size: 2.5rem;
    animation-delay: 4s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(10deg);
    }
}

.search-box {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    max-width: 700px;
    margin: 0 auto;
}

.search-input-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.search-input-group input {
    flex: 1;
    min-width: 200px;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 1rem 1.5rem;
    font-size: 1.1rem;
    transition: border-color var(--transition-fast);
}

.search-input-group input:focus {
    outline: none;
    border-color: var(--vn-red);
    box-shadow: 0 0 0 4px rgba(218, 37, 29, 0.1);
}

.search-input-group button {
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 12px;
    border: none;
    background: var(--vn-red);
    color: white;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.search-input-group button:hover {
    background: var(--vn-red-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-primary {
    background: var(--vn-red);
    border-color: var(--vn-red);
}

.btn-primary:hover {
    background: var(--vn-red-dark);
    border-color: var(--vn-red-dark);
}

.btn-outline-primary {
    color: var(--vn-red);
    border-color: var(--vn-red);
}

.btn-outline-primary:hover {
    background: var(--vn-red);
    border-color: var(--vn-red);
    color: white;
}

.section {
    padding: 80px 0;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.section-subtitle {
    font-size: 1.2rem;
    color: var(--text-light);
    margin-bottom: 3rem;
}

.features-section {
    background: var(--bg-white);
}

.feature-card {
    background: var(--bg-white);
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
    border: 1px solid #e9ecef;
    height: 100%;
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--vn-red);
}

.feature-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--vn-red) 0%, var(--vn-red-light) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: white;
    font-size: 2rem;
}

.feature-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.feature-desc {
    color: var(--text-light);
    line-height: 1.7;
}

.stats-section {
    background: linear-gradient(135deg, var(--secondary-color) 0%, #16213e 100%);
    color: white;
    padding: 60px 0;
}

.stat-item {
    text-align: center;
    padding: 1.5rem;
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--vn-gold);
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 1.1rem;
    opacity: 0.9;
}

.page-header {
    background: linear-gradient(135deg, var(--vn-red) 0%, var(--vn-red-dark) 100%);
    color: white;
    padding: 60px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M20 8L23.5 17H33L25.5 22.5L28.5 32L20 26L11.5 32L14.5 22.5L7 17H16.5L20 8Z' fill='rgba(255,255,255,0.03)'/%3E%3C/svg%3E");
    pointer-events: none;
}

.page-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.page-subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
}

.content-section {
    background: var(--bg-white);
    padding: 60px 0;
}

.content-card {
    background: var(--bg-white);
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: var(--shadow-sm);
    margin-bottom: 2rem;
    border: 1px solid #e9ecef;
}

.content-card h3 {
    color: var(--vn-red);
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.content-card p {
    color: var(--text-dark);
    line-height: 1.8;
    margin-bottom: 1rem;
}

.content-card ul {
    padding-left: 1.5rem;
}

.content-card ul li {
    margin-bottom: 0.5rem;
    line-height: 1.7;
}

.advantage-card {
    background: var(--bg-white);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid #e9ecef;
    height: 100%;
    transition: all var(--transition-normal);
}

.advantage-card:hover {
    border-color: var(--vn-red);
    box-shadow: var(--shadow-md);
}

.advantage-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--vn-red) 0%, var(--vn-red-light) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.advantage-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.advantage-desc {
    color: var(--text-light);
    line-height: 1.7;
}

.domain-type-card {
    background: var(--bg-white);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid #e9ecef;
    transition: all var(--transition-normal);
    height: 100%;
}

.domain-type-card:hover {
    border-color: var(--vn-red);
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
}

.domain-type-badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--vn-red) 0%, var(--vn-red-light) 100%);
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 30px;
    font-weight: 600;
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.domain-type-desc {
    color: var(--text-light);
    line-height: 1.7;
}

.category-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--vn-red);
    margin-bottom: 2rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--vn-red);
}

.query-section {
    padding: 60px 0;
    background: var(--bg-light);
}

.query-box {
    background: var(--bg-white);
    border-radius: 20px;
    padding: 3rem;
    box-shadow: var(--shadow-md);
    max-width: 800px;
    margin: 0 auto;
}

.query-input-wrapper {
    position: relative;
    margin-bottom: 1.5rem;
}

.query-input-wrapper input {
    width: 100%;
    padding: 1.25rem 1.5rem;
    font-size: 1.2rem;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    transition: all var(--transition-fast);
}

.query-input-wrapper input:focus {
    outline: none;
    border-color: var(--vn-red);
    box-shadow: 0 0 0 4px rgba(218, 37, 29, 0.1);
}

.query-btn {
    width: 100%;
    padding: 1.25rem;
    font-size: 1.2rem;
    font-weight: 600;
    background: var(--vn-red);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.query-btn:hover:not(:disabled) {
    background: var(--vn-red-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.query-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.query-result {
    margin-top: 2rem;
    padding: 2rem;
    border-radius: 16px;
    display: none;
}

.query-result.show {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.query-result.available {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border: 2px solid #28a745;
}

.query-result.unavailable {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    border: 2px solid #dc3545;
}

.result-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.query-result.available .result-icon {
    color: #28a745;
}

.query-result.unavailable .result-icon {
    color: #dc3545;
}

.result-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.result-domain {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--vn-red);
    margin-bottom: 1rem;
    word-break: break-all;
}

.suggestions-list {
    margin-top: 1.5rem;
}

.suggestion-item {
    display: inline-block;
    background: white;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    margin: 0.25rem;
    border: 1px solid #e9ecef;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.suggestion-item:hover {
    border-color: var(--vn-red);
    color: var(--vn-red);
}

.footer {
    background: var(--secondary-color) !important;
}

.footer a:hover {
    color: var(--vn-gold) !important;
}

.vietnam-decoration {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: -1;
}

.star-decoration {
    position: absolute;
    color: var(--vn-gold);
    opacity: 0.03;
    animation: twinkle 4s ease-in-out infinite;
}

.star-1 {
    top: 10%;
    left: 5%;
    font-size: 8rem;
}

.star-2 {
    top: 50%;
    right: 3%;
    font-size: 6rem;
    animation-delay: 1s;
}

.star-3 {
    bottom: 15%;
    left: 8%;
    font-size: 5rem;
    animation-delay: 2s;
}

@keyframes twinkle {
    0%, 100% {
        opacity: 0.03;
        transform: scale(1);
    }
    50% {
        opacity: 0.06;
        transform: scale(1.1);
    }
}

.loading-spinner {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.alert {
    border-radius: 12px;
    border: none;
    padding: 1rem 1.5rem;
}

.alert-danger {
    background: #f8d7da;
    color: #721c24;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
}

@media (max-width: 991.98px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .stat-number {
        font-size: 2.5rem;
    }
    
    .search-input-group {
        flex-direction: column;
    }
    
    .search-input-group button {
        width: 100%;
    }
}

@media (max-width: 767.98px) {
    .hero-section {
        padding: 60px 0;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .section {
        padding: 50px 0;
    }
    
    .page-header {
        padding: 40px 0;
    }
    
    .page-title {
        font-size: 2rem;
    }
    
    .query-box {
        padding: 2rem;
    }
    
    .navbar-collapse {
        background: white;
        padding: 1rem;
        border-radius: 12px;
        margin-top: 1rem;
        box-shadow: var(--shadow-md);
    }
    
    .navbar-collapse .d-flex {
        flex-direction: column;
        gap: 0.5rem !important;
        margin-top: 1rem;
    }
    
    .navbar-collapse .btn {
        width: 100%;
    }
}

@media (max-width: 575.98px) {
    .hero-title {
        font-size: 1.75rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .search-box {
        padding: 1.5rem;
    }
    
    .feature-card {
        padding: 1.5rem;
    }
    
    .content-card {
        padding: 1.5rem;
    }
}

::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--vn-red);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--vn-red-dark);
}

::selection {
    background: var(--vn-red);
    color: white;
}
