/* ========================================
   Wayground Bot - WordPress-Style Theme
   Clean, Contained, Professional
   ======================================== */

/* CSS Variables */
:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #3b82f6;
    --text: #1e293b;
    --text-light: #64748b;
    --text-lighter: #94a3b8;
    --bg: #f8fafc;
    --bg-white: #ffffff;
    --bg-section: #f1f5f9;
    --border: #e2e8f0;
    --success: #10b981;
    --error: #ef4444;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --radius: 6px;
    --radius-lg: 10px;
    --max-width: 1140px;
    --header-height: 64px;
}

/* Reset & Base */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.7;
    color: var(--text);
    background: var(--bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: var(--primary);
    text-decoration: none;
}

a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

ul,
ol {
    list-style-position: outside;
    padding-left: 1.25rem;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 600;
    line-height: 1.3;
    color: var(--text);
}

h1 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

h2 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

p {
    margin-bottom: 1rem;
    color: var(--text-light);
}

/* Container - WordPress style boxed */
.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: var(--bg-white);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-height);
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text);
    text-decoration: none;
}

.logo:hover {
    text-decoration: none;
    color: var(--primary);
}

.logo svg {
    width: 28px;
    height: 28px;
}

.nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav a {
    color: var(--text-light);
    font-size: 0.9rem;
    font-weight: 500;
    padding: 8px 14px;
    border-radius: var(--radius);
    text-decoration: none;
    transition: all 0.15s;
}

.nav a:hover,
.nav a.active {
    color: var(--primary);
    background: rgba(37, 99, 235, 0.08);
    text-decoration: none;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.mobile-menu-btn svg {
    width: 22px;
    height: 22px;
    color: var(--text);
}

/* Main Content Wrapper */
.main-wrapper {
    flex: 1;
    padding: 20px 0 40px 0;
}

/* Hero Section - Contained Box */
.hero-box {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 30px 30px;
    margin-bottom: 32px;
}

.hero-box .inner {
    margin: 0 auto;
    text-align: center;
}

.hero-box h1 {
    font-size: 1.875rem;
    margin-bottom: 12px;
}

.hero-box p {
    font-size: 1.0625rem;
    color: var(--text-light);
    margin-bottom: 0;
}

/* Tool Card - Contained */
.tool-box {
    background:
        linear-gradient(var(--bg-white), var(--bg-white)) padding-box,
        linear-gradient(to right, var(--primary), #8b5cf6) border-box;

    border: 2px solid transparent;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 20px 0 40px 0;
    margin-bottom: 32px;
}

.tool-box .tool-inner {
    max-width: 600px;
    margin: 0 auto;
}

.tool-box h2 {
    font-size: 1.125rem;
    text-align: center;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    font-size: 1rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #f8fafc;
    color: var(--text);
    transition: all 0.2s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--bg-white);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.form-group input::placeholder {
    color: var(--text-lighter);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 24px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    gap: 8px;
    letter-spacing: 0.01em;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    width: 100%;
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.2), 0 2px 4px -1px rgba(37, 99, 235, 0.1);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(37, 99, 235, 0.3), 0 4px 6px -2px rgba(37, 99, 235, 0.15);
    filter: brightness(1.05);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary:disabled {
    background: var(--text-lighter);
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.status-box {
    margin-top: 20px;
    padding: 14px 16px;
    border-radius: var(--radius);
    background: var(--bg-section);
    border: 1px solid var(--border);
    display: none;
}

.status-box.visible {
    display: block;
}

.status-box.success {
    background: #ecfdf5;
    border-color: #a7f3d0;
}

.status-box.error {
    background: #fef2f2;
    border-color: #fecaca;
}

.status-title {
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 2px;
}

.status-message {
    font-size: 0.8125rem;
    color: var(--text-light);
    margin: 0;
}

/* Content Box - WordPress Style */
.content-box {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 32px 40px;
    margin-bottom: 32px;
}

.content-box h2 {
    font-size: 1.375rem;
    margin-bottom: 8px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.content-box h3 {
    font-size: 1.125rem;
    margin-top: 24px;
}

.content-box p {
    line-height: 1.75;
}

/* Features Grid - Contained */
.features-box {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 40px;
    margin-bottom: 32px;
}

.features-box .box-header {
    text-align: center;
    margin-bottom: 32px;
}

.features-box .box-header h2 {
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.features-box .box-header p {
    color: var(--text-light);
    margin: 0;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.feature-card {
    background: var(--bg-section);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
}

.feature-icon {
    width: 44px;
    height: 44px;
    background: var(--primary);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
}

.feature-icon svg {
    width: 22px;
    height: 22px;
    color: white;
}

.feature-card h3 {
    font-size: 1rem;
    margin-bottom: 8px;
}

.feature-card p {
    font-size: 0.875rem;
    color: var(--text-light);
    margin: 0;
    line-height: 1.6;
}

/* Steps Box */
.steps-box {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 40px;
    margin-bottom: 32px;
}

.steps-box .box-header {
    text-align: center;
    margin-bottom: 32px;
}

.steps-box .box-header h2 {
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.step-card {
    text-align: center;
    padding: 20px 16px;
    background: var(--bg-section);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.step-number {
    width: 40px;
    height: 40px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 600;
    margin: 0 auto 12px;
}

.step-card h3 {
    font-size: 0.9375rem;
    margin-bottom: 6px;
}

.step-card p {
    font-size: 0.8125rem;
    color: var(--text-light);
    margin: 0;
    line-height: 1.5;
}

/* FAQ Box */
.faq-box {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 40px;
}

.faq-box .box-header {
    text-align: center;
    margin-bottom: 24px;
}

.faq-box .box-header h2 {
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.faq-list {
    margin: 0 auto;
}

.faq-item {
    border-bottom: 1px solid var(--border);
    padding: 16px 0;
}

.faq-item:last-child {
    border-bottom: none;
}

.faq-question {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: color 0.2s;
}

.faq-question svg {
    width: 20px;
    height: 20px;
    color: var(--text-light);
    transition: transform 0.3s ease;
}

.faq-item.open .faq-question {
    color: var(--primary);
}

.faq-item.open .faq-question svg {
    transform: rotate(180deg);
    color: var(--primary);
}

.faq-answer {
    padding-top: 10px;
    font-size: 0.875rem;
    color: var(--text-light);
    line-height: 1.7;
    display: none;
}

.faq-item.open .faq-answer {
    display: block;
}

/* Content Page Box */
.page-box {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 40px 48px;
    max-width: 800px;
    margin: 0 auto;
}

.page-box h1 {
    font-size: 1.75rem;
    margin-bottom: 8px;
}

.page-box .updated {
    font-size: 0.8125rem;
    color: var(--text-lighter);
    margin-bottom: 24px;
}

.page-box h2 {
    font-size: 1.25rem;
    margin-top: 28px;
    margin-bottom: 12px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.page-box h2:first-of-type {
    border-top: none;
    padding-top: 0;
}

.page-box h3 {
    font-size: 1.0625rem;
    margin-top: 20px;
}

.page-box ul,
.page-box ol {
    margin-bottom: 1rem;
}

.page-box li {
    margin-bottom: 6px;
    color: var(--text-light);
    line-height: 1.7;
}

.page-box .highlight-box {
    background: var(--bg-section);
    padding: 20px 24px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    margin: 20px 0;
}

/* Footer */
.footer {
    background: var(--bg-white);
    border-top: 1px solid var(--border);
    padding: 24px 0;
    margin-top: auto;
}

.footer .container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    text-align: center;
}

.footer-links {
    display: flex;
    gap: 25px;
}

.footer-links a {
    color: var(--text-light);
    font-size: 1rem;
    text-decoration: none;
}

.footer-links a:hover {
    color: var(--primary);
    text-decoration: none;
}

.copyright {
    font-size: 0.8125rem;
    color: var(--text-lighter);
}

p.copyright {
    margin-bottom: 0;
}

/* Responsive */
@media (max-width: 900px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .steps-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .main-wrapper {
        padding: 20px 0 40px 0;
    }

    .nav {
        display: none;
        position: absolute;
        top: var(--header-height);
        left: 0;
        right: 0;
        background: var(--bg-white);
        flex-direction: column;
        padding: 12px 20px 20px;
        border-bottom: 1px solid var(--border);
        box-shadow: var(--shadow);
        gap: 4px;
    }

    .nav.open {
        display: flex;
    }

    .nav a {
        width: 100%;
        padding: 12px 16px;
    }

    .mobile-menu-btn {
        display: block;
    }

    .hero-box {
        padding: 32px 24px;
    }

    .hero-box h1 {
        font-size: 1.5rem;
    }

    .tool-box {
        padding: 24px;
    }

    .features-box,
    .steps-box,
    .faq-box {
        padding: 28px 24px;
    }

    .features-grid,
    .steps-grid {
        grid-template-columns: 1fr;
    }

    .page-box {
        padding: 28px 24px;
    }

    .footer .container {
        flex-direction: column;
        text-align: center;
    }

    .footer-links {
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* Utilities */
.text-center {
    text-align: center;
}

/* Loading spinner */
.spinner {
    width: 18px;
    height: 18px;
    border: 2px solid white;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Share Section */
.share-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 2rem;
}

.share-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 1rem;
}

.share-btn-wrapper {
    position: relative;
    display: inline-block;
}

.share-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-radius: var(--radius);
    padding: 0.75rem 1.25rem;
    font-size: 1.125rem;
    font-weight: 600;
    box-shadow: var(--shadow-md);
    transition: all 0.2s;
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.share-btn svg {
    width: 20px;
    height: 20px;
}

.share-menu {
    display: none;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 1rem;
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-2xl, 0 25px 50px -12px rgba(0, 0, 0, 0.25));
    padding: 0.5rem;
    z-index: 50;
    animation: fadeInUp 0.3s ease-out;
    white-space: nowrap;
}

.share-menu.visible {
    display: block;
}

.share-menu-inner {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.share-icon {
    background: none;
    border: none;
    padding: 0.5rem;
    border-radius: var(--radius);
    cursor: pointer;
    transition: background-color 0.2s;
    color: var(--text-light);
    display: flex;
    align-items: center;
    justify-content: center;
}

.share-icon svg {
    width: 32px;
    height: 32px;
    fill: currentColor;
}

.share-icon:hover {
    background-color: var(--bg-section);
}

/* Platform Colors */
.share-icon[data-platform="facebook"]:hover {
    color: #1877f2;
    background-color: #eff6ff;
}

.share-icon[data-platform="instagram"]:hover {
    color: #e4405f;
    background-color: #fdf2f8;
}

.share-icon[data-platform="twitter"]:hover {
    color: #000000;
    background-color: #f3f4f6;
}

.share-icon[data-platform="whatsapp"]:hover {
    color: #25d366;
    background-color: #f0fdf4;
}

.share-icon[data-platform="telegram"]:hover {
    color: #0088cc;
    background-color: #eff6ff;
}

.share-icon[data-platform="reddit"]:hover {
    color: #ff4500;
    background-color: #fff7ed;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translate3d(0, 20px, 0);
    }

    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

.share-menu.visible {
    /* Override transform for the menu animation combined with centering */
    animation: menuFadeIn 0.3s ease-out;
}

@keyframes menuFadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, 10px);
    }

    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

/* Footer Socials */
.footer-follow {
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    flex-wrap: wrap;
}

.footer-follow span {
    font-size: 1rem;
    color: var(--text-light);
    font-weight: 500;
}

.footer-social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    transition: all 0.2s ease;
    opacity: 0.9;
}

.footer-social-link:hover {
    color: var(--primary);
    transform: translateY(-3px);
    opacity: 1;
}

.footer-social-link svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

/* Mobile Menu Button Animation */
.mobile-menu-btn svg {
    display: block;
}

.mobile-menu-btn svg line {
    transform-origin: center;
    transform-box: fill-box;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.mobile-menu-btn[aria-expanded="true"] svg line:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}

.mobile-menu-btn[aria-expanded="true"] svg line:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn[aria-expanded="true"] svg line:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}