@import url('https://fonts.googleapis.com/css2?family=Indie+Flower&family=Caveat:wght@400;700&display=swap');

:root {
    --bg-color: #fcfcfc;
    --line-color: rgba(0, 150, 255, 0.1); /* Cyan graph paper lines */
    --accent-red: #ff4d4d;
    --text-dark: #2c3e50;
    --hand-drawn-border: #333;
    --font-hand: 'Indie Flower', cursive;
    --font-accent: 'Caveat', cursive;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-color);
    background-image: 
        linear-gradient(var(--line-color) 1px, transparent 1px),
        linear-gradient(90deg, var(--line-color) 1px, transparent 1px);
    background-size: 30px 30px; /* Graph paper size */
    color: var(--text-dark);
    font-family: var(--font-hand);
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-size: 1.2rem;
}

/* Base Layout */
header, main, footer, section {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 40px 20px;
    position: relative;
}

.hero-content {
    width: 100%;
    max-width: 900px;
}

.logo {
    font-family: var(--font-accent);
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text-dark);
    display: inline-block;
    position: relative;
}

.logo::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 10%;
    width: 80%;
    height: 3px;
    background: var(--accent-red);
    border-radius: 5px;
    transform: rotate(-1deg);
}

.subtitle {
    font-size: 1.5rem;
    opacity: 0.8;
}

/* Stickies/Cards */
.sticker-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
    margin: 40px 0;
}

.sticker-card {
    background: #fff;
    padding: 40px;
    border: 2px solid var(--hand-drawn-border);
    /* Hand-drawn "rough" border effect */
    border-radius: 255px 15px 225px 15px/15px 225px 15px 255px;
    position: relative;
    box-shadow: 4px 4px 0px var(--hand-drawn-border);
    max-width: 100%;
    transition: transform 0.3s ease;
    animation: float 4s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(-1deg); }
    50% { transform: translateY(-10px) rotate(1deg); }
}

#prompt-text {
    font-size: 1.1rem;
    line-height: 1.5;
    color: #444;
    white-space: pre-wrap;
    text-align: left;
    max-height: 300px;
    overflow-y: auto;
    padding-right: 15px;
    margin-top: 20px;
}

.preview-icon-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: white;
    border: 1px solid var(--hand-drawn-border);
    border-radius: 8px;
    padding: 5px 10px;
    cursor: pointer;
    font-family: var(--font-accent);
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s;
    box-shadow: 2px 2px 0px var(--hand-drawn-border);
}

.icon {
    width: 18px;
    height: 18px;
}

.preview-icon-btn:hover {
    transform: translate(-1px, -1px);
    box-shadow: 3px 3px 0px var(--hand-drawn-border);
}

.preview-icon-btn:active {
    transform: translate(1px, 1px);
    box-shadow: 1px 1px 0px var(--hand-drawn-border);
}

/* Modal Styling */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.modal-content {
    max-width: 800px;
    width: 90%;
    max-height: 90vh;
    animation: modalPop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

#modal-prompt-content {
    overflow-y: auto;
    padding: 30px;
    text-align: left;
    font-size: 1.1rem;
    font-family: var(--font-hand); /* Maintain hand-drawn font */
}

#modal-prompt-content h1, 
#modal-prompt-content h2, 
#modal-prompt-content h3 {
    font-family: var(--font-accent);
    margin: 30px 0 15px;
    text-decoration: underline;
    text-decoration-color: var(--accent-red);
    text-underline-offset: 10px;
    text-decoration-thickness: 4px;
    display: block; 
    width: fit-content;
}

#modal-prompt-content h1 { font-size: 2.2rem; }
#modal-prompt-content h2 { font-size: 1.8rem; }
#modal-prompt-content h3 { font-size: 1.4rem; }

#modal-prompt-content p {
    margin-bottom: 15px;
    line-height: 1.5;
}

#modal-prompt-content ul, 
#modal-prompt-content ol {
    margin: 10px 0 20px 25px;
}

#modal-prompt-content li {
    margin-bottom: 8px;
}

#modal-prompt-content hr {
    border: none;
    border-top: 2px dashed var(--hand-drawn-border);
    margin: 30px 0;
}

#modal-prompt-content blockquote {
    border-left: 4px solid var(--accent-red);
    padding-left: 15px;
    margin: 20px 0;
    font-style: italic;
    background: rgba(255, 77, 77, 0.05);
}

#modal-prompt-content code {
    background: #f0f0f0;
    padding: 2px 5px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.9em;
}

#modal-prompt-content pre {
    background: #2c3e50;
    color: #ecf0f1;
    padding: 15px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 15px 0;
}

#modal-prompt-content pre code {
    background: transparent;
    color: inherit;
    padding: 0;
}

.close-modal {
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 2.5rem;
    cursor: pointer;
    color: var(--accent-red);
    z-index: 10;
}

@keyframes modalPop {
    from { transform: scale(0.8) translateY(20px); opacity: 0; }
    to { transform: scale(1) translateY(0); opacity: 1; }
}

.btn-primary {
    background: var(--accent-red);
    color: white;
    border: 2px solid var(--hand-drawn-border);
    padding: 12px 35px;
    font-family: var(--font-accent);
    font-size: 2rem;
    font-weight: 700;
    border-radius: 300px 10px 250px 15px/15px 200px 10px 300px;
    cursor: pointer;
    box-shadow: 3px 3px 0px var(--hand-drawn-border);
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 15px;
}

.btn-icon {
    width: 28px;
    height: 28px;
}

.btn-primary:active {
    transform: translate(2px, 2px);
    box-shadow: 1px 1px 0px var(--hand-drawn-border);
}

/* Sections */
section {
    margin-top: 60px;
}

h2 {
    font-family: var(--font-accent);
    font-size: 2.8rem;
    margin-bottom: 30px;
    text-decoration: underline;
    text-decoration-color: var(--accent-red);
    text-underline-offset: 12px;
    text-decoration-thickness: 5px;
    display: block;
    width: fit-content;
}

.about-content, .faq-item, .how-to-use-section, .feature-item {
    background: rgba(255, 255, 255, 0.7);
    padding: 20px;
    border: 1px dashed var(--hand-drawn-border);
    margin-bottom: 20px;
}

/* How to Use Visual Guide */
.how-to-use-section {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 60px 20px;
    border: none; /* Override background shorthand */
    background: transparent;
}

.how-to-use-section h2 {
    margin-bottom: 50px;
}

.guide-steps {
    display: flex;
    flex-direction: column;
    gap: 30px;
    width: 100%;
    max-width: 600px;
}

.step {
    background: #fff;
    padding: 25px;
    border: 2px solid var(--hand-drawn-border);
    border-radius: 12px 255px 12px 225px/225px 12px 255px 12px;
    position: relative;
    box-shadow: 4px 4px 0px var(--hand-drawn-border);
    transition: transform 0.3s;
}

.step:hover {
    transform: scale(1.02) rotate(1deg);
}

.step-number {
    position: absolute;
    top: -15px;
    left: -15px;
    background: var(--accent-red);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: var(--font-accent);
    font-size: 1.5rem;
    font-weight: 700;
    border: 2px solid var(--hand-drawn-border);
}

.step h3 {
    font-family: var(--font-accent);
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.step p {
    font-size: 1.1rem;
}

.step-icon {
    width: 40px;
    height: 40px;
    margin-bottom: 10px;
    color: var(--accent-red);
    opacity: 0.8;
}

.step-connector {
    color: var(--accent-red);
    margin: -10px 0;
}

.step-connector i {
    width: 32px;
    height: 32px;
}

@media (min-width: 768px) {
    .guide-steps {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 20px;
    }
    
    .step {
        width: calc(50% - 20px);
    }
    
    .step-connector {
        display: none;
    }
}

.sarcasm {
    font-style: italic;
    font-weight: 700;
    color: var(--accent-red);
}

.faq-item .item-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    opacity: 0;
}

.faq-item.active .item-content {
    max-height: 200px;
    opacity: 1;
    margin-top: 10px;
}

.faq-question {
    display: flex;
    align-items: center;
}

.faq-icon {
    width: 20px;
    height: 20px;
    margin-right: 10px;
    transition: transform 0.3s;
    flex-shrink: 0;
}

.faq-item.active .faq-icon {
    transform: rotate(90deg);
}

/* Features Section */
.features-section {
    padding: 60px 20px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.feature-item {
    background: #fff;
    padding: 30px;
    border: 2px solid var(--hand-drawn-border);
    border-radius: 15px 225px 15px 255px/255px 15px 225px 15px;
    box-shadow: 4px 4px 0px var(--hand-drawn-border);
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.feature-item:hover {
    transform: translateY(-5px) rotate(-1deg);
    box-shadow: 6px 6px 0px var(--hand-drawn-border);
}

.feature-icon {
    width: 40px;
    height: 40px;
    color: var(--accent-red);
    margin-bottom: 20px;
}

.feature-item h3 {
    font-family: var(--font-accent);
    font-size: 1.8rem;
    margin-bottom: 12px;
    color: var(--text-dark);
}

.feature-item p {
    font-size: 1.1rem;
    line-height: 1.4;
    color: #555;
    margin: 0;
}

/* Footer & Promo */
.footer {
    border-top: 2px solid var(--hand-drawn-border);
    padding-top: 40px;
    margin-top: 80px;
    text-align: center;
}

.promo-card {
    border: 2px solid var(--hand-drawn-border);
    padding: 30px;
    margin-bottom: 30px;
    border-radius: 15px 255px 15px 225px/225px 15px 255px 15px;
    background: #fff;
    transform: rotate(0.5deg);
}

.promo-link {
    color: var(--accent-red);
    font-weight: 700;
    text-decoration: none;
    font-size: 1.5rem;
}

.links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.footer-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-dark);
    text-decoration: none;
    border-bottom: 1px solid var(--text-dark);
}

.footer-link:hover {
    color: var(--accent-red);
    border-bottom-color: var(--accent-red);
}

.footer-link i {
    width: 18px;
    height: 18px;
}

.footer-heart {
    width: 20px;
    height: 20px;
    color: var(--accent-red);
    vertical-align: middle;
    display: inline-block;
    margin: 0 5px;
}

.lucide {
    stroke-width: 2.5px;
}

/* Doodles (CSS Art) */
.doodle-star {
    position: absolute;
    font-size: 2rem;
    color: #ffd700;
    z-index: -1;
}

/* Animations & Doodles */
@keyframes wiggle {
    0%, 100% { transform: rotate(-1deg); }
    50% { transform: rotate(1.5deg); }
}

.step:nth-child(even) {
    animation: wiggle 3.5s ease-in-out infinite;
}

.step:nth-child(odd) {
    animation: wiggle 4s ease-in-out infinite reverse;
}

.section-title {
    position: relative;
    display: inline-block;
}

.section-title::before {
    content: '✨';
    position: absolute;
    left: -40px;
    top: 0;
    font-size: 1.5rem;
    animation: float 3s ease-in-out infinite;
}

.section-title::after {
    content: '✍️';
    position: absolute;
    right: -40px;
    bottom: 0;
    font-size: 1.5rem;
    animation: float 4s ease-in-out infinite reverse;
}

@media (max-width: 600px) {
    .logo { font-size: 3rem; }
    body { font-size: 1.1rem; }
}

