:root {
    --primary: #2ecc71;
    --primary-dark: #27ae60;
    --primary-light: rgba(46,204,113,.15);
    --text: #2d3748;
    --text-muted: #718096;
    --bg: #f5f7fa;
    --bg-white: #ffffff;
    --border: #e2e8f0;
    --radius: 8px;
    --shadow: 0 2px 10px rgba(0,0,0,.08);
    --header-h: 56px;
    --container-w: 1100px;
    --gap: 24px;
}

*, *::before, *::after { box-sizing: border-box; }
body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4, h5, h6 {color:#ff6600; margin: 0 0 0.6em; line-height: 1.3; }
p { margin: 0 0 1em; }
em, i { font-style: normal; }

/* ================================
   Header
   ================================ */
.site-header {
    background: var(--bg-white);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}
.header-inner {
    max-width: var(--container-w);
    margin: 0 auto;
    padding: 0 var(--gap);
    height: var(--header-h);
    display: flex;
    align-items: center;
    gap: 8px;
}
.site-logo {
    flex-shrink: 0;
    width: 160px;
    height: 50px;
    background-image: url('logo.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: left center;
}
.site-logo a {
    display: block;
    width: 100%;
    height: 100%;
    font-size: 0;
    overflow: hidden;
}
.slogan {font-weight:bold;color:#f43f5e;font-size:20px;}
.slogan h1{font-weight:bold;color:#f43f5e;font-size:25px;margin:0px;padding:0px;} 

/* Main Nav */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text);
    cursor: pointer;
    padding: 4px 8px;
    flex-shrink: 0;
}
.nav-main {
    display: flex;
    gap: 4px;
    flex: 1;
    overflow-x: auto;
    -ms-overflow-style: none;
    scrollbar-width: none;
}
.nav-main::-webkit-scrollbar { display: none; }
.nav-main a {
    padding: 6px 14px;
    border-radius: 6px;
    background: #9999ff;
    color: #fff;
    font-size: 0.95rem;
    white-space: nowrap;
    transition: background .15s, color .15s;
}
.nav-main a:hover,
.nav-main a.active {
    background: var(--primary);
    color: #fff;
    text-decoration: none;
}
.nav-main a.goto {
    background: #FF783C;
    color: #fff;
    border-radius: var(--radius);
}
.nav-main a.goto:hover {
    background: #2ecc71;
    text-decoration: none;
}

/* ================================
   Container
   ================================ */
.site-container {
    max-width: var(--container-w);
    margin: 0 auto;
    padding: var(--gap);
}
main {
    background: var(--bg-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: var(--gap);
    min-height: 400px;
}
.path { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 12px; white-space: nowrap;overflow: hidden;text-overflow: ellipsis;}
.path a { color: var(--text-muted); }
.path a:hover { color: var(--primary); }
/* Article Images */
.article-img {
    max-width: 100%;
    border-radius: var(--radius);
    display: block;
    margin: 0 auto 10px;
}
.note{color:#777777;background-color:#ffffee;border:1px solid #e0e0e0;margin-bottom:9px;text-align:left;line-height:28px;word-wrap:break-word;word-break:break-all;padding:8px;font-size:15px;overflow:hidden;position:relative;}
.note i{font-weight: bold;color:#22c55e;}
.note a:link,.note a:visited {text-decoration: underline;COLOR: #22c55e;text-decoration-style: dashed; text-underline-offset: 3px; }
.note a:hover{color:#ff5500;} 
/* ================================
   Footer
   ================================ */
.site-footer { text-align: center;background: var(--bg-white);border-top: 1px solid var(--border);margin-top: 40px;padding: 15px}
.site-footer a:link,.site-footer a:visited {color:#666666;text-decoration:none;}
.site-footer a:hover{color:#000000;text-decoration: underline} 
/* ================================
   Friend Links
   ================================ */
.friend-links {
    list-style: none;
    padding: 0;
    margin: 0 0 1em;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}
.friend-links li { margin: 0; }
.friend-links a {
    color: #777;
    font-size: 0.875rem;
}

/* ================================
   Lightbox
   ================================ */
.img-overlay {
    position: fixed; inset: 0; z-index: 999;
    background: rgba(0,0,0,.85);
    display: flex; align-items: center; justify-content: center;
}
.img-overlay-img {
    max-width: 90%; max-height: 90%;
    border-radius: 8px; cursor: default;
}
.img-overlay-close {
    position: fixed; top: 16px; right: 24px;
    font-size: 2.5rem; color: #fff;
    background: none; border: none; cursor: pointer;
    line-height: 1;
}
.img-overlay-close:hover { opacity: .7; }

/* ================================
   Popup Overlay
   ================================ */
#opendiv {
    display: none;
    position: fixed; inset: 0; z-index: 1000;
    background: rgba(0,0,0,.5);
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 12px;
}
#divcontent {
    background: #fff;
    border-radius: 8px;
    padding: 24px;
    max-width: 90%;
    max-height: 90%;
    width: auto;
    height: auto;
    overflow-y: auto;
    box-shadow: 0 4px 20px rgba(0,0,0,.2);
}
.popup-close {
    background: none; border: none;
    font-size: 1.2rem; cursor: pointer;
    color: #fff;
    line-height: 1;
}
.popup-close:hover { opacity: .7; }
/* ================================
   Responsive
   ================================ */
/* ================================
   Nav Directory
   ================================ */
.nav-cat { margin-bottom: 28px; }
.nav-cat-title { font-size:18px; border-left: 4px solid #7777ff; padding-left: 12px; margin-bottom: 12px; color:#999999;}
.nav-cat-title a { font-size:18px;color:#7777ff; }
.nav-cat-title a:hover { color:#666666; text-decoration: none; }
.nav-urls { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.nav-urls-full { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.nav-url-item {
    background: #f9fafb; border: 1px solid var(--border); border-radius: var(--radius);
    padding: 10px 12px; transition: box-shadow .15s;
}
.nav-url-item:hover { box-shadow: 0 2px 8px rgba(0,0,0,.06); background-color:#ffffee;}
.nav-url-name {
    font-size: 0.95rem; font-weight: 600; line-height: 1.4; margin-bottom: 3px;
    display: flex; align-items: center; gap: 6px;
}
.nav-url-name a { color: #2c5282; }
.nav-url-name a:hover { color: var(--primary); }
.nav-favicon { flex-shrink: 0; border-radius: 2px; }
.nav-url-desc { font-size: 15px; color: var(--text-muted); line-height: 1.4; margin-bottom: 2px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.nav-url-domain { font-size: 0.78rem; color: #a0aec0; font-family: monospace; }
.nav-cat-page-title { font-size: 1.3rem; border-bottom: 2px solid var(--border); padding-bottom: 10px; margin-bottom: 20px; }
@media (max-width: 640px) {
    .nav-urls { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .menu-toggle { display: block; }
    .nav-main {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        background: var(--bg-white);
        border-top: 1px solid var(--border);
        padding: 8px var(--gap);
        z-index: 100;
        flex: none;
    }
    .nav-main.active { display: flex; }
    .nav-main a {
        padding: 10px 0;
        border-bottom: 1px solid var(--border);
        border-radius: 0;
    }
    .nav-main a:last-child { border-bottom: none; }
    .nav-main a.active { color: var(--primary); font-weight: 600; }
    .nav-main a.goto {
        background: #FF783C;
        color: #fff;
        padding: 10px 14px;
        border-radius: var(--radius);
        margin-bottom: 4px;
        border-bottom: none;
    }

    .site-container { padding: 16px; }
    main { padding: 16px; }
    .header-inner {
        position: relative;
        justify-content: normal;
    }
    .site-logo {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        width: 140px;
    }
	.slogan {display:none;}
    #divcontent { padding: 16px; max-width: 95%; }
}

/* Post Form */
.post-form { max-width: 500px; margin: 0 auto; }
.post-field { margin-bottom: 10px; }
.post-field label { display: inline-block; min-width: 70px; font-weight: 600; font-size: 0.9rem; vertical-align: middle; }
.post-field select,
.post-field input[type="text"],
.post-field input[type="url"],
.post-field input[type="email"] {
  width: calc(100% - 80px); padding: 6px 8px; border: 1px solid var(--border);
  border-radius: var(--radius); font-size: 0.9rem; vertical-align: middle; box-sizing: border-box;
}
.post-field select { width: auto; min-width: 200px; }
.post-field button { padding: 8px 20px; background: var(--primary); color: #fff;
  border: none; border-radius: var(--radius); font-size: 1rem; cursor: pointer; }
.post-field button:hover { opacity: 0.9; }
/* Nav link colors */
.nav-url-name .nav-link-red { color:#ff6600; }
.nav-url-name .nav-link-blue { color:#7777ff; }
#top_div{ position:fixed; bottom:50px; right:10px; display:none;width:50px;height:53px;z-index:20;  } 