:root {
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary-color: #10b981;
    --accent-color: #8b5cf6;
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-color);
}

header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    box-shadow: var(--shadow);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.logo-icon {
    font-size: 2rem;
    animation: pulse 2s ease-in-out infinite;
}

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

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

.nav-links a {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    padding: 0.5rem 0;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary-color);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    transition: width 0.3s ease;
}

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

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-primary);
}

main {
    padding-top: 80px;
}

section {
    padding: 3rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
    scroll-margin-top: 80px;
}

section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-weight: 700;
}

.section-desc {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    font-size: 1.1rem;
}

.hero {
    min-height: calc(100vh - 80px);
    display: flex;
    align-items: center;
    gap: 4rem;
    padding: 2rem;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    z-index: -1;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    z-index: -1;
}

.hero-content {
    flex: 1;
}

.hero h1 {
    font-size: 3.5rem;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.hero .highlight {
    color: var(--primary-color);
    background: linear-gradient(120deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
}

.btn {
    padding: 0.875rem 2rem;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
    font-size: 1rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    border: 2px solid transparent;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.45);
}

.btn-secondary {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-3px);
}

.hero-visual {
    flex: 1;
    display: flex;
    justify-content: center;
}

.code-block {
    background: #1e293b;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    width: 100%;
    max-width: 450px;
    animation: float 4s ease-in-out infinite;
    position: relative;
    overflow: hidden;
}

.code-block::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #ef4444, #f59e0b, #22c55e, #2563eb);
}

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

.code-header {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.red { background: #ef4444; }
.yellow { background: #f59e0b; }
.green { background: #22c55e; }

.code-block pre {
    margin: 0;
    overflow-x: auto;
}

.code-block code {
    font-family: 'Fira Code', 'Consolas', monospace;
    font-size: 0.9rem;
    color: #e2e8f0;
}

.keyword { color: #c084fc; }
.comment { color: #64748b; }
.method { color: #60a5fa; }

.features {
    background: white;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.feature-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 16px;
    text-align: center;
    transition: all 0.3s ease;
    border: 2px solid var(--border-color);
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(37, 99, 235, 0.12);
    border-color: var(--primary-color);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: inline-block;
    padding: 1rem;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1), rgba(139, 92, 246, 0.1));
    border-radius: 16px;
}

.feature-card h3 {
    margin-bottom: 0.75rem;
    color: var(--text-primary);
    font-size: 1.2rem;
    font-weight: 600;
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

.about {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
}

.about h2 {
    margin-bottom: 2rem;
}

.about-text p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    color: var(--text-secondary);
}

.about-text .highlight {
    color: var(--primary-color);
    font-weight: 600;
}

.skills {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.skills h3 {
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.tag {
    background: white;
    color: var(--primary-color);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    border: 1px solid var(--primary-color);
}

.tools {
    background: white;
    min-height: auto;
}

.tools h2 {
    margin-bottom: 0.5rem;
}

.tools .section-desc {
    margin-bottom: 2rem;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

@media (max-width: 1100px) {
    .tools-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 800px) {
    .tools-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.tool-card {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.tool-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.tool-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(37, 99, 235, 0.15);
    border-color: var(--primary-color);
}

.tool-card:hover::before {
    transform: scaleX(1);
}

.tool-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    display: inline-block;
    padding: 0.75rem;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1), rgba(139, 92, 246, 0.1));
    border-radius: 12px;
}

.tool-card h3 {
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 600;
}

.tool-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.tool-badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--secondary-color), #059669);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.tool-badge.new {
    background: linear-gradient(135deg, #f59e0b, #ef4444, #ec4899);
    animation: badgePulse 2s infinite;
}

@keyframes badgePulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.4); }
    50% { box-shadow: 0 0 0 6px rgba(245, 158, 11, 0); }
}

.pagination-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    margin-top: 1.5rem;
    padding: 1rem;
    background: var(--bg-color);
    border-radius: 12px;
}

.page-btn {
    padding: 0.75rem 2rem;
    border: 2px solid var(--primary-color);
    background: var(--primary-color);
    color: white;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s;
}

.page-btn:hover:not(.disabled) {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.page-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: var(--text-secondary);
    border-color: var(--text-secondary);
}

.page-info {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    padding: 0 1rem;
}

.blog {
    background: var(--bg-color);
    min-height: auto;
}

.blog h2 {
    margin-bottom: 0.5rem;
}

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

.blog-card {
    background: var(--card-bg);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.blog-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(37, 99, 235, 0.12);
    border-color: var(--primary-color);
}

.blog-image {
    height: 140px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.5rem;
    position: relative;
    overflow: hidden;
}

.blog-image::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40%;
    background: linear-gradient(to top, rgba(0,0,0,0.2), transparent);
}

.blog-content {
    padding: 1.5rem;
}

.blog-date {
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
}

.blog-card h3 {
    margin: 0.75rem 0;
    color: var(--text-primary);
    font-size: 1.15rem;
    font-weight: 600;
    line-height: 1.4;
}

.blog-content p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-size: 0.9rem;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.read-more {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
    font-size: 0.9rem;
}

.read-more:hover {
    color: var(--primary-dark);
}

.contact {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    color: white;
    text-align: center;
}

.contact h2 {
    color: white;
}

.contact-content p {
    color: #94a3b8;
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.contact-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: white;
    text-decoration: none;
    padding: 1rem 2rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    transition: all 0.3s;
}

.contact-link:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.contact-icon {
    font-size: 1.5rem;
}

footer {
    background: #0f172a;
    color: #94a3b8;
    text-align: center;
    padding: 2rem;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    overflow-y: auto;
    padding: 2rem;
}

.modal.active {
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.modal-content {
    background: white;
    border-radius: 20px;
    width: 100%;
    max-width: 800px;
    position: relative;
    padding: 2rem;
    margin-top: 2rem;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    animation: modalSlideIn 0.3s ease;
}

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

.close-btn {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.3s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

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

.blog-article {
    padding: 1rem;
}

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

.blog-article h2 {
    margin: 0.5rem 0 1.5rem;
    font-size: 1.8rem;
    color: var(--text-primary);
}

.blog-body {
    line-height: 1.8;
    color: var(--text-primary);
}

.blog-body h1, .blog-body h2, .blog-body h3 {
    margin: 1.5rem 0 1rem;
    color: var(--text-primary);
}

.blog-body p {
    margin-bottom: 1rem;
}

.blog-body ul, .blog-body ol {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.blog-body li {
    margin-bottom: 0.5rem;
}

.blog-body pre {
    background: #1e293b;
    color: #e2e8f0;
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 1rem 0;
}

.blog-body code {
    font-family: 'Consolas', monospace;
    font-size: 0.9rem;
}

.blog-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}

.blog-body td {
    padding: 0.5rem;
    border: 1px solid var(--border-color);
}

.admin-panel {
    padding: 1rem;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.admin-section {
    margin-bottom: 2rem;
}

.admin-section h3 {
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.admin-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.admin-form input,
.admin-form textarea,
.admin-form select {
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
}

.admin-form textarea {
    min-height: 150px;
    resize: vertical;
}

.admin-form button {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.admin-btn-primary {
    background: var(--primary-color);
    color: white;
}

.admin-btn-primary:hover {
    background: var(--primary-dark);
}

.admin-btn-secondary {
    background: var(--secondary-color);
    color: white;
}

.admin-btn-danger {
    background: #ef4444;
    color: white;
}

.article-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.article-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: var(--bg-color);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.article-item-info h4 {
    margin: 0 0 0.5rem;
    color: var(--text-primary);
}

.article-item-info span {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.article-item-actions {
    display: flex;
    gap: 0.5rem;
}

.article-item-actions button {
    padding: 0.5rem 1rem;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-size: 0.85rem;
}

.login-form {
    max-width: 400px;
    margin: 2rem auto;
    padding: 2rem;
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
}

.login-form h2 {
    text-align: center;
    margin-bottom: 1.5rem;
}

.login-form input {
    width: 100%;
    padding: 0.875rem;
    margin-bottom: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
}

.login-form button {
    width: 100%;
    padding: 0.875rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
}

.login-form button:hover {
    background: var(--primary-dark);
}

.login-error {
    color: #ef4444;
    margin-bottom: 1rem;
    text-align: center;
}

.tool-container {
    padding: 1rem 0;
}

.tool-input {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    margin-bottom: 1rem;
    resize: vertical;
    min-height: 120px;
    font-family: inherit;
}

.tool-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.tool-output {
    background: var(--bg-color);
    padding: 1.5rem;
    border-radius: 8px;
    margin-top: 1.5rem;
    border: 1px solid var(--border-color);
    white-space: pre-wrap;
    font-family: 'Consolas', monospace;
    font-size: 0.9rem;
    display: none;
}

.tool-output.visible {
    display: block;
}

.tool-btn {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    border: none;
    padding: 0.875rem 2rem;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3);
}

.tool-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
}

.tool-btn:disabled {
    background: var(--text-secondary);
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.copy-btn {
    background: var(--secondary-color);
    margin-left: 1rem;
}

@media (max-width: 768px) {
    .hero {
        flex-direction: column;
        text-align: center;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero-buttons {
        justify-content: center;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 1rem;
        gap: 0;
        box-shadow: var(--shadow);
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links li {
        padding: 0.75rem 0;
    }

    .mobile-menu-btn {
        display: block;
    }

    .contact-links {
        flex-direction: column;
        align-items: center;
    }
}
