/* ===== VARIABLES ===== */
:root {
    /* Colors - Sistem Warna Terpadu */
    --bg-primary: #0a0a0f;
    --bg-secondary: #111118;
    --bg-card: #1a1a22;
    --text-primary: #4dabf7;
    --text-secondary: #74c0fc;
    --text-muted: #8fa3bf;
    --accent: #ff6b8b;
    --accent-secondary: #20c997;
    --accent-teal: #64ffda;
    --accent-cyan: #4ecdc4;
    --accent-yellow: #ffd166;
    --success: #20c997;
    --warning: #ffc107;
    --danger: #ff6b6b;
    --border-color: #2d2d3a;
    --border-light: #3a3a4a;
    
    /* Shadows */
    --shadow-glow: 0 0 20px rgba(77, 171, 247, 0.1);
    --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.2);
    --shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.3);
    
    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Borders */
    --border-radius: 12px;
    --border-radius-sm: 8px;
    --border-radius-lg: 16px;
}

/* ===== RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'VT323', monospace;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    max-width: 500px;
    margin: 0 auto;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 30%, #0d1127 0%, transparent 70%),
        radial-gradient(circle at 80% 80%, #111827 0%, transparent 70%);
    pointer-events: none;
    z-index: -1;
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4 {
    font-family: 'Share Tech Mono', monospace;
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }

p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}

/* ===== LAYOUT ===== */
.container {
    width: 100%;
    max-width: 500px;
    padding: 0 20px;
    margin: 0 auto;
}

section {
    padding: 60px 0;
    position: relative;
}

.section-title {
    position: relative;
    margin-bottom: 2rem;
    padding-bottom: 10px;
    text-align: center;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--accent-secondary));
}

.section-subtitle {
    color: var(--text-muted);
    margin-bottom: 2rem;
    font-size: 1rem;
    text-align: center;
}

/* ===== HEADER & NAVIGATION ===== */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(10, 10, 15, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    padding: 15px 20px;
    max-width: 500px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: 'Share Tech Mono', monospace;
    font-size: 1.5rem;
}

.logo span:first-child {
    color: var(--accent);
}

.logo span:last-child {
    color: var(--accent-secondary);
}

.nav-links {
    display: flex;
    gap: 5px;
    list-style: none;
}

.nav-links li {
    flex: 1;
}

.nav-links a {
    display: block;
    text-align: center;
    padding: 8px 5px;
    font-size: 0.8rem;
    border-radius: var(--border-radius-sm);
    background: rgba(26, 26, 34, 0.5);
    border: 1px solid transparent;
    transition: var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text-primary);
    background: rgba(77, 171, 247, 0.1);
    border-color: rgba(77, 171, 247, 0.3);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.2rem;
    cursor: pointer;
}

/* ===== HERO SECTION ===== */
.hero {
    padding-top: 100px;
    padding-bottom: 60px;
}

.profile-container {
    text-align: center;
}

.profile-image {
    position: relative;
    width: 180px;
    height: 180px;
    margin: 0 auto 20px;
}

.profile-photo {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid transparent;
    background: linear-gradient(45deg, var(--accent), var(--accent-secondary), var(--text-primary)) border-box;
    animation: float 6s ease-in-out infinite;
    box-shadow: var(--shadow-glow);
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.profile-badge {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: linear-gradient(45deg, var(--accent), var(--accent-secondary));
    color: #0a0a0f;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.typing-text {
    display: inline-block;
    overflow: hidden;
    white-space: nowrap;
    border-right: 3px solid var(--accent);
    animation: typing 3.5s steps(40, end), blink 1s step-end infinite;
}

@keyframes typing {
    from { width: 0 }
    to { width: 100% }
}

@keyframes blink {
    from, to { border-color: transparent }
    50% { border-color: var(--accent) }
}

.role-badges {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 15px 0;
    flex-wrap: wrap;
}

.badge {
    padding: 6px 12px;
    border-radius: 25px;
    font-size: 0.8rem;
    font-weight: bold;
}

.badge.seo {
    background: rgba(32, 201, 151, 0.1);
    color: var(--accent-secondary);
    border: 1px solid rgba(32, 201, 151, 0.3);
}

.badge.dev {
    background: rgba(255, 107, 139, 0.1);
    color: var(--accent);
    border: 1px solid rgba(255, 107, 139, 0.3);
}

.tagline {
    font-size: 1.1rem;
    max-width: 400px;
    margin: 20px auto;
    color: var(--text-secondary);
}

.stats {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 30px 0;
    flex-wrap: wrap;
}

.stat {
    text-align: center;
    min-width: 80px;
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    color: var(--accent);
    margin-bottom: 5px;
    font-family: 'Share Tech Mono', monospace;
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 30px;
    flex-wrap: wrap;
}

/* ===== ABOUT SECTION ===== */
.about-grid {
    display: grid;
    gap: 20px;
    margin-top: 30px;
}

.about-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 20px;
    transition: var(--transition);
}

.about-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: var(--text-primary);
}

.about-card h3 {
    color: var(--accent);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.2rem;
}

.skill-list {
    list-style: none;
}

.skill-list li {
    margin-bottom: 12px;
}

.skill-bar {
    height: 6px;
    background: var(--border-color);
    border-radius: 4px;
    margin-top: 5px;
    overflow: hidden;
}

.skill-level {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--accent-secondary));
    border-radius: 4px;
    transition: width 1.5s ease-in-out;
}

.approach-list p {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.approach-list i {
    color: var(--success);
}

/* ===== PORTFOLIO SECTION ===== */
.portfolio-grid {
    display: grid;
    gap: 20px;
    margin-top: 30px;
}

.portfolio-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: var(--transition);
}

.portfolio-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: var(--text-primary);
}

.portfolio-image {
    height: 150px;
    overflow: hidden;
}

.portfolio-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.portfolio-card:hover .portfolio-image img {
    transform: scale(1.05);
}

.portfolio-content {
    padding: 15px;
}

.portfolio-content h3 {
    color: var(--accent);
    margin-bottom: 8px;
    font-size: 1.2rem;
}

.portfolio-content p {
    margin-bottom: 12px;
    font-size: 0.9rem;
}

.portfolio-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tag {
    background: rgba(77, 171, 247, 0.1);
    color: var(--text-secondary);
    padding: 3px 10px;
    border-radius: 15px;
    font-size: 0.75rem;
    border: 1px solid rgba(77, 171, 247, 0.2);
}

/* ===== BLOG SECTION ===== */
.blog-filters {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.filter-btn {
    background: transparent;
    border: 1px solid var(--accent-teal);
    color: var(--accent-teal);
    padding: 6px 15px;
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition);
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.8rem;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--accent-teal);
    color: #0a192f;
}

.blog-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.blog-card {
    background: #112240;
    border-radius: 10px;
    overflow: hidden;
    transition: var(--transition);
    border: 1px solid #233554;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(100, 255, 218, 0.1);
}

.blog-card-image {
    position: relative;
    height: 180px;
    overflow: hidden;
}

.blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.blog-card:hover .blog-card-image img {
    transform: scale(1.1);
}

.blog-card-category {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: bold;
    text-transform: uppercase;
}

.blog-card-content {
    padding: 20px;
}

.blog-card-title {
    color: #e6f1ff;
    margin-bottom: 10px;
    font-size: 1.1rem;
    line-height: 1.4;
}

.blog-card-desc {
    color: #8892b0;
    margin-bottom: 15px;
    font-size: 0.9rem;
    line-height: 1.6;
}

.blog-card-meta {
    display: flex;
    justify-content: space-between;
    color: #8892b0;
    font-size: 0.75rem;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #233554;
}

.load-more-container {
    text-align: center;
    margin-top: 30px;
}

.btn-load-more {
    background: transparent;
    color: var(--accent-teal);
    border: 2px solid var(--accent-teal);
    padding: 10px 30px;
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition);
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.9rem;
}

.btn-load-more:hover {
    background: var(--accent-teal);
    color: #0a192f;
}

/* ===== CONTACT SECTION ===== */
.contact-container {
    display: grid;
    gap: 30px;
    margin-top: 30px;
}

.contact-form {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 20px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 14px;
    background: rgba(26, 26, 34, 0.8);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    color: var(--text-primary);
    font-family: 'VT323', monospace;
    font-size: 0.9rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--text-primary);
    box-shadow: 0 0 0 2px rgba(77, 171, 247, 0.1);
}

.form-message {
    margin-top: 15px;
    padding: 10px;
    border-radius: var(--border-radius-sm);
    font-size: 0.9rem;
}

.form-message.success {
    background: rgba(32, 201, 151, 0.1);
    color: var(--success);
    border: 1px solid rgba(32, 201, 151, 0.3);
}

.form-message.error {
    background: rgba(255, 107, 107, 0.1);
    color: var(--danger);
    border: 1px solid rgba(255, 107, 107, 0.3);
}

.contact-info {
    display: grid;
    gap: 15px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 15px;
    transition: var(--transition);
}

.contact-item:hover {
    border-color: var(--text-primary);
    transform: translateY(-3px);
}

.contact-icon {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, var(--accent), var(--accent-secondary));
    border-radius: var(--border-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: #0a0a0f;
    flex-shrink: 0;
}

.contact-details h3 {
    font-size: 0.9rem;
    margin-bottom: 4px;
    color: var(--accent);
}

.contact-details p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 20px;
}

.social-link {
    width: 40px;
    height: 40px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: var(--text-secondary);
    transition: var(--transition);
}

.social-link:hover {
    color: var(--text-primary);
    border-color: var(--text-primary);
    transform: translateY(-3px);
}

/* ===== FOOTER ===== */
footer {
    background: var(--bg-secondary);
    padding: 40px 0 20px;
    border-top: 1px solid var(--border-color);
}

.footer-logo {
    text-align: center;
    font-family: 'Share Tech Mono', monospace;
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.footer-tagline {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.footer-nav {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.footer-nav a {
    color: var(--text-secondary);
    font-size: 0.85rem;
    transition: var(--transition);
}

.footer-nav a:hover {
    color: var(--text-primary);
}

.copyright {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8rem;
    padding-top: 20px;
    border-top: 1px solid var(--border-light);
}

.copyright p {
    margin-bottom: 5px;
}

.copyright i {
    color: var(--danger);
    animation: heartbeat 1.5s ease-in-out infinite;
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    font-family: 'VT323', monospace;
    font-size: 1rem;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    min-height: 44px;
    min-width: 44px;
}

.btn-primary {
    background: linear-gradient(90deg, var(--accent), var(--accent-secondary));
    color: #0a0a0f;
    font-weight: bold;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--text-primary);
}

.btn-outline:hover {
    background: rgba(77, 171, 247, 0.1);
    transform: translateY(-3px);
}

.btn-secondary {
    background: transparent;
    color: var(--accent-teal);
    border: 1px solid var(--accent-teal);
}

.btn-secondary:hover {
    background: var(--accent-teal);
    color: #0a192f;
    transform: translateY(-3px);
}

.btn-success {
    background: linear-gradient(90deg, var(--success), var(--accent-secondary));
    color: #0a0a0f;
    font-weight: bold;
}

/* ===== ADMIN STYLES ===== */
.admin-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent-secondary));
    color: #0a0a0f;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 100;
    box-shadow: var(--shadow-hover);
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.admin-btn:hover {
    transform: scale(1.1) rotate(90deg);
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    overflow-y: auto;
    padding: 20px;
}

.modal.active {
    display: block;
}

.modal-content {
    max-width: 500px;
    margin: 50px auto;
    background: var(--bg-card);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h2 {
    margin: 0;
    color: var(--accent);
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.3rem;
}

.close-modal {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px;
    line-height: 1;
}

.modal-body {
    padding: 20px;
}

.admin-login,
.admin-dashboard {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.demo-credentials {
    margin-top: 15px;
    padding: 12px;
    background: rgba(77, 171, 247, 0.1);
    border-radius: var(--border-radius-sm);
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.demo-credentials code {
    background: rgba(0, 0, 0, 0.3);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Share Tech Mono', monospace;
}

.admin-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.blog-form {
    background: rgba(26, 26, 34, 0.5);
    border: 1px solid var(--border-light);
    border-radius: var(--border-radius);
    padding: 15px;
    margin-bottom: 20px;
}

.blog-form h3 {
    margin-bottom: 15px;
    color: var(--accent);
    display: flex;
    align-items: center;
    gap: 8px;
}

.image-preview {
    margin-top: 10px;
    padding: 10px;
    background: rgba(26, 26, 34, 0.8);
    border-radius: var(--border-radius-sm);
    text-align: center;
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.image-preview img {
    max-width: 100%;
    max-height: 150px;
    border-radius: var(--border-radius-sm);
}

.search-box {
    position: relative;
    margin-bottom: 15px;
}

.search-box input {
    width: 100%;
    padding: 10px 14px 10px 35px;
    background: rgba(26, 26, 34, 0.8);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    color: var(--text-primary);
    font-family: 'VT323', monospace;
    font-size: 0.9rem;
}

.search-box i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.blog-list-section {
    margin-top: 20px;
}

.blog-list {
    max-height: 300px;
    overflow-y: auto;
}

.admin-blog-item {
    background: rgba(26, 26, 34, 0.5);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    padding: 15px;
    margin-bottom: 10px;
    transition: var(--transition);
}

.admin-blog-item:hover {
    border-color: var(--text-primary);
    background: rgba(77, 171, 247, 0.1);
}

.blog-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.blog-item-title {
    font-size: 1rem;
    color: var(--text-primary);
    margin: 0;
    flex: 1;
}

.blog-item-category {
    background: rgba(77, 171, 247, 0.2);
    color: var(--text-primary);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: bold;
    margin-left: 10px;
}

.blog-item-meta {
    display: flex;
    gap: 10px;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.blog-item-desc {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 10px;
}

.blog-item-actions {
    display: flex;
    gap: 8px;
}

.btn-small {
    padding: 6px 12px;
    font-size: 0.8rem;
    min-height: 36px;
}

.btn-danger {
    background: linear-gradient(90deg, var(--danger), #ff8a8a);
    color: white;
}

/* ===== TOAST NOTIFICATIONS ===== */
.toast {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    max-width: 500px;
    margin: 0 auto;
    padding: 12px 20px;
    border-radius: var(--border-radius);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-size: 0.85rem;
    z-index: 1000;
    transform: translateY(100px);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    box-shadow: var(--shadow-hover);
    text-align: center;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast.success {
    border-color: var(--success);
    color: var(--success);
}

.toast.error {
    border-color: var(--danger);
    color: var(--danger);
}

/* ===== LOADING STATES ===== */
.loading-state,
.no-blogs,
.error-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}

.loading-spinner {
    font-size: 1.5rem;
    color: var(--accent);
    margin-bottom: 10px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.loading {
    text-align: center;
    padding: 20px;
    color: var(--text-muted);
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 500px) {
    html {
        font-size: 14px;
    }
    
    .container {
        padding: 0 15px;
    }
    
    section {
        padding: 50px 0;
    }
    
    header {
        padding: 10px 15px;
    }
    
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg-card);
        flex-direction: column;
        padding: 10px;
        border-top: 1px solid var(--border-color);
        z-index: 1000;
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .hero {
        padding-top: 80px;
    }
    
    .profile-image {
        width: 150px;
        height: 150px;
    }
    
    .stats {
        gap: 15px;
    }
    
    .stat {
        min-width: 70px;
    }
    
    .stat-number {
        font-size: 1.8rem;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 250px;
    }
    
    .modal-content {
        margin: 20px auto;
    }
    
    .admin-actions {
        flex-direction: column;
    }
    
    .admin-actions .btn {
        width: 100%;
    }
    
    .blog-item-actions {
        flex-direction: column;
    }
    
    .blog-item-actions .btn {
        width: 100%;
    }
}

@media (max-width: 375px) {
    .role-badges {
        flex-direction: column;
        align-items: center;
    }
    
    .stats {
        gap: 10px;
    }
    
    .stat {
        min-width: 60px;
    }
}

/* ===== UTILITY CLASSES ===== */
.text-center { text-align: center; }
.text-primary { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-muted { color: var(--text-muted); }
.text-accent { color: var(--accent); }

.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }

.flex { display: flex; }
.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}
.flex-column { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.gap-1 { gap: 1rem; }
.gap-2 { gap: 2rem; }

.hidden { display: none; }

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}


/* assets/css/admin.css - COMPLETE VERSION */

/* ========== ADMIN BUTTON ========== */
.admin-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    font-size: 20px;
    cursor: pointer;
    z-index: 1000;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.admin-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* ========== MODAL ========== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    overflow-y: auto;
    animation: fadeIn 0.3s ease;
}

.modal.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: #1a1a1a;
    border-radius: 12px;
    width: 95%;
    max-width: 1000px;
    margin: 20px auto;
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid #333;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px 12px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 10;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.close-modal {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.close-modal:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.modal-body {
    padding: 25px;
}

/* ========== ADMIN LOGIN ========== */
.admin-login {
    max-width: 400px;
    margin: 0 auto;
    padding: 20px;
}

.admin-login h3 {
    text-align: center;
    margin-bottom: 25px;
    color: #667eea;
    font-size: 1.4rem;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #e5e7eb;
    font-weight: 500;
    font-size: 0.95rem;
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    background: #2a2a2a;
    border: 1px solid #444;
    border-radius: 8px;
    color: white;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

.demo-credentials {
    margin-top: 25px;
    padding: 15px;
    background: #2a2a2a;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.demo-credentials p {
    margin: 5px 0;
    font-size: 0.9rem;
}

.demo-credentials code {
    background: #1a1a1a;
    padding: 3px 8px;
    border-radius: 4px;
    color: #667eea;
    font-family: 'Courier New', monospace;
}

/* ========== ADMIN DASHBOARD ========== */
.admin-dashboard {
    display: none;
}

.admin-actions {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

/* ========== INFO BANNER ========== */
.info-banner {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.info-banner i {
    font-size: 1.3rem;
    flex-shrink: 0;
}

.info-banner-content h4 {
    margin: 0 0 5px 0;
    font-size: 1.1rem;
}

.info-banner-content p {
    margin: 0;
    font-size: 0.95rem;
    opacity: 0.9;
}

/* ========== BLOG FORM ========== */
.blog-form {
    background: #2a2a2a;
    padding: 25px;
    border-radius: 10px;
    margin-bottom: 25px;
    border: 1px solid #333;
    display: none;
}

.blog-form h3 {
    margin-top: 0;
    color: #667eea;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    font-size: 1.3rem;
}

.form-group label i {
    margin-right: 8px;
    color: #667eea;
    width: 20px;
    text-align: center;
}

.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    background: #2a2a2a;
    border: 1px solid #444;
    border-radius: 8px;
    color: white;
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
}

/* ========== IMAGE PREVIEW ========== */
.image-preview {
    margin-top: 10px;
    min-height: 120px;
    background: #1a1a1a;
    border-radius: 8px;
    padding: 15px;
    border: 2px dashed #444;
    text-align: center;
    transition: all 0.3s ease;
}

.image-preview:hover {
    border-color: #667eea;
}

.image-preview img {
    max-width: 100%;
    max-height: 200px;
    border-radius: 6px;
    margin-bottom: 10px;
}

.preview-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.preview-text {
    color: #888;
    font-size: 0.9rem;
    margin-top: 8px;
}

/* ========== FORM ACTIONS ========== */
.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 25px;
}

/* ========== BLOG LIST SECTION ========== */
.blog-list-section h3 {
    margin-bottom: 20px;
    color: #667eea;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.3rem;
}

.search-box {
    position: relative;
    margin-bottom: 25px;
}

.search-box input {
    width: 100%;
    padding: 12px 45px 12px 15px;
    background: #2a2a2a;
    border: 1px solid #444;
    border-radius: 8px;
    color: white;
    font-size: 1rem;
}

.search-box i {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #667eea;
    font-size: 1rem;
}

/* ========== BLOG ITEMS ========== */
.blog-item {
    background: #2a2a2a;
    border-radius: 10px;
    margin-bottom: 15px;
    overflow: hidden;
    border-left: 4px solid #667eea;
    transition: all 0.3s ease;
}

.blog-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.blog-item.draft {
    border-left-color: #f59e0b;
    opacity: 0.9;
}

.blog-item-header {
    padding: 12px 15px;
    background: #1a1a1a;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 0.85rem;
}

.blog-status {
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.blog-status.published {
    background: #10b98120;
    color: #10b981;
}

.blog-status.draft {
    background: #f59e0b20;
    color: #f59e0b;
}

.blog-category {
    color: #667eea;
    font-weight: 500;
}

.blog-date {
    color: #888;
}

.blog-views {
    color: #888;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
}

.blog-item-content {
    padding: 15px;
    display: flex;
    gap: 15px;
}

.blog-item-image {
    flex-shrink: 0;
    width: 120px;
    height: 80px;
    border-radius: 6px;
    overflow: hidden;
    background: #1a1a1a;
}

.blog-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.blog-item:hover .blog-item-image img {
    transform: scale(1.05);
}

.blog-item-details {
    flex: 1;
    min-width: 0;
}

.blog-item-details h4 {
    margin: 0 0 8px 0;
    color: white;
    font-size: 1.1rem;
    line-height: 1.4;
}

.blog-description {
    margin: 0 0 10px 0;
    color: #aaa;
    font-size: 0.9rem;
    line-height: 1.5;
}

.blog-item-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.blog-item-tags .tag {
    background: #3b82f620;
    color: #3b82f6;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
}

.blog-item-actions {
    padding: 12px 15px;
    background: #1a1a1a;
    border-top: 1px solid #333;
    display: flex;
    gap: 10px;
    align-items: center;
}

/* ========== BUTTONS ========== */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
    font-size: 0.95rem;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.btn-small {
    padding: 6px 12px;
    font-size: 0.85rem;
    border-radius: 6px;
}

.btn-copy {
    background: #8b5cf6;
    color: white;
    border: none;
}

.btn-copy:hover {
    background: #7c3aed;
    transform: translateY(-2px);
}

.btn-view {
    background: #10b981;
    color: white;
    border: none;
}

.btn-view:hover {
    background: #059669;
    transform: translateY(-2px);
}

.delete-disabled {
    background: #6b7280 !important;
    color: #9ca3af !important;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    cursor: not-allowed;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    opacity: 0.7;
    margin-left: auto;
}

.btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* ========== LOADING & ERROR STATES ========== */
.loading {
    text-align: center;
    padding: 40px;
    color: #667eea;
    font-size: 1rem;
}

.loading i {
    margin-right: 10px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.no-data {
    text-align: center;
    padding: 50px 20px;
    color: #888;
}

.no-data i {
    font-size: 3rem;
    margin-bottom: 15px;
    color: #667eea;
    opacity: 0.5;
}

.no-data p {
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.error {
    text-align: center;
    padding: 40px 20px;
    color: #ef4444;
}

.error i {
    font-size: 3rem;
    margin-bottom: 15px;
    color: #ef4444;
}

.error p {
    margin-bottom: 20px;
    font-size: 1.1rem;
}

/* ========== FORM MESSAGES ========== */
.form-message {
    margin-top: 15px;
    padding: 12px 15px;
    border-radius: 6px;
    font-size: 0.9rem;
}

.form-message.success {
    background: #10b98120;
    color: #10b981;
    border: 1px solid #10b981;
}

.form-message.error {
    background: #ef444420;
    color: #ef4444;
    border: 1px solid #ef4444;
}

/* ========== TOAST NOTIFICATIONS ========== */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #1a1a1a;
    color: white;
    padding: 15px 25px;
    border-radius: 8px;
    border-left: 4px solid #667eea;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    z-index: 99999;
    opacity: 0;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 90%;
    min-width: 280px;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.toast.success {
    border-left-color: #10b981;
}

.toast.error {
    border-left-color: #ef4444;
}

.toast.warning {
    border-left-color: #f59e0b;
}

.toast.info {
    border-left-color: #3b82f6;
}

/* ========== RESPONSIVE DESIGN ========== */
@media (max-width: 768px) {
    .modal-content {
        width: 100%;
        margin: 0;
        border-radius: 0;
        max-height: 100vh;
        height: 100vh;
    }
    
    .modal-header {
        padding: 15px;
        position: fixed;
        top: 0;
        width: 100%;
        border-radius: 0;
    }
    
    .modal-body {
        padding: 20px 15px;
        margin-top: 60px;
    }
    
    .blog-item-content {
        flex-direction: column;
    }
    
    .blog-item-image {
        width: 100%;
        height: 150px;
    }
    
    .blog-item-header {
        gap: 8px;
        font-size: 0.8rem;
    }
    
    .blog-date,
    .blog-views {
        margin-left: 0;
        width: 100%;
    }
    
    .blog-views {
        order: 4;
    }
    
    .admin-actions {
        flex-direction: column;
    }
    
    .admin-actions button {
        width: 100%;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .form-actions button {
        width: 100%;
    }
    
    .blog-item-actions {
        flex-direction: column;
    }
    
    .blog-item-actions button,
    .delete-disabled {
        width: 100%;
        margin: 0 0 5px 0;
    }
    
    .toast {
        min-width: 250px;
        padding: 12px 20px;
        font-size: 0.9rem;
    }
}

@media (max-width: 768px) {
    .modal-header {
        padding: 15px;
        position: fixed;
        top: 0;
        width: 87%;
        border-radius: 0;
    }

@media (max-width: 480px) {
    .modal-header h2 {
        font-size: 1.2rem;
    }
    
    .blog-form {
        padding: 15px;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 10px 12px;
        font-size: 0.95rem;
    }
    
    .image-preview {
        min-height: 100px;
        padding: 10px;
    }
    
    .admin-btn {
        bottom: 15px;
        right: 15px;
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
}