/* styles.css - NOTEBOOK FLOW LAYOUT */

/* Import handwriting font */
@import url('https://fonts.googleapis.com/css2?family=Special+Elite&family=Kalam:wght@300;400;700&display=swap');

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

.page-title {
    font-weight: 800 !important;
}

.pull-quote {
    font-weight: 510 !important;
}


body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background: #f4f1e8;
    color: #333;
    overflow-x: hidden;
    min-height: 100vh;
}

/* Notebook paper background with lines */
.notebook-container {
    position: relative;
    min-height: 100vh;
    background: 
        /* Red margin line */
        linear-gradient(to right, #e8b4b8 1px, transparent 1px) 60px 0,
        /* Blue horizontal lines */
        repeating-linear-gradient(
            transparent,
            transparent 31px,
            #d4e7f5 31px,
            #d4e7f5 32px
        );
    background-size: 100% 32px;
    padding: 60px 40px 100px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Page title at top */
.page-title {
    font-family: 'Kalam', cursive;
    font-size: 2.8em;
    font-weight: 700;
    color: #2c3e50;
    line-height: 1.3;
    text-align: center;
    margin-bottom: 60px;
    transform: rotate(-2deg);
}

.page-subtitle {
    font-family: 'Kalam', cursive;
    font-size: 1em;
    color: #777;
    text-align: center;
    margin-top: -40px;
    margin-bottom: 60px;
    font-style: italic;
}

/* Conversation sections */
.conversation-section {
    margin-bottom: 100px;
    position: relative;
    padding: 0 20px;
}

.conversation-divider {
    height: 2px;
    background: linear-gradient(to right, transparent, #ccc, transparent);
    margin: 60px 0;
}

/* Timestamps */
.timestamp {
    font-family: 'Kalam', cursive;
    font-size: 1.1em;
    color: #555;
    margin-bottom: 30px;
    padding: 10px 20px;
    background: #d4f1f9;
    border: 1px solid #b8dce8;
    display: inline-block;
    transform: rotate(-1deg);
    box-shadow: 2px 2px 5px rgba(0,0,0,0.1);
}

/* Message groups */
.message-group {
    margin: 40px 0;
    position: relative;
}

/* My messages - handwritten style on notebook paper */
.my-message {
    position: relative;
    font-family: 'Special Elite', cursive;
    background: rgba(255, 255, 255, 0.9);
    padding: 20px 25px;
    border: 1px solid #ddd;
    box-shadow: 2px 2px 8px rgba(0,0,0,0.1);
    line-height: 1.7;
    font-size: 0.95em;
    color: #2c3e50;
    max-width: 65%;
    margin-left: auto;
    margin-right: 5%;
    margin-bottom: 20px;
    border-radius: 8px 8px 0 8px;
    transform: rotate(1deg);
}

.my-message p {
    margin-bottom: 12px;
}

/* AI messages - typed, cleaner */
.ai-message {
    position: relative;
    background: rgba(255, 255, 255, 0.9);
    padding: 22px 25px;
    border: 1px solid #c0d6e8;
    border-left: 4px solid #2d5f7f;
    box-shadow: 2px 2px 10px rgba(0,0,0,0.12);
    font-size: 0.92em;
    line-height: 1.6;
    color: #34495e;
    max-width: 65%;
    margin-left: 5%;
    margin-right: auto;
    margin-bottom: 20px;
    border-radius: 0 8px 8px 8px;
    transform: rotate(-1deg);
}

.ai-message.compact {
    padding: 18px;
    font-size: 0.88em;
    max-width: 55%;
}

.ai-message p {
    margin-bottom: 12px;
}

.ai-message strong {
    color: #2c3e50;
    font-weight: 600;
    display: block;
    margin-bottom: 8px;
}

/* Labels for messages */
.label-me, .label-ai {
    display: block;
    font-size: 0.75em;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
    font-weight: 600;
}

.label-me {
    color: #8b7aa8;
}

.label-ai {
    color: #2d5f7f;
}

/* =========================================== */
/* STICKY NOTES - MULTIPLE COLOR OPTIONS */
/* =========================================== */

.sticky-note {
    position: relative;
    padding: 20px;
    font-family: 'Kalam', cursive;
    font-size: 0.95em;
    line-height: 1.6;
    box-shadow: 3px 3px 12px rgba(0,0,0,0.15);
    max-width: 280px;
    color: #333;
    transition: all 0.3s ease;
    margin: 30px auto;
    z-index: 1;
    border-radius: 2px;
}

/* Hover effect */
.sticky-note:hover {
    z-index: 999;
    transform: scale(1.05) rotate(0deg) !important;
    box-shadow: 8px 8px 25px rgba(0,0,0,0.3);
    cursor: pointer;
}

/* Size variations */
.sticky-note.long {
    max-width: 360px;
    padding: 22px;
}

.sticky-note.small {
    max-width: 200px;
    padding: 15px;
    font-size: 0.85em;
}

.sticky-note.large {
    max-width: 400px;
    padding: 25px;
    font-size: 1em;
}

/* ===== YELLOW STICKY NOTES ===== */
.sticky-note.yellow-sticky {
    background: #fef5b8;
    border: 1px solid #e8d89c;
    background-image: 
        linear-gradient(90deg, 
            transparent 50%, 
            rgba(255,255,255,.5) 50%);
    background-size: 5px 5px;
}

.sticky-note.yellow-dark {
    background: #f9e076;
    border: 1px solid #e0c95e;
    color: #5c4e00;
}

.sticky-note.yellow-light {
    background: #fff9c4;
    border: 1px solid #f0e68c;
}

.sticky-note.yellow-gradient {
    background: linear-gradient(to bottom, #fef5b8, #f9e076);
    border: 1px solid #e8d89c;
}

/* ===== PINK STICKY NOTES ===== */
.sticky-note.pink-sticky {
    background: #ff87c1;
    border: 1px solid #ebc4d4;
}

.sticky-note.pink-dark {
    background: #ffb8d9;
    border: 1px solid #e6a6c8;
    color: #7a3b5f;
}

.sticky-note.pink-light {
    background: #ffe4f1;
    border: 1px solid #f8d0e3;
}

/* ===== BLUE STICKY NOTES ===== */
.sticky-note.blue-sticky {
    background: #d4f1f9;
    border: 1px solid #b8dce8;
    color: #2d5f7f;
}

.sticky-note.blue-dark {
    background: #a8d8ea;
    border: 1px solid #8cc6d8;
    color: #1a3c52;
}

/* ===== GREEN STICKY NOTES ===== */
.sticky-note.green-sticky {
    background: #d8f7d8;
    border: 1px solid #c2e6c2;
    color: #2e7d32;
    
}

.sticky-note.green-light {
    background: #e8f5e8;
    border: 1px solid #d4e6d4;
    margin-left: 40px !important;
    margin-right: auto !important;
    float: left !important;
    clear: both !important;
}

/* ===== PURPLE STICKY NOTES ===== */
.sticky-note.purple-sticky {
    background: #e8d6f5;
    border: 1px solid #d4c2e6;
    color: #5d3a8c;
}

/* ===== TIMESTAMP SPECIAL ===== */
.sticky-note.timestamp-note {
    background: #d4f1f9;
    border: 1px solid #b8dce8;
    font-size: 0.85em;
    padding: 15px;
    max-width: 200px;
    font-family: 'Courier New', monospace;
}

/* ===== TORN EDGE EFFECT ===== */
.sticky-note.torn-edge {
    background: #fef5b8;
    border: none;
    position: relative;
    overflow: hidden;
}

.sticky-note.torn-edge::before {
    content: "";
    position: absolute;
    top: -5px;
    left: 0;
    right: 0;
    height: 10px;
    background: 
        radial-gradient(circle at 10px 10px, transparent 10px, #fef5b8 10px),
        radial-gradient(circle at 30px 10px, transparent 10px, #fef5b8 10px),
        radial-gradient(circle at 50px 10px, transparent 10px, #fef5b8 10px),
        radial-gradient(circle at 70px 10px, transparent 10px, #fef5b8 10px);
    background-size: 20px 20px;
    background-repeat: repeat-x;
}

/* Pull quotes - scattered across page */
.pull-quote {
    font-family: 'Kalam', cursive;
    font-size: 1.8em;
    font-weight: 700;
    color: #2c3e50;
    text-align: center;
    line-height: 1.4;
    max-width: 700px;
    padding: 30px 40px;
    margin: 50px auto;
    background: rgba(255, 255, 255, 0.7);
    border-top: 2px solid #333;
    border-bottom: 2px solid #333;
    transform: rotate(-0.5deg);
}

.pull-quote.large {
    font-size: 2.2em;
    max-width: 800px;
}

/* Scribbles and annotations */
.scribble {
    font-family: 'Kalam', cursive;
    font-size: 1em;
    color: #555;
    line-height: 1.4;
    margin: 20px auto;
    padding: 15px;
    max-width: 500px;
    text-align: center;
}

.scribble.critical {
    font-style: italic;
    font-size: 0.95em;
    color: #bcacac;
    background: rgba(255, 255, 255, 0.6);
    padding: 20px;
    border-radius: 4px;
    transform: rotate(1deg);
}

/* Special layout for anchor sentences */
.anchor-group {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin: 40px 0;
    justify-content: center;
}

.anchor-box {
    flex: 1;
    min-width: 250px;
    max-width: 300px;
    background: rgba(255, 255, 255, 0.9);
    padding: 20px;
    border: 1px solid #c0d6e8;
    border-radius: 8px;
    transform: rotate(var(--rotation, 0deg));
}

.anchor-box:nth-child(odd) {
    --rotation: -1deg;
}

.anchor-box:nth-child(even) {
    --rotation: 1deg;
}

/* Footer / end of conversation */
.conversation-end {
    text-align: center;
    margin: 80px 0 40px;
    padding: 30px;
    color: #888;
    font-family: 'Kalam', cursive;
    font-size: 0.9em;
    border-top: 1px dashed #ccc;
}

/* Responsive */
@media (max-width: 768px) {
    .notebook-container {
        padding: 40px 20px;
        background: 
            linear-gradient(to right, #e8b4b8 1px, transparent 1px) 40px 0,
            repeating-linear-gradient(
                transparent,
                transparent 31px,
                #d4e7f5 31px,
                #d4e7f5 32px
            );
        background-size: 100% 32px;
    }
    
    .page-title {
        font-size: 2em;
        margin-bottom: 40px;
    }
    
    .page-subtitle {
        font-size: 0.9em;
        margin-top: -20px;
        margin-bottom: 40px;
    }
    
    .my-message,
    .ai-message {
        max-width: 85%;
        margin-left: auto;
        margin-right: auto;
        transform: rotate(0deg) !important;
    }
    
    .my-message {
        margin-left: 5%;
        margin-right: 5%;
    }
    
    .ai-message {
        margin-left: 5%;
        margin-right: 5%;
    }
    
    .ai-message.compact {
        max-width: 85%;
    }
    
    .sticky-note {
        max-width: 85%;
        margin: 25px auto;
    }
    
    .pull-quote {
        font-size: 1.4em;
        padding: 20px;
        max-width: 90%;
    }
    
    .pull-quote.large {
        font-size: 1.6em;
    }
    
    .anchor-group {
        flex-direction: column;
        align-items: center;
    }
    
    .anchor-box {
        max-width: 90%;
    }
}

@media (max-width: 480px) {
    .notebook-container {
        padding: 30px 15px;
    }
    
    .page-title {
        font-size: 1.6em;
    }
    
    .my-message,
    .ai-message {
        max-width: 95%;
        padding: 15px;
    }
    
    .sticky-note {
        max-width: 95%;
        padding: 15px;
    }
}