/* Add this at the top of your CSS file */
@font-face {
    font-family: 'CustomFont';
    src: url('./fonts/font.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

/* Add/update these styles in style.css */
html, body {
    margin: 0;
    padding: 0;
    overflow: hidden; /* Prevents scrolling */
    height: 100vh; /* Full viewport height */
    width: 100vw; /* Full viewport width */
}

body {
    font-family: Arial, sans-serif;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    margin: 0;
    padding: 0; /* Remove padding */
    background-color: #f4f4f4;
    transition: background-color 0.3s ease;
    gap: 40px;
    position: fixed; /* Alternative approach to prevent mobile bouncing */
    touch-action: none; /* Prevents pull-to-refresh on mobile */
}

/* Update container positioning */
.container {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    max-width: 90vw;
    width: 100%;
    gap: 2vw;
    padding: 1vw;
    height: calc(100vh - 120px); /* Account for logo space */
    margin-top: min(100px, 10vh); /* Space for logo */
    margin-left: max(260px, 20vw); /* Adjust main container to account for sidebar */
}

.header {
    width: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sprite {
    width: min(300px, 25vw);
    height: min(300px, 25vw);
    image-rendering: pixelated;
    transition: all 0.3s ease-in-out;
}

.timer {
    width: 400px; /* Set fixed width instead of flex-grow */
    text-align: center;
    background-color: white;
    padding: 20px;
    position: relative;
    border: 4px solid #000;
    border-radius: 2px;
    box-shadow: 
        inset -4px -4px 0 0 #a0a0a0,
        inset 4px 4px 0 0 #ffffff,
        0 0 10px rgba(0, 0, 0, 0.3); /* Added outer shadow */
    transition: background-color 0.3s ease, all 0.3s ease-in-out;
}

.timer::before {
    content: '';
    position: absolute;
    bottom: -4px;
    right: -4px;
    width: 8px;
    height: 8px;
    background: #000;
    border-radius: 2px;
}

.dark-mode .timer {
    background-color: #444;
    border: 4px solid #000; /* Changed back to black */
    box-shadow: 
        inset -4px -4px 0 0 #333,
        inset 4px 4px 0 0 #666,
        0 0 15px rgba(0, 0, 0, 0.4); /* Adjusted shadow */
    color: #f4f4f4;
}

.dark-mode .timer::before {
    background: #000; /* Kept black */
}

.time {
    font-size: 42px; /* Reduced from 48px */
    margin-bottom: 20px;
    color: #333;
    font-family: 'CustomFont', 'Courier New', monospace; /* Fallback fonts after CustomFont */
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
    background: rgba(0,0,0,0.03);
    padding: 10px;
    border-radius: 10px;
    margin: 15px 0;
}

.time span {
    font-size: min(48px, 4vw);
    color: inherit;
}

/* Remove the .time input styles since we're not using inputs anymore */

button {
    padding: max(6px, 0.5vw) max(12px, 1vw); /* Slightly reduced padding */
    font-size: max(12px, 0.9vw); /* Reduced from 16px */
    margin: 5px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease, all 0.3s ease-in-out;
    background-color: #f0f0f0;
    transform: translateY(0);
    font-family: 'CustomFont', 'Courier New', monospace;
}

button:hover {
    background-color: #ddd;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3); /* Increased shadow */
}

button:active {
    background-color: #ccc;
}

.dark-mode {
    background-color: #333;
}

.dark-mode button {
    background-color: #555;
    color: #f4f4f4;
}

.dark-mode button:hover {
    background-color: #666;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5); /* Darker shadow for contrast */
}

.dark-mode button:active {
    background-color: #777;
}

.dark-mode input {
    color: #f4f4f4;
}

.dark-mode .time,
.dark-mode .time input,
.dark-mode #seconds {
    color: #f4f4f4;
}

.break-time {
    border: 2px solid #4CAF50;
}

.break-time input {
    color: #4CAF50;
}

.break-time #minutes,
.break-time #seconds {
    color: #4CAF50;
}

.dark-mode .break-time {
    border: 2px solid #8BC34A;
}

.dark-mode .break-time input {
    color: #8BC34A;
}

.dark-mode .break-time #minutes,
.dark-mode .break-time #seconds {
    color: #8BC34A;
}

#status {
    font-size: 0.9rem; /* Reduced from 1rem */
    margin-bottom: 10px;
    transition: color 0.3s ease;
    font-weight: bold;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding: 5px 10px;
    border-radius: 15px;
    background: rgba(0,0,0,0.05);
    display: inline-block;
    font-family: 'CustomFont', 'Courier New', monospace;
}

.break-time #status {
    color: #4CAF50;
    background: rgba(76, 175, 80, 0.1);
}

.dark-mode .break-time #status {
    color: #8BC34A;
}

.settings label {
    display: block;
    margin-bottom: 10px;
    font-size: 14px; /* Reduced from 16px */
    color: #333;
    font-family: 'CustomFont', 'Courier New', monospace;
}

.dark-mode .settings label {
    color: #ccc;
}

.settings input {
    width: 50px;
    font-size: 14px; /* Reduced from 16px */
    text-align: center;
    border: 1px solid #ccc;
    border-radius: 5px;
    padding: 4px; /* Slightly reduced padding */
    margin-left: 10px;
    font-family: 'CustomFont', 'Courier New', monospace;
}

.dark-mode .settings input {
    border: 1px solid #555;
    background-color: #333;
    color: #ccc;
}

/* Add these styles to style.css */
.logo {
    position: fixed;
    top: 50px;
    left: 50%;
    transform: translateX(-50%);
    width: 300px;
    text-align: center;
}

.logo-img {
    width: 100%;
    max-width: 300px;
    height: auto;
}

/* Add to style.css */
/* Update HP bar container styles */
.hp-bar-container {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 15px auto; /* Changed from 15px 0 to center */
    font-family: 'Courier New', monospace;
    font-weight: bold;
    width: 90%; /* Added width constraint */
    justify-content: center; /* Added to center contents */
}

.hp-label {
    background: #313131;
    color: white;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 12px; /* Reduced from 14px */
    font-family: 'CustomFont', 'Courier New', monospace;
}

.hp-bar-wrapper {
    flex-grow: 1;
    background: #313131;
    padding: 3px;
    border-radius: 4px;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
    max-width: 250px; /* Add max-width for better control */
}

.hp-bar {
    background: #707070;
    height: 12px;
    border-radius: 2px;
    overflow: hidden;
}

.hp-remaining {
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, #00ff00, #00dd00);
    transition: width 1s linear, background-color 0.5s, all 0.3s ease-in-out;
}

/* HP color states */
.hp-remaining.medium {
    background: linear-gradient(to bottom, #ffff00, #dddd00);
}

.hp-remaining.low {
    background: linear-gradient(to bottom, #ff0000, #dd0000);
}

/* Remove or hide the HP fraction */
.hp-fraction {
    display: none;
}

/* Dark mode adjustments */
.dark-mode .hp-label {
    background: #515151;
}

.dark-mode .hp-bar-wrapper {
    background: #515151;
}

/* Make the layout more responsive for smaller screens */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
        gap: 20px;
        padding: 10px;
        height: calc(100vh - 100px);
    }
    
    .header, .timer {
        width: 100%;
        max-width: 400px;
    }
    
    .sprite {
        width: 150px;
        height: 150px;
    }
}

/* Add smoother transitions */
.timer, .sprite, button, .hp-remaining {
    transition: all 0.3s ease-in-out;
}

/* Hover effects for buttons */
button {
    transform: translateY(0);
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* Add to style.css */
.datetime-display {
    position: fixed;
    top: min(85px, 10vh);
    left: max(20px, 2vw);
    font-family: 'CustomFont', 'Courier New', monospace;
    width: min(200px, 20vw);
    text-align: center;
    padding: 10px 20px;
    z-index: 1000;
    border: 4px solid #000;
    border-radius: 2px;
    box-shadow: 
        inset -4px -4px 0 0 #a0a0a0,
        inset 4px 4px 0 0 #ffffff,
        0 0 10px rgba(0, 0, 0, 0.3);
    background-color: white;
    min-height: 80px; /* Ensure consistent height */
}

.datetime-display .time {
    display: block;
    font-size: 36px;
    color: #333;
    line-height: 1;
    margin-bottom: 8px;
    background: transparent;
    padding: 0;
    border: none;
    box-shadow: none;
}

.datetime-display .date {
    display: block;
    font-size: 12px;
    color: #333;
    line-height: 1;
}

.dark-mode .datetime-display {
    background-color: #444;
    box-shadow: 
        inset -4px -4px 0 0 #333,
        inset 4px 4px 0 0 #666,
        0 0 15px rgba(0, 0, 0, 0.4);
}

.dark-mode .datetime-display .time,
.dark-mode .datetime-display .date {
    color: #f4f4f4;
}

.checklist-container {
    position: fixed;
    top: min(250px, 30vh); /* Increased spacing from datetime display */
    left: max(20px, 2vw);
    width: min(200px, 20vw); /* Match datetime display width */
    text-align: center;
    padding: 10px 20px;
    z-index: 1000;
    border: 4px solid #000;
    border-radius: 2px;
    box-shadow: 
        inset -4px -4px 0 0 #a0a0a0,
        inset 4px 4px 0 0 #ffffff,
        0 0 10px rgba(0, 0, 0, 0.3);
    background-color: white;
    height: calc(100vh - min(400px, 45vh) - 40px); /* Match timer container bottom edge with 40px bottom margin */
    overflow-y: auto; /* Enable scrolling for long lists */
}

.dark-mode .checklist-container {
    background-color: #444;
    box-shadow: 
        inset -4px -4px 0 0 #333,
        inset 4px 4px 0 0 #666,
        0 0 15px rgba(0, 0, 0, 0.4);
}

/* Task list styles */
#tasks-list {
    text-align: left;
    margin-top: 10px;
}

.checklist-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-family: 'CustomFont', 'Courier New', monospace;
}

.add-task-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    font-family: 'CustomFont', 'Courier New', monospace;
}

.task-input-wrapper {
    margin-bottom: 10px;
}

#task-input {
    width: 100%;
    padding: 5px;
    font-family: 'CustomFont', 'Courier New', monospace;
    border: 2px solid #000;
}

.task-item {
    display: flex;
    align-items: center;
    margin-bottom: 5px;
    font-family: 'CustomFont', 'Courier New', monospace;
}

.task-checkbox {
    margin-right: 8px;
}

.task-text {
    flex-grow: 1;
}

.task-delete {
    background: none;
    border: none;
    cursor: pointer;
    opacity: 0.5;
}

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

.dark-mode .checklist-container {
    background-color: #444;
    color: #f4f4f4;
    box-shadow: 
        inset -4px -4px 0 0 #333,
        inset 4px 4px 0 0 #666,
        0 0 15px rgba(0, 0, 0, 0.4);
}

.dark-mode #task-input {
    background-color: #555;
    color: #f4f4f4;
    border-color: #222;
}

/* Add to style.css */
.footer {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'CustomFont', 'Courier New', monospace;
    font-size: 12px;
    color: #666;
    text-align: center;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.footer .copyright {
    font-size: 10px;
    opacity: 0.7;
}

.dark-mode .footer {
    color: #888;
}

/* Add these styles to style.css */
/* Reset sliding containers base position */
.sliding-container, .pokemon-info-container {
    position: fixed;
    width: min(200px, 20vw);
    background-color: white;
    z-index: 1000;
    border: 4px solid #000;
    border-radius: 2px;
    padding: 10px 20px;
    box-shadow: 
        inset -4px -4px 0 0 #a0a0a0,
        inset 4px -4px 0 0 #ffffff,
        0 0 10px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease-in-out;
    transform: translateX(calc(100% - 30px)); /* Show 30px of container */
}

/* Update hover state to use transform */
.sliding-container:hover,
.pokemon-info-container:hover {
    transform: translateX(0);
}

/* Position containers */
.sliding-container {
    top: min(85px, 10vh);
    right: 0;
    min-height: min(240px, 30vh);
}

.pokemon-info-container {
    top: min(380px, 45vh);
    right: 0;
    min-height: calc(100vh - min(460px, 55vh));
}

/* Ensure label visibility */
.sliding-container::before,
.pokemon-info-container::before {
    z-index: 1001;
}

/* Dark mode adjustments */
.dark-mode .sliding-container,
.dark-mode .pokemon-info-container {
    background-color: #444;
    color: #f4f4f4;
    box-shadow: 
        inset -4px -4px 0 0 #333,
        inset 4px 4px 0 0 #666,
        0 0 15px rgba(0, 0, 0, 0.4);
}

.sliding-container::before {
    content: 'BADGES';
    position: absolute;
    left: -45px; /* Moved further out */
    top: 50%;
    transform: translateY(-50%) rotate(-90deg);
    font-family: 'CustomFont', 'Courier New', monospace;
    font-size: 14px; /* Reduced from 16px */
    white-space: nowrap;
    color: #000;
    background-color: white;
    padding: 6px 10px; /* Added padding */
    border: 3px solid #000; /* Reduced border thickness */
    border-radius: 2px;
    box-shadow: 
        inset -2px -2px 0 0 #a0a0a0,
        inset 2px 2px 0 0 #ffffff;
}

.dark-mode .sliding-container::before {
    background-color: #444;
    color: #f4f4f4;
    box-shadow: 
        inset -4px -4px 0 0 #333,
        inset 4px 4px 0 0 #666;
}

.sliding-container:hover {
    right: 20px;
}

.badges-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    padding: 15px;
    justify-items: center;
    align-items: center;
}

.badge-icon {
    width: min(35px, 3vw); /* Slightly reduced size */
    height: min(35px, 3vw);
    filter: grayscale(100%);
    opacity: 0.5;
    transition: all 0.3s ease;
    object-fit: contain; /* Preserve aspect ratio */
}

.badge-icon.earned {
    filter: grayscale(0%);
    opacity: 1;
}

/* Add to style.css */
.badge-wrapper {
    position: relative;
    display: inline-block;
}

.badge-tooltip {
    visibility: hidden;
    position: absolute;
    left: -120px;
    top: 50%;
    transform: translateY(-50%);
    background-color: white;
    border: 3px solid #000;
    border-radius: 2px;
    padding: 8px;
    width: 100px;
    text-align: center;
    font-family: 'CustomFont', 'Courier New', monospace;
    font-size: max(10px, 0.8vw);
    z-index: 1001;
    box-shadow: 
        inset -2px -2px 0 0 #a0a0a0,
        inset 2px 2px 0 0 #ffffff;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.badge-wrapper:hover .badge-tooltip {
    visibility: visible;
    opacity: 1;
}

.dark-mode .badge-tooltip {
    background-color: #444;
    color: #f4f4f4;
    box-shadow: 
        inset -2px -2px 0 0 #333,
        inset 2px 2px 0 0 #666;
}

/* Update sliding-container styles for dark mode */
.dark-mode .sliding-container {
    background-color: #444;
    color: #f4f4f4;
    box-shadow: 
        inset -4px -4px 0 0 #333,
        inset 4px 4px 0 0 #666,
        0 0 15px rgba(0, 0, 0, 0.4);
}

/* Update badges-grid for dark mode */
.dark-mode .badges-grid {
    background-color: #444;
}

/* Update badge-tooltip for dark mode */
.dark-mode .badge-tooltip {
    background-color: #444;
    color: #f4f4f4;
    box-shadow: 
        inset -2px -2px 0 0 #333,
        inset 2px 2px 0 0 #666;
    border-color: #000;
}

/* Update sliding-container::before for dark mode */
.dark-mode .sliding-container::before {
    background-color: #444;
    color: #f4f4f4;
    border-color: #000;
    box-shadow: 
        inset -2px -2px 0 0 #333,
        inset 2px 2px 0 0 #666;
}

/* Add to style.css */
.pokemon-info-container {
    top: min(380px, 45vh);
    min-height: calc(100vh - min(460px, 55vh));
}

.pokemon-info-container::before {
    content: 'POKEDEX';
    position: absolute;
    left: -45px;
    top: 50%;
    transform: translateY(-50%) rotate(-90deg);
    font-family: 'CustomFont', 'Courier New', monospace;
    font-size: 14px;
    white-space: nowrap;
    color: #000;
    background-color: white;
    padding: 6px 10px;
    border: 3px solid #000;
    border-radius: 2px;
    box-shadow: 
        inset -2px -2px 0 0 #a0a0a0,
        inset 2px 2px 0 0 #ffffff;
}

.pokemon-small-sprite {
    width: min(96px, 8vw);
    height: min(96px, 8vw);
    margin: 0 auto;
    display: block;
    image-rendering: pixelated;
}

.pokemon-region {
    text-align: center;
    margin: 5px 0;
    font-size: 12px;
    font-family: 'CustomFont', 'Courier New', monospace;
}

.pokemon-info-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
    padding: 10px 0;
}

.stat-row {
    width: 100%;
    display: flex;
    justify-content: space-between;
    font-size: max(10px, 0.8vw);
    padding: 2px 0;
}

.pokemon-info-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-family: 'CustomFont', 'Courier New', monospace;
    font-size: max(10px, 0.8vw);
}

.pokemon-name {
    font-size: 16px;
    font-weight: bold;
    text-align: center;
    margin-bottom: 10px;
}

.pokemon-type {
    text-align: center;
    margin-bottom: 15px;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    margin: 5px 0;
}

.pokemon-description {
    margin-top: 15px;
    font-size: 11px;
    line-height: 1.4;
}

.dark-mode .pokemon-info-container {
    background-color: #444;
    color: #f4f4f4;
    box-shadow: 
        inset -4px -4px 0 0 #333,
        inset 4px 4px 0 0 #666,
        0 0 15px rgba(0, 0, 0, 0.4);
}

.dark-mode .pokemon-info-container::before {
    background-color: #444;
    color: #f4f4f4;
    box-shadow: 
        inset -2px -2px 0 0 #333,
        inset 2px 2px 0 0 #666;
}

.pokemon-info-container:hover {
    right: 20px;
}

.dark-mode .sliding-container,
.dark-mode .pokemon-info-container {
    background-color: #444;
    color: #f4f4f4;
    box-shadow: 
        inset -4px -4px 0 0 #333,
        inset 4px 4px 0 0 #666,
        0 0 15px rgba(0, 0, 0, 0.4);
}

/* Add media queries for different screen sizes */
@media (max-width: 1366px) {
    .container {
        margin-left: max(220px, 18vw);
    }
    
    .sliding-container, .pokemon-info-container, .datetime-display, .checklist-container {
        width: min(180px, 18vw);
    }
    
    .sliding-container::before, .pokemon-info-container::before {
        left: -45px;
        font-size: 12px;
    }
}

@media (max-width: 1024px) {
    .container {
        margin-left: max(200px, 16vw);
        gap: 1vw;
    }
    
    .sliding-container, .pokemon-info-container, .datetime-display, .checklist-container {
        width: min(160px, 16vw);
    }
}

/* Add smaller screen support */
@media (max-height: 768px) {
    .sliding-container {
        min-height: min(200px, 25vh);
    }
    
    .pokemon-info-container {
        top: min(320px, 40vh);
    }
    
    .checklist-container {
        top: min(220px, 28vh);
    }
}

/* Media queries for responsive sliding */
@media (max-width: 1366px) {
    .sliding-container,
    .pokemon-info-container {
        right: min(-200px, -20vw);
    }
    
    .sliding-container:hover,
    .pokemon-info-container:hover {
        right: max(15px, 1.5vw);
    }
}

@media (max-width: 1024px) {
    .sliding-container,
    .pokemon-info-container {
        right: min(-180px, -18vw);
    }
    
    .sliding-container:hover,
    .pokemon-info-container:hover {
        right: max(10px, 1vw);
    }
}
.shiny-star {
    color: red;
    margin-left: 5px;
}

/* Add these styles to match the datetime-display container */
.social-links-container {
    position: fixed;
    bottom: 20px;
    left: max(20px, 2vw);
    font-family: 'CustomFont', 'Courier New', monospace;
    width: min(200px, 20vw);
    text-align: center;
    padding: 10px 20px;
    z-index: 1000;
    border: 4px solid #000;
    border-radius: 2px;
    box-shadow: 
        inset -4px -4px 0 0 #a0a0a0,
        inset 4px 4px 0 0 #ffffff,
        0 0 10px rgba(0, 0, 0, 0.3);
    background-color: white;
}

.social-header {
    font-size: 14px;
    margin-bottom: 10px;
}

.social-icons {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.social-icon {
    width: 24px;
    height: 24px;
    transition: transform 0.3s ease;
}

/* Add this new style for mail icon */
.social-icon[alt="Email"] {
    width: 28px;  /* Slightly larger than other icons */
    height: 28px;
}

.social-link:hover .social-icon {
    transform: scale(1.2);
}

/* Dark mode support */
.dark-mode .social-links-container {
    background-color: #444;
    color: #f4f4f4;
    box-shadow: 
        inset -4px -4px 0 0 #333,
        inset 4px 4px 0 0 #666,
        0 0 15px rgba(0, 0, 0, 0.4);
}

/* Media query adjustments */
@media (max-width: 1024px) {
    .social-links-container {
        width: min(160px, 16vw);
    }
}