        tab-view,
* {
    /* Firefox */
    scrollbar-width: none;
    /* IE and Edge */
    -ms-overflow-style: none;
}

/* Webkit browsers (Chrome, Safari, newer Opera versions) */
*::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none;
}

/* Target specific tabs and their scrollable elements */

/* Tab Views - All tabs main containers */
#homeTab, #weatherTab, #tasksTab, #chatTab {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

#homeTab::-webkit-scrollbar, 
#weatherTab::-webkit-scrollbar, 
#tasksTab::-webkit-scrollbar, 
#chatTab::-webkit-scrollbar {
    width: 0;
    display: none;
}

/* Weather Tab specific elements */
.forecast-days {
    -ms-overflow-style: none;
    scrollbar-width: none;
    overflow-x: auto;
}

.forecast-days::-webkit-scrollbar {
    height: 0;
    display: none;
}

/* Tasks Tab specific elements */
#tasksList {
    -ms-overflow-style: none;
    scrollbar-width: none;
    overflow-y: auto;
}

#tasksList::-webkit-scrollbar {
    width: 0;
    display: none;
}

/* Modal scrollable content */
.modal-content {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.modal-content::-webkit-scrollbar {
    width: 0;
    display: none;
}

/* Time slots in task editor */
.time-slots {
    -ms-overflow-style: none;
    scrollbar-width: none;
    overflow-y: auto;
}

.time-slots::-webkit-scrollbar {
    width: 0;
    display: none;
}

/* Ensure scrolling still works */
.tab-view {
    overflow-y: auto;
}

.chat-messages {
    overflow-y: auto;
}

.forecast-days {
    overflow-x: auto;
}

.quick-actions {
    overflow-x: auto;
}

#tasksList {
    overflow-y: auto;
}
        * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #212529;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.phone-container {
    width: 375px;
    height: 812px;
    background: #1a1a1a;
    border-radius: 45px;
    padding: 15px;
    box-shadow: 0 30px 60px rgba(0,0,0,0.4);
    position: relative;
}

.phone-screen {
    width: 100%;
    height: 100%;
    background: #f8f9fa;
    border-radius: 35px;
    overflow: hidden;
    position: relative;
}

/* App Interface */
.app-container {
    height: 100%;
    display: flex;
    flex-direction: column;
    background: #f0f2f5;
    position: relative;
}

.status-bar {
    background: #fff;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    border-bottom: 1px solid #e5e7eb;
}

.app-header {
    background: #fff;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}
.header-text {
    flex: 1;
}
.header-title {
    font-size: 24px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 5px;
}

.header-icons {
    display: flex;
    gap: 8px;
    align-items: center;
}

.header-icon {
    width: 36px;
    height: 36px;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 50%;
    color: #4b5563;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.header-icon:hover {
    background: #ede9fe;
    border-color: #5b21b6;
    color: #5b21b6;
    transform: scale(1.05);
}
.header-subtitle {
    font-size: 14px;
    color: #6b7280;
}

.app-content {
    flex: 1;
    overflow: hidden;
    background: #f0f2f5;
    position: relative;
}

/* Tab Navigation */
.tab-navigation {
    background: #fff;
    display: flex;
    padding: 5px;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 10;
}

.tab-button {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px;
    border: none;
    background: none;
    cursor: pointer;
    transition: all 0.3s;
    color: #9ca3af;
}

.tab-button.active {
    color: #5b21b6;
}

.tab-icon {
    font-size: 24px;
    margin-bottom: 4px;
}

.tab-label {
    font-size: 11px;
    font-weight: 500;
}

/* Tab Views */
.tab-view {
    display: none;
    animation: fadeIn 0.3s ease;
    height: 100%;
    overflow-y: auto;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    background: #f0f2f5;
    padding-bottom: 60px;
}

.tab-view.active {
    display: block;
    z-index: 5;
}

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

/* Home Tab - Fixed Layout */
#homeTab {
    padding: 20px;
    padding-bottom: 70px;
}

.energy-flow-container {
    background: #fff;
    border-radius: 20px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.energy-flow-diagram {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 30px 0;
    position: relative;
    padding: 0 10px;
}

.energy-node {
    text-align: center;
    z-index: 2;
    flex: 0 0 auto;
}

.energy-icon {
    width: 60px;
    height: 60px;
    background: #f3f4f6;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin: 0 auto 8px;
}

.energy-value {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
    white-space: nowrap;
}

.energy-label {
    font-size: 12px;
    color: #6b7280;
    margin-top: 2px;
}

.central-hub {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #5b21b6, #7c3aed);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    color: white;
    box-shadow: 0 8px 20px rgba(91, 33, 182, 0.3);
    margin: 0 20px;
}

.energy-flow-line {
    position: absolute;
    height: 3px;
    background: linear-gradient(90deg, #5b21b6, #7c3aed);
    top: 50%;
    transform: translateY(-50%);
    z-index: 1;
}

.flow-line-left {
    left: 70px;
    width: 50px;
}

.flow-line-right {
    right: 70px;
    width: 50px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.stat-card {
    background: #f9fafb;
    border-radius: 12px;
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.stat-icon {
    width: 36px;
    height: 36px;
    background: #ede9fe;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.stat-info {
    flex: 1;
    min-width: 0;
}

.stat-value {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.stat-label {
    font-size: 11px;
    color: #6b7280;
}

/* Weather Tab - Enhanced */
#weatherTab {
    padding: 15px;
    padding-bottom: 80px;
}

.weather-header {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 20px;
    padding: 25px;
    color: white;
    margin-bottom: 20px;
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}

.current-weather {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.weather-main {
    flex: 1;
}

.weather-temp {
    font-size: 48px;
    font-weight: 300;
    line-height: 1;
}

.weather-desc {
    font-size: 16px;
    opacity: 0.9;
    margin-top: 5px;
}

.weather-icon-large {
    font-size: 64px;
}

.weather-details {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-top: 20px;
}

.weather-detail {
    text-align: center;
}

.detail-value {
    font-size: 18px;
    font-weight: 500;
}

.detail-label {
    font-size: 12px;
    opacity: 0.8;
}

.forecast-container {
    background: #fff;
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.forecast-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #1a1a1a;
}

.forecast-days {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 5px;
}

.forecast-day {
    min-width: 70px;
    text-align: center;
    padding: 10px;
    background: #f9fafb;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
}

.forecast-day:hover {
    background: #ede9fe;
    transform: translateY(-2px);
}

.forecast-day.selected {
    background: #5b21b6;
    color: white;
}

.forecast-day-name {
    font-size: 12px;
    margin-bottom: 8px;
}

.forecast-day.selected .forecast-day-name {
    color: rgba(255,255,255,0.8);
}

.forecast-icon {
    font-size: 28px;
    margin: 5px 0;
}

.forecast-temp {
    font-size: 14px;
    font-weight: 500;
}

/* Hourly Chart */
.hourly-chart {
    background: #fff;
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    margin-bottom: 30px;
}

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

.chart-title {
    font-size: 17px;
    font-weight: 600;
    color: #1a1a1a;
}

.chart-navigation {
    display: flex;
    gap: 8px;
}

.chart-nav-btn {
    width: 30px;
    height: 30px;
    border: 1px solid #e5e7eb;
    background: #fff;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.3s;
}

.chart-nav-btn:hover {
    background: #f3f4f6;
    border-color: #5b21b6;
}

.chart-container {
    height: 220px;
    position: relative;
    overflow: hidden;
    margin-bottom: 5px;
}

.chart-svg {
    width: 100%;
    height: 100%;
}

.chart-grid {
    stroke: #e5e7eb;
    stroke-width: 1;
    stroke-dasharray: 2,2;
}

.chart-line-history {
    fill: none;
    stroke: #5b21b6;
    stroke-width: 3;
}

.chart-line-prediction {
    fill: none;
    stroke: #7c3aed;
    stroke-width: 3;
    stroke-dasharray: 5,5;
}

.chart-area-history {
    fill: url(#gradientHistory);
    opacity: 0.3;
}

.chart-area-prediction {
    fill: url(#gradientPrediction);
    opacity: 0.2;
}

.chart-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 5px;
    margin-left: 50px;
    margin-right: 20px;
    font-size: 10px;
    color: #6b7280;
}

.chart-y-axis {
    position: absolute;
    left: 0;
    top: 20px;
    bottom: 40px;
    width: 30px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    font-size: 10px;
    color: #6b7280;
    text-align: right;
    padding-right: 5px;
}

.prediction-notice {
    background: #f3f4f6;
    border-radius: 8px;
    padding: 8px 12px;
    margin-top: 10px;
    margin-bottom: 20px;
    font-size: 12px;
    color: #6b7280;
    display: flex;
    align-items: center;
    gap: 8px;
}

.historical-indicator {
    display: inline-block;
    width: 20px;
    height: 3px;
    background: #7c3aed;
    border-radius: 2px;
    border: 1px dashed #7c3aed;
}

.prediction-indicator {
    display: inline-block;
    width: 20px;
    height: 3px;
    background: transparent;
    border-radius: 2px;
    border-top: 3px dashed #7c3aed;
}

/* Tasks Tab - Enhanced */

.duration-select {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}
.duration-option {
    flex: 1;
    padding: 10px 8px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    text-align: center;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s;
}
.duration-option:hover {
    background: #f3f4f6;
}
.duration-option.selected {
    background: #5b21b6;
    color: white;
    border-color: #5b21b6;
}
#tasksTab {
    padding: 20px;
    padding-bottom: 80px;
}

#tasksList .task-card:last-child {
    margin-bottom: 30px;
}

.task-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.action-btn {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.action-btn.primary {
    background: #5b21b6;
    color: white;
}

.action-btn.secondary {
    background: #fff;
    color: #5b21b6;
    border: 1px solid #e5e7eb;
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.task-card {
    background: #fff;
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: all 0.3s;
    cursor: pointer;
    position: relative;
}

.task-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.12);
}

.task-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 12px;
}

.task-icon {
    width: 50px;
    height: 50px;
    background: #ede9fe;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.task-info {
    flex: 1;
}

.task-name {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
}

.task-power {
    font-size: 14px;
    color: #6b7280;
}

.task-edit {
    width: 32px;
    height: 32px;
    border: 1px solid #e5e7eb;
    background: #fff;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
}

.task-edit:hover {
    background: #f3f4f6;
    border-color: #5b21b6;
}

.task-schedule {
    background: #f3f4f6;
    border-radius: 10px;
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.schedule-icon {
    color: #5b21b6;
}

.schedule-text {
    font-size: 14px;
    color: #4b5563;
}

.optimal-badge {
    background: #dcfce7;
    color: #16a34a;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
}

/* Modal for task editing */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: #fff;
    border-radius: 20px;
    padding: 25px;
    width: 90%;
    max-width: 320px;
    animation: slideUp 0.3s ease;
}

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

.modal-header {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #1a1a1a;
}

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

.form-label {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 8px;
    display: block;
}

.form-input {
    width: 100%;
    padding: 12px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    font-size: 14px;
    transition: all 0.3s;
}

.form-input:focus {
    outline: none;
    border-color: #5b21b6;
}
.time-display {
    margin-top: 15px;
    padding: 12px;
    background: #f9fafb;
    border-radius: 10px;
    text-align: center;
    font-size: 14px;
    color: #4b5563;
}

.time-slots {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-top: 10px;
}

.time-slot {
    padding: 8px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    text-align: center;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s;
}

.time-slot:hover {
    background: #f3f4f6;
}

.time-slot.optimal {
    background: #dcfce7;
    border-color: #16a34a;
    color: #16a34a;
}

.time-slot.selected {
    background: #5b21b6;
    color: white;
    border-color: #5b21b6;
}

.modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.modal-btn {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.modal-btn.save {
    background: #5b21b6;
    color: white;
}

.modal-btn.cancel {
    background: #f3f4f6;
    color: #6b7280;
}

/* Chat Tab - Enhanced and Fixed */
#chatTab {
    display: none;
    position: absolute;
    height: 100%;
    width: 100%;
    top: 0;
    left: 0;
    background: #f9fafb;
    padding-bottom: 60px;
}

#chatTab.active {
    display: flex !important;
}

.chat-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
    position: relative;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    padding-bottom: 20px; /* Normal padding, not extra large */
    background: #f9fafb;
}

.chat-message {
    margin-bottom: 15px;
    display: flex;
    align-items: flex-end;
    gap: 10px;
    animation: messageSlide 0.3s ease;
    width: 100%;
}

.chat-message:not(.user-message) .message-content {
    background: white;
    color: #1a1a1a;
    border-radius: 18px;
    border-bottom-left-radius: 4px; /* Pointed corner where avatar is */
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

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


.chat-message:not(.user-message) .message-avatar {
    box-shadow: 0 2px 8px rgba(91, 33, 182, 0.2);
}
.message-avatar {
    width: 32px;
    height: 32px;
    background: #5b21b6;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: white;
    flex-shrink: 0;
}

.message-content {
    max-width: 70%;
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.4;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.user-message {
    justify-content: flex-end;
}

.user-message .message-content {
    background: #5b21b6;
    color: white;
    border-radius: 18px;
    border-bottom-right-radius: 4px;
}

.user-message .message-avatar {
    order: 1;
    background: #e5e7eb;
    color: #4b5563;
}

.notification-card {
    background: #fef3c7;
    border: 1px solid #fde68a;
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.notification-icon {
    font-size: 20px;
}

.notification-text {
    flex: 1;
    font-size: 14px;
    color: #92400e;
}

/* Quick actions - now positioned absolutely */
.quick-actions {
    display: flex;
    gap: 8px;
    padding: 10px 15px;
    overflow-x: auto;
    width: 100%;
    box-sizing: border-box;
    background: #f9fafb;
    position: static; /* Remove absolute positioning */
    z-index: 9;
    margin-top: auto; /* Push to end of container */
    border-top: 1px solid #f0f0f0;
}

.quick-action {
    padding: 8px 16px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    font-size: 13px;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.3s;
    flex-shrink: 0;
}

.quick-action:hover {
    background: #ede9fe;
    border-color: #5b21b6;
    color: #5b21b6;
}

.chat-input-container {
    margin-bottom: 20px;
    padding: 10px 15px;
    width: 100%;
    box-sizing: border-box;
    background: #f9fafb;
    position: static;
    z-index: 10;
    border-top: 1px solid #f0f0f0;
}

.input-row {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 0;
}

.chat-input {
    flex: 1;
    height: 40px;
    padding: 0 16px;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    font-size: 15px;
    background: #fff;
    outline: none;
    min-width: 0; /* Pozwala na kurczenie się */
}

.chat-input:focus {
    border-color: #5b21b6;
}

.chat-send {
    width: 40px;
    height: 40px;
    background: #5b21b6;
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
}
.phone-container {
    width: 375px;
    height: 812px;
    background: #1a1a1a;
    border-radius: 45px;
    padding: 15px;
    box-shadow: 0 30px 60px rgba(0,0,0,0.4);
    position: relative;
    
    /* Add these lines */
    transform: scale(0.9);
    transform-origin: center;
}
.chat-mic {
    width: 40px;
    height: 40px;
    background: #5b21b6;
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}
.chat-mic.recording {
    background: #dc2626;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.chat-mic:hover {
    transform: scale(1.05);
}