/* Tea App Consolidated Styles */

/* ============================================
   UTILITY CLASSES
   ============================================ */
.hidden {
    display: none !important;
}

/* ============================================
   CSS VARIABLES
   ============================================ */
:root {
    --tea-primary: #008c45;
    --tea-secondary: #e6f2ea;
    --tea-accent: #f9a825;
    --tea-dark: #005c2d;
    --tea-light: #e6f2ea;
    --tea-text: #333;
    --tea-card-bg: #fff;
    --tea-input-bg: #fff;
    --tea-border: rgb(0 0 0 / 10%);
    --tea-shadow: rgb(0 0 0 / 10%);
    --tea-transition: all 0.3s ease;
    --tea-green: #4a7c59;
    --tea-warm: #fff8e1;
}

/* ============================================
   BASE STYLES
   ============================================ */
.tea-app {
    font-family: Inter, sans-serif;
    background-color: var(--tea-light);
    color: var(--tea-text);
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: var(--tea-transition);
}

.tea-time-app {
    font-family: Poppins, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
    color: var(--tea-text);
    background-color: var(--tea-light);
    min-height: 100vh;
    padding: 5px;
}

.tea-app-container {
    max-width: 100%;
    margin: 0;
    padding: 20px;
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 80px);
    position: relative;
    z-index: 1;
}

#tea-app {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

/* ============================================
   HEADER STYLES
   ============================================ */
.tea-app-header {
    background: linear-gradient(135deg, var(--tea-primary) 0%, var(--tea-dark) 100%);
    color: white;
    padding: 16px;
    text-align: center;
    position: relative;
    box-shadow: 0 2px 10px rgb(0 0 0 / 10%);
}

.tea-app-title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.app-header {
    display: flex;
    align-items: center;
    margin-bottom: 30px;
    padding: 20px;
    background: linear-gradient(135deg, rgb(0 140 69 / 12%) 0%, rgb(0 140 69 / 6%) 100%);
    border-radius: 28px;
    box-shadow: 0 4px 12px rgb(0 0 0 / 5%);
    backdrop-filter: blur(10px);
    border: 1px solid rgb(0 140 69 / 15%);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.app-info {
    flex: 1;
}

.app-info h1 {
    margin: 0 0 8px;
    color: #007a3d;
    font-size: 2.4rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    text-shadow: 0 1px 2px rgb(0 0 0 / 5%);
}

.app-info p {
    margin: 0;
    color: #1a1a1a;
    font-size: 1.2rem;
    font-weight: 500;
    letter-spacing: 0.3px;
    background: rgb(255 255 255 / 90%);
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgb(0 0 0 / 5%);
}

.tea-app-logo {
    width: 120px;
    height: 120px;
    border-radius: 24px;
    box-shadow: 0 8px 20px rgb(0 140 69 / 25%);
    margin-right: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 3px solid #008c45;
    background-color: #008c45;
    padding: 8px;
    position: relative;
    overflow: hidden;
}

.tea-app-logo:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 24px rgb(0 140 69 / 30%);
}

.tea-app-logo::after {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        to bottom right,
        rgb(255 255 255 / 20%) 0%,
        rgb(255 255 255 / 0%) 40%,
        rgb(255 255 255 / 0%) 100%
    );
    transform: rotate(30deg);
    pointer-events: none;
}

/* ============================================
   BANNER STYLES
   ============================================ */
.tea-banner {
    background: linear-gradient(135deg, #4a7c59 0%, #2e4f3b 100%);
    color: white;
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 6px rgb(0 0 0 / 10%);
}

.tea-banner-content {
    position: relative;
    z-index: 1;
    text-align: center;
    margin: 0 auto;
}

.tea-banner-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 8px;
    text-align: center;
}

.tea-banner-subtitle {
    font-size: 16px;
    opacity: 0.9;
    font-weight: 300;
    text-align: center;
}

/* ============================================
   TAB NAVIGATION
   ============================================ */
.tab-navigation {
    display: flex;
    background-color: white;
    border-bottom: 1px solid rgb(74 124 89 / 10%);
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgb(0 0 0 / 5%);
    border-radius: 12px;
    position: relative;
    z-index: 10;
}

.tab-button {
    flex: 1;
    padding: 16px;
    border: none;
    background: none;
    cursor: pointer;
    font-family: Inter, sans-serif;
    font-size: 1rem;
    font-weight: 500;
    color: #2e4f3b;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 56px;
    touch-action: manipulation;
}

.tab-button:hover {
    color: #4a7c59;
    background-color: rgb(74 124 89 / 5%);
}

.tab-button.active {
    color: #4a7c59;
    font-weight: 600;
    border-bottom-color: var(--primary-color);
}

.tab-button.active::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background-color: #4a7c59;
    border-radius: 3px 3px 0 0;
}

.tab-icon {
    font-size: 1.2rem;
}

.tab-content {
    display: none;
    animation: fade-in 0.3s ease;
    position: relative;
    z-index: 5;
}

.tab-content.active {
    display: block !important;
}

/* ============================================
   FORM STYLES
   ============================================ */
.tea-form-container {
    background-color: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgb(0 0 0 / 5%);
}

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

.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
    color: #2e4f3b;
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group textarea,
input[type="text"],
textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
    font-family: Inter, sans-serif;
    min-height: 48px;
    touch-action: manipulation;
}

.form-group input:focus,
.form-group textarea:focus,
input[type="text"]:focus,
textarea:focus {
    outline: none;
    border-color: #4a7c59;
    font-size: 16px;
}

textarea {
    resize: vertical;
    min-height: 100px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.required {
    color: #dc2626;
    font-weight: 400;
}

/* ============================================
   TEA TYPE SELECTION
   ============================================ */
.tea-type-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 1rem !important;
    padding: 1rem !important;
    max-width: 600px;
    margin: 0 auto;
    justify-content: center;
}

.tea-type-btn {
    padding: 16px 8px;
    background-color: white;
    border: 2px solid #e5e5e5;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    min-height: 120px;
    touch-action: manipulation;
}

.tea-type-btn:hover {
    border-color: #4a7c59;
    background-color: rgb(74 124 89 / 5%);
    transform: translateY(-2px);
}

.tea-type-btn.active,
.tea-type-btn.selected {
    background-color: #4a7c59;
    color: white;
    border-color: #4a7c59;
}

.tea-type-btn[data-type="green"].active {
    background: linear-gradient(135deg, #4caf50, #45a049);
    border-color: #4caf50;
}

.tea-type-btn[data-type="black"].active {
    background: linear-gradient(135deg, #5d4037, #4e342e);
    border-color: #5d4037;
}

.tea-type-btn[data-type="oolong"].active {
    background: linear-gradient(135deg, #ff9800, #f57c00);
    border-color: #ff9800;
}

.tea-type-btn[data-type="white"].active {
    background: linear-gradient(135deg, #fdd835, #fbc02d);
    border-color: #fdd835;
    color: #333;
}

.tea-type-btn[data-type="herbal"].active {
    background: linear-gradient(135deg, #9c27b0, #7b1fa2);
    border-color: #9c27b0;
}

.tea-type-btn[data-type="pu-erh"].active {
    background: linear-gradient(135deg, #d32f2f, #c62828);
    border-color: #d32f2f;
}

.tea-type-icon {
    font-size: 24px;
    line-height: 1;
}

.tea-type-name {
    font-size: 0.875rem;
    font-weight: 600;
    text-align: center;
    line-height: 1.2;
}

.tea-type-temp {
    font-size: 0.75rem;
    line-height: 1;
    white-space: nowrap;
}

/* ============================================
   TEA SELECTION CONTAINER
   ============================================ */
.tea-selection-container,
#tea-selection-container {
    background-color: var(--tea-card-bg);
    border-radius: 16px;
    padding: 12px;
    box-shadow: 0 4px 12px rgb(0 0 0 / 5%);
    max-width: 600px;
    margin: 0 auto 10px;
    position: relative;
    z-index: 20;
}

.tea-selection-container h2,
#tea-selection-container h2 {
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
    text-align: center;
    white-space: normal !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    line-height: 1.3;
    padding: 0 1rem;
}

/* ============================================
   RATING STYLES
   ============================================ */
.rating-buttons {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    position: relative;
    z-index: 30;
}

.rating-btn {
    flex: 1;
    padding: 12px 8px;
    background-color: white;
    border: 2px solid #e5e5e5;
    border-radius: 12px;
    cursor: pointer !important;
    transition: all 0.2s ease;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 4px;
    min-width: 56px;
    min-height: 56px;
    position: relative;
    z-index: 35;
    touch-action: manipulation;
}

.rating-btn:hover {
    border-color: #4a7c59;
    background-color: rgb(74 124 89 / 5%);
    transform: translateY(-2px);
}

.rating-btn.active,
.rating-btn.selected {
    background: linear-gradient(135deg, #4a7c59, #5d8a60);
    color: white;
    border-color: #4a7c59;
}

.rating-emoji {
    font-size: 1.75rem !important;
    line-height: 1;
}

.rating-btn span:last-child {
    font-size: 0.75rem;
    font-weight: 500;
}

/* ============================================
   TIMER STYLES
   ============================================ */
.tea-timer-container {
    background-color: var(--tea-card-bg);
    border-radius: 16px;
    padding: 12px;
    box-shadow: 0 4px 12px rgb(0 0 0 / 5%);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.tea-timer-display {
    position: relative;
    width: 220px;
    height: 220px;
    margin: 30px auto;
    border-radius: 50%;
    background: linear-gradient(135deg, #fff, #f8fcfa);
    box-shadow: 0 10px 30px rgb(0 0 0 / 10%), inset 0 0 0 2px rgb(0 140 69 / 20%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: all 0.3s ease;
}

.tea-timer-text,
#timer-display {
    position: relative;
    z-index: 10;
    font-size: 3rem !important;
    font-weight: 700;
    color: #007a3d;
    text-shadow: 0 2px 4px rgb(0 0 0 / 10%);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, monospace;
    line-height: 1;
    padding: 1rem;
}

.tea-timer-text.completed {
    color: var(--tea-accent);
    animation: pulse 1.5s infinite;
}

.tea-timer-controls {
    display: flex;
    gap: 16px;
    margin-top: 24px;
    justify-content: center;
}

.tea-timer-btn,
.timer-btn {
    padding: 12px 24px;
    border-radius: 50px;
    border: none;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgb(0 0 0 / 10%);
    min-height: 48px;
    touch-action: manipulation;
}

.tea-timer-btn:hover,
.timer-btn:hover {
    background-color: var(--tea-dark);
}

.tea-timer-btn:active,
.timer-btn:active {
    transform: scale(0.98);
}

.tea-timer-btn.start {
    background: linear-gradient(to bottom right, #00a651, #008c45);
    color: white;
}

.tea-timer-btn.start:hover {
    background: linear-gradient(to bottom right, #009a4b, #007a3d);
    box-shadow: 0 6px 16px rgb(0 140 69 / 30%);
}

.tea-timer-btn.reset {
    background: #f5f5f5;
    color: #555;
    border: 1px solid #e0e0e0;
}

.tea-timer-btn.reset:hover {
    background: #e8e8e8;
    box-shadow: 0 6px 16px rgb(0 0 0 / 10%);
}

/* ============================================
   BUTTON STYLES
   ============================================ */
.btn,
/* Apply only to tea app buttons, not header buttons */
.tea-app-container button,
.tea-selection button,
.tea-timer button,
.tab-content button {
    min-height: 48px;
    padding: 0.75rem 1.5rem;
    touch-action: manipulation;
    font-size: 1rem;
}

.btn-primary {
    background-color: #4A7C59;
    color: white;
    font-size: 18px;
    padding: 15px 40px;
    margin-top: 20px;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

.btn-primary:hover {
    background-color: #3a6449;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgb(0 0 0 / 20%);
}

.submit-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #4a7c59, #5d8a60);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgb(74 124 89 / 25%);
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgb(74 124 89 / 35%);
}

.submit-btn:active {
    transform: translateY(0);
}

/* ============================================
   QUICK STEEP SECTION
   ============================================ */
.quick-steep-section {
    margin-bottom: 20px;
}

.quick-steep-btn,
#repeat-last-tea {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #4a7c59, #5d8a60);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    display: flex !important;
    align-items: center;
    gap: 12px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgb(74 124 89 / 20%);
    min-height: 56px;
    flex-wrap: nowrap;
}

.quick-steep-btn:hover,
#repeat-last-tea:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgb(74 124 89 / 30%);
}

.quick-steep-icon {
    font-size: 24px;
}

.quick-steep-text {
    flex: 1;
    text-align: left;
    min-width: 0;
    overflow: hidden;
}

.quick-steep-text strong {
    display: block;
    font-size: 1rem;
    margin-bottom: 4px;
}

.quick-steep-text small {
    font-size: 0.85rem;
    opacity: 0.9;
    white-space: normal;
    overflow: visible;
    text-overflow: ellipsis;
    word-break: break-word;
}

.quick-steep-arrow {
    font-size: 20px;
}

#repeat-last-tea[style*="display: none"] {
    display: none !important;
}

/* ============================================
   STATISTICS STYLES
   ============================================ */
.tea-stats-card {
    background-color: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgb(0 0 0 / 5%);
}

.tea-stats-card h2 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #2e4f3b;
    font-size: 1.5rem;
}

.stats-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.stat-card.enhanced {
    background: linear-gradient(135deg, #f5faf7, #e8f5e9);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    transition: transform 0.2s ease;
}

.stat-card.enhanced:hover {
    transform: translateY(-2px);
}

.stat-icon {
    font-size: 28px;
    display: block;
    margin-bottom: 8px;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: #4a7c59;
    display: block;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 0.9rem;
    color: #666;
    display: block;
}

/* ============================================
   ENTRIES STYLES
   ============================================ */
.tea-entries-card {
    background-color: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgb(0 0 0 / 5%);
}

.tea-entries-card h2 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #2e4f3b;
    font-size: 1.5rem;
}

.entries-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tea-entry-card {
    background: linear-gradient(135deg, #fff, #f8fffe);
    border-radius: 12px;
    padding: 20px;
    border-left: 4px solid #4a7c59;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgb(0 0 0 / 5%);
}

.tea-entry-card:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgb(0 0 0 / 10%);
}

.tea-entry-card[data-type="green"] {
    border-left-color: #4caf50;
}

.tea-entry-card[data-type="black"] {
    border-left-color: #5d4037;
}

.tea-entry-card[data-type="oolong"] {
    border-left-color: #ff9800;
}

.tea-entry-card[data-type="white"] {
    border-left-color: #fdd835;
}

.tea-entry-card[data-type="herbal"] {
    border-left-color: #9c27b0;
}

.tea-entry-card[data-type="pu-erh"] {
    border-left-color: #d32f2f;
}

.entry-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.tea-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: #2e4f3b;
}

.tea-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    background: linear-gradient(135deg, #4a7c59, #5d8a60);
    color: white;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.entry-details {
    display: flex;
    gap: 20px;
    margin-bottom: 12px;
    font-size: 0.9rem;
    color: #666;
}

.detail {
    display: flex;
    align-items: center;
    gap: 4px;
}

.entry-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #ffd700;
    font-size: 1.1rem;
}

.entry-notes {
    font-style: italic;
    color: #555;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #e5e5e5;
}

.entry-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
}

.entry-date {
    font-size: 0.85rem;
    color: #999;
}

.entry-actions {
    display: flex;
    gap: 8px;
}

.share-btn,
.delete-btn {
    background: none;
    border: 1px solid #ddd;
    color: #666;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

.share-btn:hover {
    border-color: #4a7c59;
    color: #4a7c59;
    background-color: rgb(74 124 89 / 5%);
}

.delete-btn:hover {
    border-color: #dc3545;
    color: #dc3545;
    background-color: rgb(220 53 69 / 5%);
}

/* ============================================
   NOTIFICATION STYLES
   ============================================ */
.notification,
.toast-notification {
    position: fixed;
    top: 80px;
    right: 20px;
    padding: 16px 24px;
    border-radius: 8px;
    background-color: #4a7c59;
    color: white;
    box-shadow: 0 4px 12px rgb(0 0 0 / 20%);
    transform: translateX(400px);
    transition: transform 0.3s ease;
    z-index: 1001;
}

.notification.show,
.toast-notification.show {
    transform: translateX(0);
}

.notification.success {
    background-color: #059669;
}

.notification.error {
    background-color: #dc2626;
}

.notification.info {
    background-color: #3b82f6;
}

/* ============================================
   EMPTY STATES
   ============================================ */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-secondary);
}

.empty-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state p {
    margin: 8px 0;
}

/* ============================================
   BACK BUTTON CONTAINER
   ============================================ */
.back-button-container {
    position: relative;
    bottom: auto;
    left: auto;
    transform: none;
    z-index: 1;
    margin: 2rem auto;
    width: 100%;
    max-width: 600px;
    text-align: center;
    padding: 1rem;
    pointer-events: auto;
    background: transparent;
}

.back-button-container a {
    display: inline-block;
    margin: 0.5rem;
    pointer-events: auto;
}

/* ============================================
   BREW GUIDE SECTION
   ============================================ */
.brew-guide-section {
    position: relative;
    z-index: 20;
    padding: 1.5rem 1rem;
}

.brew-guide-header {
    margin-bottom: 1.5rem;
}

.brew-guide-header h3 {
    font-size: 1.375rem;
}

.selected-tea-info {
    margin-bottom: 1.5rem;
}

.brew-parameters {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin: 1.5rem 0;
}

.brew-param {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: 8px;
    min-height: 60px;
}

.param-icon {
    font-size: 1.5rem;
    min-width: 2rem;
    text-align: center;
}

.param-info {
    flex: 1;
}

.param-value {
    font-weight: 600;
    color: var(--primary-color);
}

/* ============================================
   QUICK RATING SECTION
   ============================================ */
.quick-rating-section {
    position: relative;
    z-index: 25;
    margin-top: 2rem;
    padding-top: 1.5rem;
}

.quick-rating-section h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

@keyframes steam {
    0% {
        transform: translateX(-50%) translateY(0) scale(1);
        opacity: 0.7;
    }
    100% {
        transform: translateX(-50%) translateY(-20px) scale(1.5);
        opacity: 0;
    }
}

@keyframes fade-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

/* Tablet Responsive */
@media (min-width: 960px) {
    .tea-app-container {
        padding: 24px 40px;
    }
    
    .tea-banner {
        max-width: 900px;
        margin: 0 auto 20px;
    }
    
    .tab-navigation {
        justify-content: center;
        max-width: 600px;
        margin: 0 auto 20px;
    }
    
    .tab-button {
        max-width: 300px;
    }
    
    .tea-form-container {
        padding: 32px;
    }
    
    .simplified-form {
        display: grid;
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

@media (min-width: 1400px) {
    .tea-app-container {
        padding: 32px 60px;
    }
    
    .tab-navigation {
        max-width: 800px;
        margin: 0 auto 20px;
    }
    
    .tea-form-container {
        padding: 40px;
    }
    
    .simplified-form {
        max-width: 1200px;
        margin: 0 auto;
    }
}

@media (min-width: 1920px) {
    .tea-app-container {
        padding: 40px 80px;
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .tea-app-container {
        padding: 0;
        padding-bottom: 2rem;
    }
    
    .tea-banner {
        padding: 1.5rem 1rem;
        text-align: center;
    }
    
    .tea-banner-title {
        font-size: 1.5rem;
    }
    
    .tea-banner-subtitle {
        font-size: 0.875rem;
        margin-top: 0.5rem;
    }
    
    .tab-navigation {
        display: flex;
        width: 100%;
        border-bottom: 1px solid var(--border-color);
        background: var(--bg-primary);
        position: sticky;
        top: 0;
        z-index: 100;
    }
    
    .tab-button {
        flex: 1;
        min-height: 56px;
        padding: 0.75rem;
        font-size: 0.875rem;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 0.25rem;
        border: none;
        background: transparent;
        position: relative;
    }
    
    .tab-icon {
        font-size: 1.25rem;
    }
    
    .tea-selection-container,
    #tea-selection-container {
        padding: 1rem;
    }
    
    .tea-selection-container h2,
    #tea-selection-container h2 {
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
        padding: 0 1rem;
    }
    
    .tea-type-grid {
        grid-template-columns: repeat(2, minmax(150px, 1fr)) !important;
        gap: 1rem !important;
        padding: 1rem !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    
    .tea-type-btn {
        min-width: unset !important;
        width: 100% !important;
        min-height: 120px !important;
        padding: 1rem 0.75rem !important;
        font-size: 0.875rem !important;
    }
    
    .tea-type-icon {
        font-size: 2rem !important;
    }
    
    .tea-type-name {
        font-size: 0.875rem !important;
        font-weight: 600 !important;
    }
    
    .tea-type-temp {
        font-size: 0.75rem !important;
        opacity: 0.8;
    }
    
    #tea-name {
        min-height: 48px !important;
        font-size: 16px !important;
        padding: 0.75rem !important;
    }
    
    #notes {
        min-height: 100px !important;
        font-size: 16px !important;
        padding: 0.75rem !important;
    }
    
    .rating-buttons {
        display: flex !important;
        justify-content: space-around !important;
        gap: 0.5rem !important;
        padding: 0.5rem !important;
        flex-wrap: nowrap !important;
    }
    
    .rating-btn {
        min-width: 56px !important;
        min-height: 56px !important;
        padding: 0.5rem !important;
        font-size: 1.5rem !important;
        border-radius: 12px !important;
        flex: 0 0 auto !important;
    }
    
    .rating-emoji {
        font-size: 1.75rem !important;
    }
    
    .rating-btn span:last-child {
        display: none;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .app-header {
        flex-direction: column;
        text-align: center;
        padding: 16px;
    }
    
    .tea-app-logo {
        margin-right: 0;
        margin-bottom: 16px;
    }
    
    .brew-guide-section {
        padding: 1rem;
    }
    
    .back-button-container {
        position: relative;
        bottom: auto;
        left: auto;
        transform: none;
        margin: 2rem auto;
        padding: 1rem;
        text-align: center;
        width: 100%;
    }
    
    .back-button-container a {
        display: inline-block;
        margin: 0.5rem;
        padding: 0.75rem 1.5rem;
        min-height: 48px;
        min-width: 120px;
    }
    
    * {
        max-width: 100vw !important;
    }
    
    body {
        overflow-x: hidden !important;
    }
}

@media (max-width: 480px) {
    .tea-app-container {
        width: 100% !important;
        max-width: 100vw !important;
        overflow-x: hidden !important;
    }
    
    .tea-type-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1rem !important;
        padding: 0 1rem !important;
        max-width: 100% !important;
        margin: 0 auto !important;
    }
    
    .tea-type-btn {
        width: 100% !important;
        min-height: 140px !important;
        padding: 1.5rem 1rem !important;
    }
    
    .tea-banner-title {
        font-size: 1.75rem !important;
        margin-bottom: 0.5rem !important;
    }
    
    .tea-banner-subtitle {
        font-size: 0.875rem !important;
    }
    
    .rating-buttons {
        gap: 0.75rem !important;
        padding: 0 0.5rem !important;
    }
    
    .rating-btn {
        width: 56px !important;
        height: 56px !important;
        padding: 0 !important;
    }
    
    .rating-emoji {
        font-size: 1.5rem !important;
    }
    
    .toast-notification {
        bottom: 80px !important;
        left: 1rem !important;
        right: 1rem !important;
        max-width: calc(100% - 2rem) !important;
        transform: translateX(0) translateY(100px) !important;
        margin: 0 !important;
        border-radius: 8px !important;
        padding: 1rem !important;
        font-size: 0.875rem !important;
        box-shadow: 0 4px 12px rgb(0 0 0 / 15%) !important;
    }
    
    .toast-notification.show {
        transform: translateX(0) translateY(0) !important;
    }
}

/* Halftop Resolution (960x987) */
@media (min-width: 960px) and (min-height: 900px) and (max-height: 1100px) {
    .tea-app-container {
        max-width: 100% !important;
        padding: 20px 40px !important;
        min-height: calc(100vh - 80px) !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
    }
    
    #tea-app {
        width: 100% !important;
        max-width: 1200px !important;
        margin: 0 auto !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
    }
    
    .tea-banner {
        padding: 25px !important;
        margin: 0 auto 15px !important;
        max-width: 900px !important;
        width: 100% !important;
        text-align: center !important;
        box-sizing: border-box !important;
    }
    
    .tea-banner-title {
        font-size: 28px !important;
        text-align: center !important;
    }
    
    .tea-banner-subtitle {
        font-size: 15px !important;
        text-align: center !important;
    }
    
    .tab-navigation {
        margin: 0 auto 20px !important;
        max-width: 700px !important;
        display: flex !important;
        justify-content: center !important;
    }
    
    .tea-selection-container,
    #tea-selection-container {
        max-width: 850px !important;
        margin: 0 auto !important;
        padding: 30px !important;
        background: white !important;
        border-radius: 16px !important;
        box-shadow: 0 4px 12px rgb(0 0 0 / 5%) !important;
    }
    
    .tea-type-grid {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 1.25rem !important;
        max-width: 600px !important;
        width: 100% !important;
        margin: 0 auto 2rem !important;
        justify-content: center !important;
    }
    
    .tea-type-btn {
        padding: 1.5rem 1rem !important;
        min-height: 140px !important;
        border-radius: 12px !important;
        box-shadow: 0 2px 8px rgb(0 0 0 / 5%) !important;
    }
    
    .tea-type-btn:hover {
        transform: translateY(-4px);
        box-shadow: 0 8px 20px rgb(74 124 89 / 15%);
        border-color: var(--tea-primary, #4a7c59) !important;
    }
}

/* Theme Fixes */
.real-mode .toast-notification {
    background: #2d3748;
    color: #f7fafc;
}

.real-mode .brew-param {
    background: rgb(255 255 255 / 5%) !important;
}

.real-mode .tab-button.active {
    color: var(--primary-color) !important;
}

/* Focus States */
button:focus,
.tea-type-btn:focus,
.rating-btn:focus,
input:focus {
    outline: 3px solid var(--primary-color, #4A7C59) !important;
    outline-offset: 2px !important;
}

/* Prevent Text Selection on Buttons */
button,
.tea-type-btn,
.rating-btn,
.tab-button {
    user-select: none;
}

/* Tap Highlight */
* {
    -webkit-tap-highlight-color: transparent;
}

/* Smooth Scrolling */
.tea-app-page {
    scroll-behavior: smooth;
}