* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #ffffff url('/Background/pexels-hngstrm-1939485.jpg') center center/cover no-repeat;
    color: #000000;
    line-height: 1.6;
    min-height: 100vh;
    position: relative;
}

/* Fix pour mobile - background attachment */
@media (max-width: 768px) {
    body {
        background-attachment: scroll;
    }
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.85);
    z-index: -1;
}

/* Container */
.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo {
    height: 40px;
    width: auto;
    object-fit: contain;
}

h1 {
    font-size: 2rem;
    font-weight: 600;
    color: #000;
    margin: 0;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 14px;
    color: #666;
}

/* Menu Toggle Button */
.menu-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: background 0.2s;
}

.menu-toggle:hover {
    background: #f5f5f5;
}

.menu-icon {
    font-size: 20px;
    color: #666;
    font-weight: bold;
}

/* User Menu Dropdown */
.user-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 100;
    min-width: 120px;
    overflow: hidden;
    margin-top: 4px;
}

.user-menu .menu-item {
    display: block;
    width: 100%;
    padding: 10px 16px;
    background: none;
    border: none;
    text-align: left;
    cursor: pointer;
    font-size: 14px;
    color: #333;
    transition: background 0.2s;
}

.user-menu .menu-item:hover {
    background: #f5f5f5;
}

#logoutBtn {
    color: #dc3545;
}

#logoutBtn:hover {
    background: #fff5f5;
}

/* Header Actions */
.header-actions {
    margin-bottom: 30px;
}

.add-goal-btn {
    background: #000;
    color: #fff;
    border: none;
    padding: 12px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.2s;
}

.add-goal-btn:hover {
    background: #333;
}

/* Skills Container */
.skills-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Drag and Drop Styles */
.skill-item {
    cursor: grab;
    user-select: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.skill-item:active {
    cursor: grabbing;
}

.skill-item.dragging {
    opacity: 0.6;
    transform: rotate(2deg) scale(1.02);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    border-color: #000;
}

.skill-item.drag-over {
    transform: translateY(-2px);
    border-color: #000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Empêcher le drag sur les boutons */
.skill-controls button {
    cursor: pointer !important;
}

.skill-controls {
    pointer-events: auto;
}

.drag-placeholder {
    height: 4px;
    background: #000;
    border-radius: 2px;
    margin: 8px 0;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.drag-placeholder.active {
    opacity: 1;
}

/* Mobile drag styles */
.skill-item.long-press {
    animation: longPressAnimation 0.6s ease-in-out;
}

@keyframes longPressAnimation {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

.skill-item.mobile-dragging {
    opacity: 0.8;
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    z-index: 1000;
}

/* Drag handle indicator */
.drag-handle {
    opacity: 0;
    transition: opacity 0.2s ease;
    color: #999;
    font-size: 18px;
    cursor: grab;
    padding: 4px;
    margin-right: 8px;
}

.skill-item:hover .drag-handle {
    opacity: 1;
}

.drag-handle:active {
    cursor: grabbing;
}

.skill-item {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.skill-item:hover {
    border-color: #000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.skill-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.skill-info {
    flex: 1;
}

.skill-type-badge {
    display: inline-block;
    padding: 2px 8px;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    font-size: 11px;
    color: #666;
    margin-bottom: 8px;
    text-transform: uppercase;
    font-weight: 500;
}

.skill-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: #000;
    margin-bottom: 4px;
}

.skill-hours {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 4px;
}

.skill-progress {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 8px;
}

.milestones-list {
    margin-top: 8px;
}

.milestone-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
    font-size: 0.85rem;
}

.milestone-checkbox {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.milestone-text {
    color: #666;
}

.milestone-text.completed {
    text-decoration: line-through;
    opacity: 0.6;
}

/* Battery Indicator */
.battery-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
    width: 100%;
    min-height: 14px; /* Assure une hauteur minimale */
}

.battery-bars {
    display: flex;
    gap: 2px;
    align-items: flex-end;
}

.battery-bar {
    width: 8px;
    height: 12px;
    background: rgba(255, 255, 255, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 1px;
    transition: all 0.3s ease;
}





/* Barres remplies - vert pour tous les types */
.battery-bar.active {
    background: #44ff44;
    border-color: #44ff44;
    box-shadow: 0 0 3px rgba(68, 255, 68, 0.3);
}

/* Adaptation dynamique selon la largeur disponible */
.battery-bars {
    display: flex;
    align-items: flex-end;
    min-width: 20px; /* Largeur minimale pour éviter l'effondrement */
    height: 12px; /* Hauteur fixe pour stabilité */
    gap: var(--bar-gap, 1px);
    width: var(--container-width, auto);
    max-width: 100%; /* Empêche le débordement */
    overflow: hidden; /* Cache les barres qui dépassent */
}

/* Styles de base pour les barres (largeur définie par CSS variable) */
.battery-bar {
    width: var(--bar-width, 8px);
    height: 12px;
    background: transparent;
    border: 1px solid #999;
    border-radius: 2px;
    transition: all 0.3s ease;
    min-width: 2px; /* largeur minimale */
    flex-shrink: 0; /* Empêche la compression */
}

/* Ajustement de hauteur selon la densité */
.battery-bars.dense .battery-bar {
    height: 10px;
}

.battery-bars.very-dense .battery-bar {
    height: 8px;
}

/* Tooltip pour les barres */
.battery-bar {
    cursor: help;
}

.battery-bar:hover {
    transform: scale(1.1);
    z-index: 1;
}

.battery-percentage {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
    min-width: 35px;
    flex-shrink: 0; /* Empêche la compression */
    text-align: right;
}

/* Controls */
.skill-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.increment-btn {
    background: #000;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    font-size: 20px;
    font-weight: 300;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.increment-btn:hover {
    background: #333;
}

.completed-badge {
    background: #000;
    color: #fff;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.archive-btn {
    background: #6c757d;
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.archive-btn:hover {
    background: #5a6268;
}

.delete-btn {
    background: transparent;
    color: #999;
    border: 1px solid #e0e0e0;
    padding: 6px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 11px;
    transition: all 0.2s;
}

.delete-btn:hover {
    background: #f5f5f5;
    color: #666;
}

/* Menu Dropdown */
.menu-container {
    position: relative;
}

.menu-btn {
    background: transparent;
    border: none;
    color: #999;
    cursor: pointer;
    font-size: 20px;
    font-weight: bold;
    padding: 8px;
    border-radius: 4px;
    transition: all 0.2s;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.menu-btn:hover {
    background: #f5f5f5;
    color: #666;
}

.menu-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 100;
    min-width: 120px;
    overflow: hidden;
}

.menu-item {
    display: block;
    width: 100%;
    padding: 10px 16px;
    background: none;
    border: none;
    text-align: left;
    cursor: pointer;
    font-size: 14px;
    color: #333;
    transition: background 0.2s;
}

.menu-item:hover {
    background: #f5f5f5;
}

.menu-item.delete {
    color: #dc3545;
}

.menu-item.delete:hover {
    background: #fff5f5;
}

/* Empty State */
.empty-state {
    text-align: center;
    color: #999;
    font-style: italic;
    padding: 60px 20px;
    border: 1px dashed #e0e0e0;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
}

/* Modal Styles */
.modal {
    display: flex;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
}

/* Archive Modal Styles */
.archive-content {
    padding: 0 20px 20px 20px;
}

.archive-filter {
    margin-bottom: 20px;
}

.archive-filter select {
    padding: 8px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    background: #fff;
    font-size: 14px;
    cursor: pointer;
}

.archived-skills-container {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    background: #fff;
}

.archived-skill-item {
    padding: 12px 16px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.2s;
}

.archived-skill-item:hover {
    background: #f8f9fa;
}

.archived-skill-item:last-child {
    border-bottom: none;
}

.archived-skill-info {
    flex: 1;
}

.archived-skill-name {
    font-weight: 500;
    color: #000;
    margin-bottom: 4px;
}

.archived-skill-details {
    font-size: 0.85rem;
    color: #666;
}

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

.restore-btn {
    background: #000;
    color: #fff;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: background 0.2s;
}

.restore-btn:hover {
    background: #333;
}

.delete-archived-btn {
    background: #dc3545;
    color: #fff;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: background 0.2s;
}

.delete-archived-btn:hover {
    background: #c82333;
}

.empty-archive {
    text-align: center;
    padding: 40px 20px;
    color: #999;
    font-style: italic;
}

.modal-content {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 20px 0 20px;
    margin-bottom: 20px;
}

.modal-header h2 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #000;
}

.close-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #999;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn:hover {
    color: #000;
}

/* Form Styles */
.skill-form {
    padding: 0 20px 20px 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

#skillInput, .skill-type-select, .additional-input input {
    padding: 12px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

#skillInput:focus, .skill-type-select:focus, .additional-input input:focus {
    border-color: #000;
}

.skill-type-select {
    background: #fff;
    cursor: pointer;
}

.additional-input {
    display: flex;
    flex-direction: column;
    gap: 12px;
    animation: slideDown 0.3s ease;
}

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

/* Milestones */
.milestones-section label {
    display: block;
    margin-bottom: 12px;
    font-weight: 500;
    color: #000;
    font-size: 14px;
}

#milestonesContainer {
    margin-bottom: 12px;
}

.milestone-input {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
    align-items: center;
}

.milestone-name {
    flex: 1;
}

.remove-milestone {
    background: #f5f5f5;
    color: #666;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    width: 30px;
    height: 30px;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.remove-milestone:hover {
    background: #e0e0e0;
    color: #000;
}

.add-milestone-btn {
    background: #f5f5f5;
    color: #000;
    border: 1px solid #e0e0e0;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: background 0.2s;
}

.add-milestone-btn:hover {
    background: #e0e0e0;
}

/* Target inputs */
.additional-input.target-inputs {
    flex-direction: row;
    gap: 12px;
}

#target {
    width: 120px;
}

#targetUnit {
    flex: 1;
}

/* Modal Actions */
.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 20px;
}

.cancel-btn {
    background: transparent;
    color: #666;
    border: 1px solid #e0e0e0;
    padding: 10px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.cancel-btn:hover {
    background: #f5f5f5;
}

.primary-btn {
    background: #000;
    color: #fff;
    border: none;
    padding: 10px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.2s;
}

.primary-btn:hover {
    background: #333;
}

/* Auth Modal Specific */
#authModal .modal-content {
    max-width: 400px;
    padding: 30px;
}

#authModal h2 {
    text-align: center;
    margin-bottom: 20px;
    color: #000;
}

#authModal input {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    font-size: 14px;
    outline: none;
}

#authModal input:focus {
    border-color: #000;
}

#authModal button {
    width: 100%;
    padding: 12px;
    background: #000;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
}

#authModal button:hover {
    background: #333;
}

.auth-switch {
    text-align: center;
    margin-top: 15px;
    color: #666;
    font-size: 14px;
}

.auth-switch a {
    color: #000;
    text-decoration: none;
}

.auth-switch a:hover {
    text-decoration: underline;
}

/* Onboarding Styles */
.onboarding-content {
    background: #000;
    color: #fff;
    padding: 40px;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    text-align: center;
}

.onboarding-step {
    animation: fadeIn 0.5s ease-in;
}

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

.onboarding-icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

.onboarding-content h2 {
    font-size: 1.5rem;
    margin-bottom: 16px;
    color: #fff;
}

.onboarding-content p {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 24px;
    opacity: 0.9;
}

.onboarding-instructions {
    text-align: left;
    margin: 20px 0;
}

.instruction {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    font-size: 0.95rem;
}

.step-number {
    background: #fff;
    color: #000;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    font-weight: 600;
    font-size: 12px;
}

.onboarding-btn {
    background: #fff;
    color: #000;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.2s;
}

.onboarding-btn:hover {
    background: #f0f0f0;
}

.onboarding-btn.primary {
    background: #fff;
    color: #000;
}

/* Responsive Design */

/* Tablet and small desktop */
@media (max-width: 1024px) {
    .container {
        max-width: 90%;
        padding: 30px 20px;
    }
}

/* Mobile landscape and small tablets */
@media (max-width: 768px) {
    .container {
        padding: 20px 16px;
    }
    
    .header {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 30px;
    }
    
    .logo {
        height: 36px;
    }
    
    h1 {
        font-size: 1.75rem;
    }
    
    .header-brand {
        gap: 10px;
    }
    
    .user-info {
        position: relative;
    }
    
    .skill-item {
        flex-direction: column;
        gap: 16px;
        padding: 16px;
        position: relative;
    }
    
    .skill-controls {
        position: absolute;
        top: 50%;
        right: 16px;
        transform: translateY(-50%);
        width: auto;
        flex-direction: row;
        gap: 8px;
        align-items: center;
    }
    
    .skill-info {
        padding-right: 80px; /* Espace pour les contrôles */
    }
    
    .modal-content {
        margin: 20px;
        width: calc(100% - 40px);
        max-height: calc(100vh - 40px);
    }
    
    .skill-form {
        padding: 0 16px 16px 16px;
    }
    
    .milestone-input {
        flex-direction: column;
        gap: 8px;
    }
    
    .remove-milestone {
        align-self: flex-end;
        width: 40px;
        height: 40px;
    }
    
    .additional-input.target-inputs {
        flex-direction: column;
    }
    
    #target {
        width: 100%;
    }
}

/* Mobile portrait */
@media (max-width: 480px) {
    .container {
        padding: 16px 12px;
    }
    
    .logo {
        height: 32px;
    }
    
    h1 {
        font-size: 1.5rem;
    }
    
    .header {
        margin-bottom: 24px;
        padding-bottom: 16px;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
    
    .header-brand {
        gap: 8px;
    }
    
    /* Mobile drag adjustments */
    .drag-handle {
        opacity: 1; /* Toujours visible sur mobile */
        font-size: 16px;
    }
    
    .skill-item.mobile-dragging {
        transform: scale(1.02);
    }
    
    /* Archive mobile adjustments */
    .archived-skill-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding: 16px 12px;
    }
    
    .archived-skill-actions {
        width: 100%;
        justify-content: flex-end;
    }
    
    .restore-btn, .delete-archived-btn {
        padding: 8px 12px;
        font-size: 14px;
    }
}
    
    .menu-toggle {
        padding: 6px;
    }
    
    .menu-icon {
        font-size: 18px;
    }
    
    .skill-item {
        padding: 12px;
    }
    
    .skill-name {
        font-size: 1rem;
    }
    
    .skill-hours, .skill-progress {
        font-size: 0.85rem;
    }
    
    .milestone-item {
        padding: 6px 0;
        font-size: 0.8rem;
    }
    
    .battery-indicator {
        gap: 6px;
    }
    
    .battery-bar {
        width: 6px;
        height: 10px;
    }
    
    .battery-percentage {
        font-size: 0.7rem;
        min-width: 30px;
    }
    
    .battery-indicator {
        gap: 6px;
    }
    
    .battery-bars {
        min-width: 15px;
        height: 10px;
    }
    
    .battery-bar {
        height: 10px;
    }
    
    .increment-btn {
        width: 32px;
        height: 32px;
        font-size: 16px;
    }
    
    .archive-btn {
        padding: 6px 10px;
        font-size: 10px;
    }
    
    .menu-btn {
        width: 28px;
        height: 28px;
        font-size: 16px;
    }
    
    .menu-dropdown {
        right: 0;
        top: 100%;
    }
    
    .modal-content {
        margin: 10px;
        width: calc(100% - 20px);
        max-height: calc(100vh - 20px);
    }
    
    .modal-header {
        padding: 16px 16px 0 16px;
    }
    
    .modal-header h2 {
        font-size: 1.1rem;
    }
    
    .skill-form {
        padding: 0 12px 12px 12px;
        gap: 12px;
    }
    
    #skillInput, .skill-type-select, .additional-input input {
        padding: 10px 12px;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .modal-actions {
        flex-direction: column-reverse;
        gap: 8px;
    }
    
    .cancel-btn, .primary-btn {
        width: 100%;
        padding: 12px;
    }
    
    .add-goal-btn {
        width: 100%;
        padding: 14px 20px;
        font-size: 16px;
    }
}

/* Very small screens */
@media (max-width: 320px) {
    .container {
        padding: 12px 8px;
    }
    
    .skill-item {
        padding: 10px;
    }
    
    .skill-controls {
        gap: 8px;
    }
    
    .increment-btn {
        width: 32px;
        height: 32px;
        font-size: 12px;
    }
    
    .delete-btn {
        padding: 4px 8px;
        font-size: 10px;
    }
    
    .battery-indicator {
        gap: 4px;
    }
    
    .battery-percentage {
        font-size: 0.65rem;
        min-width: 25px;
    }
    
    .battery-bars {
        min-width: 10px;
        height: 8px;
    }
    
    .battery-bar {
        height: 8px;
    }
}

/* Landscape orientation adjustments */
@media (max-height: 500px) and (orientation: landscape) {
    .container {
        padding: 16px 20px;
    }
    
    .header {
        margin-bottom: 20px;
        padding-bottom: 12px;
    }
    
    .modal-content {
        max-height: 90vh;
        margin: 5vh auto;
    }
    
    .onboarding-content {
        padding: 20px;
        max-height: 90vh;
        overflow-y: auto;
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    body {
        background-size: cover;
    }
}

/* Hover states for touch devices */
@media (hover: none) and (pointer: coarse) {
    .skill-item:hover {
        border-color: #e0e0e0;
        box-shadow: none;
    }
    
    .increment-btn:hover,
    .add-goal-btn:hover,
    .primary-btn:hover {
        background: #000;
    }
    
    .delete-btn:hover,
    .cancel-btn:hover {
        background: transparent;
    }
}