/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'VT323', 'Courier New', monospace;
    background-color: #ffffff;
    color: #000;
    line-height: 1.6;
    min-height: 100vh;
    padding: 20px;
}

/* Window Chrome */
.window {
    max-width: 700px;
    margin: 0 auto;
    background: #ffffff;
    border: 2px solid #000000;
}

.title-bar {
    background: #000000;
    color: #ffffff;
    padding: 4px 8px;
    font-weight: normal;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.title-text {
    margin-left: 3px;
}

.window-body {
    padding: 20px;
    background: #ffffff;
}

.container {
    max-width: 700px;
    margin: 0 auto;
    padding: 20px;
    background: #c0c0c0;
}

/* View Management */
.view {
    display: none;
}

.view.active {
    display: block;
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Welcome Header */
.welcome-header {
    text-align: center;
    margin-bottom: 40px;
}

.welcome-header h1 {
    font-size: 2.2em;
    color: #000;
    margin-bottom: 20px;
    line-height: 1.3;
}

.subtitle {
    font-size: 1.1em;
    color: #000;
    line-height: 1.6;
}

/* Page Header */
.page-header {
    text-align: center;
    margin-bottom: 30px;
    position: relative;
}

.page-header h1 {
    font-size: 2em;
    color: #000;
}

/* Buttons */
.home-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-width: 400px;
    margin: 0 auto;
}

.main-btn {
    padding: 18px 30px;
    background: #ffffff;
    border: 2px solid #000000;
    color: #000;
    font-family: 'VT323', 'Courier New', monospace;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: none;
}

.main-btn:hover {
    background: #000000;
    color: #ffffff;
}

.main-btn:active {
    background: #000000;
    color: #ffffff;
}

.back-btn {
    padding: 8px 16px;
    background: #ffffff;
    border: 2px solid #000000;
    color: #000;
    font-family: 'VT323', 'Courier New', monospace;
    font-size: 1em;
    cursor: pointer;
    margin-bottom: 15px;
}

.back-btn:hover {
    background: #000000;
    color: #ffffff;
}

.back-btn:active {
    background: #000000;
    color: #ffffff;
}

.action-btn {
    padding: 12px 24px;
    background: #ffffff;
    border: 2px solid #000000;
    color: #000;
    font-family: 'VT323', 'Courier New', monospace;
    font-size: 1em;
    font-weight: bold;
    cursor: pointer;
    margin-bottom: 20px;
}

.action-btn:hover {
    background: #000000;
    color: #ffffff;
}

.action-btn:active {
    background: #000000;
    color: #ffffff;
}

/* Flower Count */
.flower-count {
    font-size: 1.1em;
    margin-bottom: 20px;
    color: #000;
    text-align: left;
    background: #ffffff;
    padding: 10px 15px;
    border: 2px solid #000000;
    display: inline-block;
}

.flower-count span:first-child {
    font-size: 1.3em;
}

.garden {
    min-height: 400px;
    background: #ffffff;
    border: 2px solid #000000;
    padding: 30px 20px;
    position: relative;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-content: flex-start;
    justify-content: center;
}

.empty-garden {
    text-align: center;
    color: #000;
    padding: 60px 20px;
    width: 100%;
}

.empty-garden p {
    margin: 10px 0;
    font-size: 1.1em;
}

/* Flowers */
.flower {
    width: 80px;
    height: 100px;
    cursor: pointer;
    transition: transform 0.3s;
    position: relative;
    animation: grow 0.5s ease-out;
}

.flower:hover {
    transform: scale(1.2) rotate(5deg);
}

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

.flower-bloom {
    font-size: 3em;
    text-align: center;
    filter: drop-shadow(2px 2px 3px rgba(0, 0, 0, 0.2));
}

.flower-stem {
    width: 4px;
    height: 40px;
    background: #000;
    margin: -5px auto 0;
}

/* Form Styles */
#compost-form {
    margin-top: 30px;
}

.form-group {
    margin-bottom: 30px;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    font-size: 1.1em;
    color: #000;
}

.form-group input[type="file"] {
    width: 100%;
    padding: 12px;
    border: 2px solid #000000;
    background: #fff;
    font-family: 'VT323', 'Courier New', monospace;
    font-size: 1em;
    cursor: pointer;
}

.preview-container {
    margin-top: 15px;
}

.preview-container img {
    max-width: 100%;
    height: auto;
    border: 2px solid #000000;
}

.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #000000;
    background: #fff;
    font-family: 'VT323', 'Courier New', monospace;
    font-size: 1em;
    resize: vertical;
    color: #000;
    line-height: 1.5;
}

.char-count {
    text-align: right;
    font-size: 0.9em;
    color: #666;
    margin-top: 5px;
}

/* Color Picker */
.color-picker {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.color-picker input[type="radio"] {
    display: none;
}

.color-option {
    font-size: 2.5em;
    cursor: pointer;
    transition: all 0.2s;
    opacity: 0.5;
    filter: grayscale(50%);
}

.color-picker input[type="radio"]:checked + .color-option {
    opacity: 1;
    filter: grayscale(0%);
    transform: scale(1.2);
}

.color-option:hover {
    opacity: 0.8;
    transform: scale(1.15);
}

.submit-btn {
    width: 100%;
    padding: 16px;
    background: #ffffff;
    color: #000;
    border: 2px solid #000000;
    font-family: 'VT323', 'Courier New', monospace;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    margin-top: 10px;
}

.submit-btn:hover {
    background: #000000;
    color: #ffffff;
}

.submit-btn:active {
    background: #000000;
    color: #ffffff;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    animation: fadeIn 0.3s;
}

.modal-content {
    background-color: #ffffff;
    margin: 5% auto;
    padding: 0;
    border: 2px solid #000000;
    width: 90%;
    max-width: 600px;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
}

.close {
    color: #000;
    position: sticky;
    top: 0;
    right: 0;
    float: right;
    font-size: 28px;
    font-weight: bold;
    padding: 5px 10px;
    cursor: pointer;
    background: #ffffff;
    z-index: 1;
    line-height: 1;
}

.close:hover,
.close:focus {
    color: #666;
}

#modal-body {
    padding: 15px 20px 20px;
    background: #ffffff;
}

.modal-image {
    width: 100%;
    height: auto;
    border: 2px solid #000000;
    margin-bottom: 20px;
}

.modal-journal {
    background: #ffffff;
    border: 2px solid #000000;
    padding: 20px;
    white-space: pre-wrap;
    word-wrap: break-word;
    line-height: 1.8;
    color: #000;
}

.modal-date {
    text-align: right;
    color: #000;
    font-style: italic;
    margin-top: 15px;
    font-size: 0.9em;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    body {
        padding: 15px;
    }

    .container {
        padding: 15px;
    }

    .welcome-header h1 {
        font-size: 1.8em;
    }

    .subtitle {
        font-size: 1em;
    }

    .page-header h1 {
        font-size: 1.6em;
    }

    .back-btn {
        position: static;
        margin-bottom: 15px;
        display: block;
        width: fit-content;
    }

    .garden {
        padding: 20px 10px;
        min-height: 300px;
    }

    .flower {
        width: 60px;
        height: 80px;
    }

    .flower-bloom {
        font-size: 2.5em;
    }

    .modal-content {
        width: 95%;
        margin: 10% auto;
    }

    #modal-body {
        padding: 15px 20px 20px;
    }

    .color-option {
        font-size: 2em;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }

    .container {
        padding: 10px;
    }

    .welcome-header h1 {
        font-size: 1.5em;
    }

    .subtitle {
        font-size: 0.95em;
    }

    .page-header h1 {
        font-size: 1.4em;
    }

    .main-btn {
        font-size: 1em;
        padding: 15px 25px;
    }

    .flower {
        width: 50px;
        height: 70px;
    }

    .flower-bloom {
        font-size: 2em;
    }

    .form-group label {
        font-size: 1em;
    }

    .color-option {
        font-size: 1.8em;
    }
}
