:root {
    --green: #4CAF50;
    --yellow: #FFC107;
    --red: #E57373;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

body {
    background-color: #f5f5f5;
}

.app {
    max-width: 600px;
    margin: 0 auto;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: white;
    position: relative;
}

.main-view, .detail-view, .storing-view, .pesticide-view, .guide-view {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    background: white;
    transition: transform 0.3s ease;
    padding-bottom: 60px;
}

.hidden {
    display: none;
}

header {
    background-color: var(--red);
    color: white;
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.detail-view header, .storing-view header {
    background-color: transparent;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1;
}

.back-button, .storing-button, .back-button-storing, .select-button {
    background: none;
    border: none;
    color: white;
    font-size: 1rem;
    cursor: pointer;
    padding: 0.5rem;
}

header h1 {
    font-size: 1.5rem;
    font-weight: normal;
}

main {
    flex: 1;
    padding: 0;
}

.filter-section {
    background-color: rgba(229, 115, 115, 0.1);
}

.filter-item {
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    cursor: pointer;
}

.filter-item span {
    color: #666;
    font-size: 1.1rem;
}

.filter-item .value {
    color: #333;
    font-size: 1.1rem;
}

.month-selector {
    background: white;
    padding: 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.month-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
}

.month-item {
    padding: 0.75rem;
    text-align: center;
    border: 1px solid #eee;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.month-item:hover {
    background: rgba(229, 115, 115, 0.1);
    border-color: var(--red);
}

.month-item.active {
    background: var(--red);
    color: white;
    border-color: var(--red);
}

.state-selector {
    background: white;
    padding: 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    max-height: 300px;
    overflow-y: auto;
}

.state-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

.state-item {
    padding: 0.75rem;
    text-align: center;
    border: 1px solid #eee;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.state-item:hover {
    background: rgba(229, 115, 115, 0.1);
    border-color: var(--red);
}

.state-item.active {
    background: var(--red);
    color: white;
    border-color: var(--red);
}

.produce-section {
    padding: 1rem;
}

.produce-section h2 {
    font-size: 1rem;
    color: #666;
    margin-bottom: 0.5rem;
}

.produce-list {
    display: flex;
    flex-direction: column;
}

.produce-item {
    padding: 1rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.1rem;
    color: #333;
    cursor: pointer;
}

nav {
    display: flex;
    justify-content: space-around;
    padding: 0.5rem;
    background-color: #f5f5f5;
    border-top: 1px solid #ddd;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    max-width: 600px;
    margin: 0 auto;
    z-index: 1000;
}

nav button {
    border: none;
    background: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    color: #666;
    font-size: 0.75rem;
    padding: 0.5rem;
    cursor: pointer;
}

nav button.active {
    color: var(--red);
}

nav button img {
    width: 24px;
    height: 24px;
    opacity: 0.7;
}

nav button.active img {
    opacity: 1;
}

/* Detail View Styles */
.hero-image {
    height: 30vh;
    background-color: #c17f59;
    background-size: cover;
    background-position: center;
}

.selection-guide {
    padding: 1.5rem;
    background: white;
    margin-top: -2rem;
    border-radius: 1rem 1rem 0 0;
    position: relative;
}

.selection-guide h2 {
    font-size: 1.5rem;
    color: #333;
    margin-bottom: 1rem;
}

.selection-tips p, .storing-tips p {
    margin-bottom: 1rem;
    line-height: 1.5;
    color: #444;
}

.pesticide-level {
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    background: white;
    border-top: 1px solid #eee;
}

.level-bar {
    flex: 1;
    height: 8px;
    background: #eee;
    border-radius: 4px;
    overflow: hidden;
}

.level-fill {
    height: 100%;
    background: #E57373;
    transition: width 0.3s ease;
}

.level-text {
    color: #666;
}

/* Pesticide View Specific Styles */
.pesticide-view header {
    padding: 1.5rem 1rem;
    background-color: var(--red);
}

.help-button {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
}

.filter-buttons {
    display: flex;
    padding: 1rem;
    gap: 0.5rem;
    background-color: var(--red);
    padding-top: 0;
}

.filter-btn {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    background: none;
    color: white;
    font-size: 1rem;
    cursor: pointer;
}

.filter-btn.active {
    background: rgba(255, 255, 255, 0.2);
}

.search-container {
    padding: 1rem;
    background-color: rgba(229, 115, 115, 0.1);
}

.search-input {
    width: 100%;
    padding: 0.75rem;
    border-radius: 8px;
    border: 1px solid #ddd;
    font-size: 1rem;
    background: white url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="%23666" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="8"/><line x1="21" y1="21" x2="16.65" y2="16.65"/></svg>') no-repeat 12px center;
    padding-left: 40px;
}

.pesticide-list {
    flex: 1;
    padding: 0 1rem;
    overflow-y: auto;
}

.pesticide-item {
    display: flex;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid #eee;
    cursor: pointer;
}

.pesticide-item-name {
    flex: 1;
    font-size: 1.1rem;
    color: #333;
}

.pesticide-bar {
    width: 120px;
    height: 12px;
    background: #eee;
    border-radius: 6px;
    overflow: hidden;
    margin-left: 1rem;
}

.pesticide-bar-fill {
    height: 100%;
    background-color: #E57373;
}

/* Guide View Specific Styles */
.guide-view .search-container {
    padding: 1rem;
    background-color: rgba(229, 115, 115, 0.1);
}

.guide-view .search-input {
    width: 100%;
    padding: 0.75rem;
    border-radius: 8px;
    border: 1px solid #ddd;
    font-size: 1rem;
    background: white url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="%23666" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="8"/><line x1="21" y1="21" x2="16.65" y2="16.65"/></svg>') no-repeat 12px center;
    padding-left: 40px;
}

.guide-content {
    flex: 1;
    display: flex;
    overflow: hidden;
}

.guide-list {
    flex: 1;
    overflow-y: auto;
    padding: 0 1rem;
}

.guide-item {
    padding: 1rem 0;
    border-bottom: 1px solid #eee;
    font-size: 1.1rem;
    color: #333;
    cursor: pointer;
}

.alphabet-index {
    width: 24px;
    display: flex;
    flex-direction: column;
    background: #f8f8f8;
    padding: 0.5rem 0;
}

.alphabet-index div {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    color: #666;
    cursor: pointer;
}

.alphabet-index div:hover {
    color: var(--red);
} 
