:root {
    --primary-color: #6c63ff;
    --secondary-color: #f50057;
    --text-color: #333;
    --light-color: #f8f9fa;
    --dark-color: #212529;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', Arial, sans-serif;
}

body {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: background-color 0.5s;
    overflow-x: hidden;
    padding: 140px 0 40px 0;
}

/* ========== Main Tool Container ========== */
.container {
    width: 90%;
    max-width: 600px;
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    min-height: 550px;
}

h1 {
    margin-bottom: 20px;
    color: var(--primary-color);
    font-size: 2rem;
}

p {
    margin-bottom: 20px;
    line-height: 1.6;
}

.result-section {
    opacity: 0;
    transform: translateY(20px);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px;
    z-index: 1;
    pointer-events: none;
    background-color: rgba(255, 255, 255, 0.95);
}

.result-section.active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
}

textarea {
    width: 100%;
    height: 180px;
    padding: 15px;
    border: 2px solid #ddd;
    border-radius: 15px;
    margin-bottom: 20px;
    resize: none;
    font-size: 1rem;
    line-height: 1.5;
    transition: border-color 0.3s;
}

textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(108, 99, 255, 0.2);
}

button {
    background-color: var(--secondary-color);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 50px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.3s;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

button:hover {
    background-color: #e80053;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.comfort-message {
    font-size: 1.8rem;
    margin: 30px 0;
    color: var(--primary-color);
    font-weight: bold;
    line-height: 1.4;
}

.restart-btn {
    background-color: var(--primary-color);
    margin-top: 20px;
}

.restart-btn:hover {
    background-color: #5651e5;
}


/* ========== Animation & Effects Styling ========== */
.particles-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

.particle {
    position: absolute;
    border-radius: 50%;
    background: var(--primary-color);
    animation: float 3s infinite ease-in-out;
    opacity: 0.7;
}

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

.particle-explosion {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    transition: all 2s cubic-bezier(.17,.67,.83,.67);
}

.fireworks-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    pointer-events: none;
}

.text-piece {
    position: absolute;
    pointer-events: none;
    color: var(--text-color);
    /* The transition is key for the shatter effect */
    transition: transform 1.5s cubic-bezier(0.25, 1, 0.5, 1), opacity 1.5s ease-out;
}


/* ========== Main Navigation Bar Styling ========== */
.main-header {
    width: 100%;
    padding: 15px 0;
    background-color: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid #eee;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 999;
}

.header-container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    position: relative;
    height: 30px;
}

.header-logo {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
}

.main-nav {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

.main-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 35px;
}

.nav-link {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    font-size: 1rem;
    padding: 5px 0;
    position: relative;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: var(--primary-color);
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--secondary-color);
    transform: scaleX(0);
    transform-origin: bottom right;
    transition: transform 0.3s ease-out;
}

.nav-link:hover::after {
    transform: scaleX(1);
    transform-origin: bottom left;
}

.nav-link.active {
    color: var(--primary-color);
    font-weight: 700;
}

.nav-link.active::after {
    transform: scaleX(1);
    background-color: var(--primary-color);
}


/* ========== Content & Articles Styling ========== */
.content-sections {
    width: 90%;
    max-width: 720px;
    margin: 60px auto;
    padding: 0 20px;
    text-align: left;
    color: var(--text-color);
}
.content-section {
    margin-bottom: 50px;
}
.content-section h2 {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 25px;
    font-size: 1.9rem;
    font-weight: 600;
}
.content-section p {
    margin-bottom: 18px;
    line-height: 1.8;
    font-size: 1.1rem;
}
.content-section ul {
    list-style-type: none;
    padding-left: 0;
}
.content-section ul li {
    margin-bottom: 18px;
    padding-left: 35px;
    position: relative;
    line-height: 1.8;
    font-size: 1.1rem;
}
.content-section ul li::before {
    content: '✓';
    position: absolute;
    left: 0;
    top: 5px;
    color: var(--secondary-color);
    font-weight: bold;
    font-size: 1.2rem;
}
.main-content-container {
    width: 90%;
    max-width: 750px;
    margin: 0 auto;
    padding: 40px;
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    text-align: left;
}
.main-content-container h1 {
    text-align: center;
    margin-bottom: 15px;
}
.page-description {
    text-align: center;
    color: #666;
    margin-bottom: 40px;
    font-size: 1.1rem;
}
.article-list {
    display: flex;
    flex-direction: column;
    gap: 25px;
}
.article-item {
    display: block;
    background-color: #f8f9fa;
    border-radius: 10px;
    padding: 25px;
    text-decoration: none;
    color: var(--text-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #eee;
}
.article-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}
.article-item h2 {
    color: var(--primary-color);
    margin-top: 0;
    margin-bottom: 10px;
}
.article-item p {
    color: #555;
    margin-bottom: 15px;
}
.article-container {
    max-width: 800px;
}
.article-content h2 {
    color: var(--primary-color);
    margin-top: 40px;
    margin-bottom: 15px;
}
.article-content p {
    line-height: 1.8;
    font-size: 1.1rem;
    color: #333;
    margin-bottom: 20px;
}

/* ========== Footer ========== */
.footer {
    margin-top: 20px;
    color: #666;
    font-size: 0.8rem;
    text-align: center;
    width: 100%;
}
.privacy-link {
    color: #6c63ff;
    text-decoration: none;
    transition: color 0.3s;
    margin: 0 5px;
}
.privacy-link:hover {
    color: #f50057;
    text-decoration: underline;
}

/* ========== Responsive Adjustments ========== */
@media (max-width: 768px) {
    .main-nav {
        gap: 15px;
    }
    .nav-link {
        font-size: 0.9rem;
    }
    .header-logo {
        font-size: 1.2rem;
    }
}
@media (max-width: 600px) {
    body {
        padding-top: 120px;
    }
    .header-container {
        flex-direction: column;
        gap: 15px;
        height: auto;
    }
    .main-nav {
        position: static;
        transform: none;
    }
    .container {
        width: 95%;
        padding: 20px;
        min-height: 500px;
    }
}
