* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    overflow-y: scroll;
}

body {
    font-family: "Segoe UI", sans-serif;
    background: #0f172a;
    color: #f8fafc;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 60px;
    background: #111827;
    border-bottom: 1px solid #1f2937;
}

.logo {
    font-size: 32px;
    font-weight: 700;
    text-decoration: none;
    color: #f8fafc;
}

.logo:hover {
    opacity: 0.9;
}

.logo span {
    color: #2563eb;
}

nav {
    display: flex;
    gap: 30px;
}

nav a {
    color: #cbd5e1;
    text-decoration: none;
    font-weight: 500;
    transition: 0.2s;
}

nav a:hover {
    color: #3b82f6;
}

.hero-layout {
    max-width: 1700px;
    margin: 0 auto;
    padding: 0 40px;

    display: grid;
    grid-template-columns: 250px 1fr 250px;
    grid-template-rows: auto;

    gap: 40px;
    align-items: start;
}

.hero-layout > .side-ad:first-child {
    grid-column: 1;
}

.hero-layout > .side-ad:last-child {
    grid-column: 3;
}

main {
    min-width: 0;
    width: 100%;

    grid-column: 2;
    justify-self: stretch;
}

.side-ad {
    margin-top: 150px;
    height: 800px;
    background: #111827;
    border: 1px solid #1f2937;
    box-shadow: 0 10px 25px rgba(0,0,0,0.35);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #64748b;
    font-weight: 600;
}

.hero {
    text-align: center;
    padding: 40px 20px 70px;
}

.hero h1 {
    font-size: clamp(56px, 5vw, 84px);
    line-height: 1.05;
    font-weight: 800;
    color: #f8fafc;
}

.hero h1 span {
    display: block;
    color: #2563eb;
}

.hero p {
    margin-top: 25px;
    font-size: 26px;
    color: #94a3b8;
    max-width: 850px;
    margin-left: auto;
    margin-right: auto;
}

.cta-button {
    display: inline-block;
    margin-top: 50px;
    padding: 30px 70px;
    border-radius: 24px;
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    color: white;
    text-decoration: none;
    box-shadow: 0 20px 40px rgba(37,99,235,0.35);
    transition: 0.2s ease;
}

.cta-button:hover {
    transform: translateY(-4px);
}

.cta-title {
    font-size: 42px;
    font-weight: 700;
}

.cta-subtitle {
    margin-top: 6px;
    opacity: 0.9;
}

.features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    max-width: 1000px;
    margin: 0 auto 100px;
}

.feature-card {
    background: #111827;
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    border: 1px solid #1f2937;
    box-shadow: 0 10px 25px rgba(0,0,0,0.35);
}

.icon {
    font-size: 42px;
    margin-bottom: 15px;
}

.feature-card h3 {
    margin-bottom: 10px;
    font-size: 28px;
    color: #f8fafc;
}

.feature-card p {
    color: #94a3b8;
}

footer {
    margin-top: 100px;
    border-top: 1px solid #1f2937;
    text-align: center;
    padding: 40px;
    color: #94a3b8;
}

.footer-links {
    margin-top: 15px;
    display: flex;
    justify-content: center;
    gap: 30px;
}

.footer-links a {
    color: #3b82f6;
    text-decoration: none;
}

.footer-links a:hover {
    color: #60a5fa;
}

@media (max-width: 1000px) {

    .hero-layout {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    main {
        width: 100%;
        max-width: none;
        order: 1;
    }

    .side-ad {
        order: 2;
        width: 100%;
        max-width: 1000px;
        height: 180px;
        margin: 0 auto 0px;
    }

    .features {
        grid-template-columns: 1fr;
    }

}

@media (max-width: 900px) {

    .navbar {
        flex-direction: column;
        gap: 20px;
    }

    nav {
        flex-wrap: wrap;
        justify-content: center;
    }

    .hero h1 {
        font-size: 52px;
    }

    .hero p {
    font-size: clamp(18px, 2vw, 26px);
    }

    .cta-title {
        font-size: 32px;
    }
}

/* TEXT QR GENERATOR */

.generator-container {
    max-width: 1000px;
    margin: 0 auto 70px;
}

.generator-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.input-panel,
.preview-panel {
    background: #111827;
    border: 1px solid #1f2937;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.35);
}

.input-panel h2,
.preview-panel h2 {
    margin-bottom: 20px;
    color: #f8fafc;
}

textarea {
    width: 100%;
    height: 220px;
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 12px;
    color: #f8fafc;
    padding: 15px;
    font-size: 16px;
    resize: none;
    margin-bottom: 20px;
}

textarea:focus {
    outline: none;
    border-color: #2563eb;
}

.generate-btn,
.download-btn {
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
}

.generate-btn:hover,
.download-btn:hover {
    transform: translateY(-2px);
}

.preview-panel {
    text-align: center;
}

#qrcode {
    min-height: 260px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 30px;
}

#qrcode img,
#qrcode canvas {
    background: white;
    padding: 15px;
    border-radius: 12px;
}

.tool-links {
    max-width: 1000px;
    margin: 60px auto 0;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
}

.tool-card {
    background: #111827;
    border: 1px solid #1f2937;
    border-radius: 16px;
    padding: 25px;
    text-align: center;
    text-decoration: none;
    color: #f8fafc;
    transition: 0.2s;
}

.tool-card:hover {
    transform: translateY(-4px);
    border-color: #2563eb;
}

.tool-card h3 {
    margin-top: 10px;
    font-size: 18px;
}


@media (max-width: 900px) {

    .tool-links {
        grid-template-columns: repeat(2, 1fr);
    }

    .tool-card:last-child {
        grid-column: 1 / -1;
    }

}

.char-counter {
    background: transparent;
    text-align: right;
    margin-bottom: 25px;
    color: #94a3b8;
    font-size: 14px;
    transition: 0.2s;
}

.char-counter.limit-reached {
    color: #ef4444;
    font-weight: 600;
}

#qrLabel {
    margin-top: 12px;
    font-size: 16px;
    font-weight: 700;
    color: #f8fafc;
    text-align: center;
    word-break: break-word;
}

#qrUrl,
#qrEmail,
#qrPhone,
#wifiSSID,
#wifiPassword {
    width: 100%;
    height: 55px;
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 12px;
    color: #f8fafc;
    padding: 15px;
    font-size: 16px;
    margin-bottom: 20px;
}

#qrUrl:focus,
#qrEmail:focus,
#qrPhone:focus,
#wifiSSID:focus,
#wifiPassword:focus {
    outline: none;
    border-color: #2563eb;
}

#wifiSecurity {
    width: 100%;
    height: 55px;
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 12px;
    color: #f8fafc;
    padding: 0 15px;
    font-size: 16px;
    margin-bottom: 20px;
}

#wifiSecurity:focus {
    outline: none;
    border-color: #2563eb;
}

/* BLOG */

.blog-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 30px;
}

.blog-hero {
    text-align: center;
    margin-bottom: 60px;
}

.blog-hero h1 {
    font-size: 56px;
    margin-bottom: 15px;
}

.blog-hero p {
    color: #94a3b8;
    font-size: 20px;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.blog-card {
    background: #111827;
    border: 1px solid #1f2937;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.35);
}

.blog-card h2 {
    margin-bottom: 15px;
    font-size: 28px;
}

.blog-card p {
    color: #94a3b8;
    margin-bottom: 20px;
}

.blog-card a {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 600;
}

.blog-card a:hover {
    color: #60a5fa;
}

@media (max-width: 900px) {

    .blog-grid {
        grid-template-columns: 1fr;
    }

}

.blog-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 20px;
}

.blog-layout {
    max-width: 1900px;
    margin: 0 auto;
    padding: 0 40px;
    display: grid;
    grid-template-columns: 250px 1fr 250px;
    gap: 40px;
    align-items: start;
}

@media (max-width: 1600px) {

    .blog-layout {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .blog-container {
        width: 100%;
        max-width: 1200px;
    }

    .blog-layout .side-ad {
        width: 100%;
        max-width: 1200px;
        height: 180px;
        margin-top: 20px;
    }

}

/* BLOG ARTICLE */

.blog-article {
    max-width: 900px;
    margin: 0 auto;
}

.blog-article-image {
    width: 100%;
    border-radius: 20px;
    margin-bottom: 30px;
}

.blog-article h1 {
    font-size: 56px;
    margin-bottom: 10px;
}

.article-date {
    color: #94a3b8;
    margin-bottom: 30px;
}

.blog-article h2 {
    margin-top: 40px;
    margin-bottom: 15px;
    font-size: 32px;
}

.blog-article p,
.blog-article li {
    color: #cbd5e1;
    line-height: 1.8;
    font-size: 18px;
}

.blog-article ul,
.blog-article ol {
    margin-left: 30px;
    margin-top: 15px;
}

.related-articles {
    text-align: center;
    margin-top: 80px;
}

.related-articles ul {
    list-style-position: inside;
    list-style: none;
    padding: 0;
}

.related-articles li {
    margin: 8px 0;
}

.theme-toggle {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 18px;
    color: #cbd5e1;
    padding: 0;
    margin-left: 10px;
    transition: 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-toggle:hover {
    color: #3b82f6;
}

/* LIGHT MODE */

html.light-mode body {
    background: #ffffff;
    color: #111827;
}

html.light-mode .navbar {
    background: #f3f4f6;
    border-bottom: 1px solid #d1d5db;
}

html.light-mode .logo,
html.light-mode h1,
html.light-mode h2,
html.light-mode h3 {
    color: #111827;
}

html.light-mode p,
html.light-mode li {
    color: #374151;
}

html.light-mode .feature-card,
html.light-mode .tool-card,
html.light-mode .blog-card,
html.light-mode .input-panel,
html.light-mode .preview-panel,
html.light-mode .side-ad {
    background: #ffffff;
    border: 1px solid #d1d5db;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}

html.light-mode textarea,
html.light-mode input,
html.light-mode select {
    background: #f9fafb;
    color: #111827;
    border: 1px solid #d1d5db;
}

html.light-mode footer {
    border-top: 1px solid #d1d5db;
    color: #6b7280;
}

html.light-mode nav a {
    color: #374151;
}

html.light-mode nav a:hover {
    color: #2563eb;
}

html.light-mode .logo span {
    color: #2563eb;
}

html.light-mode #qrUrl,
html.light-mode #qrEmail,
html.light-mode #qrPhone,
html.light-mode #wifiSSID,
html.light-mode #wifiPassword,
html.light-mode #wifiSecurity {
    background: #f9fafb;
    color: #111827;
    border: 1px solid #d1d5db;
}

html.light-mode #qrUrl::placeholder,
html.light-mode #qrEmail::placeholder,
html.light-mode #qrPhone::placeholder,
html.light-mode #wifiSSID::placeholder,
html.light-mode #wifiPassword::placeholder {
    color: #6b7280;
}

textarea,
input,
select {
    font-family: Consolas, monospace;
}