:root {
    --primary-color: #158602;
    --background-color: #f0f9eb;
    --thought-color: #566d4f;
    --thought-text-color: #d9d9d9;
    
    /* Typography Variables */
    --p1: 400 0.9rem/1.4 'Roboto Mono', monospace;
    --p1-color: #333333;
    
    --h3: 500 1.3rem/1 'Roboto Mono', monospace;
    --h3-color: #333333;
}

* {
    box-sizing: border-box;
}

html {
    /* Prevent mobile scrolling */
    overflow: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: none;
    touch-action: manipulation;
}



body {
    font: var(--p1);
    color: var(--p1-color);
    background: var(--background-color);
    min-height: 100vh;
    overflow: hidden;
    position: relative;
    /* Prevent mobile scrolling */
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: none;
    touch-action: manipulation;
}

/* Ensure all p tags use body font */
p {
    font: var(--p1);
    color: var(--p1-color);
}

textarea {
    font: var(--p1);
    color: var(--p1-color);
}

.container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100vh;
    position: relative;
}

/* Input Section */
.input-section {
    position: fixed;
    bottom: 3rem;
    background: rgba(255, 255, 255, 0.95);
    padding: 0.5rem;
    border-radius: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(10px);
    text-align: center;
    z-index: 1000;
    min-width: 600px;
    max-width: 1000px;
}

.bottom-controls {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    z-index: 1001;
}

.settings-cog {
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.settings-cog:hover {
    opacity: 1;
}

.info-button {
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.3s ease;
    z-index: 1001;
}

.info-button:hover {
    opacity: 1;
}

.info-overlay {
    position: fixed;
    bottom: 4rem;
    right: 1rem;
    display: none;
    z-index: 2000;
}

.info-overlay.active {
    display: block;
}

.info-content {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    min-width: 250px;
    max-width: 300px;
    border: 1px solid #e1e5e9;
}

.info-content h3 {
    margin-bottom: 1.5rem;
    color: var(--h3-color);
    text-align: center;
    font: var(--h3);
}

.instructions {
    margin-bottom: 2rem;
}

.instruction-step {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1rem;
    gap: 1rem;
}

.step-number {
    background: var(--primary-color);
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    flex-shrink: 0;
    margin-top: 0.1rem;
}

.instruction-step p {
    margin: 0;
    line-height: 1.5;
    color: #333;
}

.settings-menu {
    position: fixed;
    bottom: 4rem;
    right: 3rem;
    display: none;
    z-index: 2000;
}

.settings-menu.active {
    display: block;
}

.settings-content {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    align-items: start;
    justify-content: start;
    border: 1px solid #e1e5e9;
}

.settings-content h3 {
    margin-bottom: 1.5rem;
    color: var(--h3-color);
    text-align: center;
    font: var(--h3);
}

.setting-item {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.setting-item label {
    color: #333;
    font-weight: 500;
    min-width: 80px;
}

.setting-item input {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.setting-item input[type="color"] {
    width: 60px;
    height: 40px;
    padding: 0;
    border: 2px solid #ddd;
    border-radius: 5px;
    cursor: pointer;
}

.setting-item input[type="color"]:hover {
    border-color: var(--primary-color);
}

.setting-item input:focus {
    outline: none;
    border-color: var(--primary-color);
}

#thought-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

#thought-input {
    padding: 1rem;
    border: 2px solid #e1e5e9;
    border-radius: 10px;
    transition: border-color 0.3s ease;
    background: white;
    resize: none;
    min-height: 3rem;
    max-height: 15rem;
    overflow: hidden;
}

#thought-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

button {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 20px;
    background: var(--primary-color);
    color: white;
    font: var(--p1);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

button:active {
    transform: scale(0.97);
}



button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

button:disabled:hover {
    transform: none;
    box-shadow: none;
}

.controls {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.bottom-controls #clear-all {
    padding: 0.25rem 0.5rem;
    background: #6c757d;
}

/* Thoughts Container */
#thoughts-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

/* Individual Thought */
.thought {
    position: absolute;
    background: var(--thought-color);
    padding: 1rem 1.5rem;
    border-radius: 25px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    pointer-events: auto;
    max-width: 300px;
    line-height: 1.4;
    color: var(--thought-text-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation: float 6s ease-in-out infinite;
    backdrop-filter: blur(5px);
}

.thought.removing {
    animation: fadeOut 0.5s ease-out forwards !important;
}

/* Floating Animation */
@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    25% {
        transform: translateY(-3px) rotate(0.5deg);
    }
    50% {
        transform: translateY(-1px) rotate(-0.5deg);
    }
    75% {
        transform: translateY(-3px) rotate(0.3deg);
    }
}

@keyframes fadeOut {
    to {
        opacity: 0;
        transform: scale(0.8);
    }
}

@keyframes scaleDown {
    to {
        transform: scale(0.95);
    }
}

/* Different animation delays for variety */
.thought:nth-child(3n) {
    animation-delay: -2s;
}

.thought:nth-child(3n+1) {
    animation-delay: -4s;
}

.thought:nth-child(3n+2) {
    animation-delay: -6s;
}

/* Responsive Design */
@media (max-width: 768px) {
    .input-section {
        min-width: 300px;
    }
    
    .controls {
        flex-direction: column;
    }
    
    .thought {
        max-width: 150px;
        padding: 0.8rem 1.2rem;
    }
}

/* Moss Logo */
.moss-logo {
    position: fixed;
    bottom: 0.5rem;
    left: 0.5rem;
    width: 1.5rem;
    height: 1.5rem;
    z-index: 1000;
    pointer-events: none;
}


