
.widget {
 
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    
 
    padding: 20px;
    
  
    font-size: 2rem;
    font-weight: bold;
    
  
    transform: translateZ(100px);
}

.widget.clock {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem 3rem;
    text-align: center;

    grid-column: 5 / span 4; 
    grid-row: 3 / span 1; 

    justify-self: center;
    align-self: center;
}

.clock .time {
    font-size: 5rem;
    font-weight: 500;
    letter-spacing: 2px;
}

.clock .date {
    font-size: 1.2rem;
    font-weight: 300;
    margin-top: 5px;
    opacity: 0.8;
}


.widget.greeting {

    padding: 0; 
    background: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: none;

    font-size: 2.5rem;
    font-weight: 500;
    text-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
    

}

.greeting-input {
    font-size: 2.5rem;
    font-weight: 500;
    border: none;
    outline: none;
    background: none;
    color: white;
    border-bottom: 2px solid rgba(255, 255, 255, 0.7);
    width: 100%;
    text-align: center;
    text-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
}

.widget-ghost {
    background: rgba(255, 255, 255, 0.2) !important;
    border: 2px dashed rgba(255, 255, 255, 0.5) !important;
    border-radius: 12px;
}


.widget.clock {
    /* Clock specific layout */
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem 3rem;
    text-align: center;
    
    
}

.greeting {

    padding: 0;
    background: none;
    backdrop-filter: none;
    border: none;
    font-size: 2.5rem;
    font-weight: 500;
    text-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
    text-align: center;

    display: flex;
    align-items: center;    /* Vertically center */
    justify-content: center; /* Horizontally center */
    
    
    overflow: visible !important;
}

/* --- Styling Gridstack's Default Resize Handle --- */


.grid-stack-item-content:hover .widget-resize-handle {
    opacity: 1; /* Make it more visible on hover */
}



.todo {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 20px;
    overflow: hidden;
}

.todo-input {
    width: 100%;
    background: none;
    border: none;
    border-bottom: 2px solid rgba(255,255,255,0.4);
    color: white;
    font-size: 1.2rem;
    padding: 8px 4px;
    outline: none;
    transition: border-color 0.2s ease-in-out;
}

.todo-input:focus {
    border-color: rgba(255,255,255,0.9);
}

.todo-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 250px;
    overflow-y: auto;
    min-height: 100px;

}

.todo-item {
    display: flex;
    align-items: center;
    font-size: 1rem;
    cursor: pointer; 
    gap: 12px;
}


.todo-item span {
    flex-grow: 1; 
    transition: all 0.2s ease-in-out;
}

.todo-item.completed span {
    /* Style for completed tasks */
    text-decoration: line-through;
    opacity: 0.5;
}

.todo-item .delete-btn {
    /* The delete button */
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    opacity: 0; /* Hidden by default */
    transition: opacity 0.2s ease-in-out;
}

.todo-item:hover .delete-btn {
    opacity: 0.7; /* Show on hover */
}
.todo-item .delete-btn:hover {
    opacity: 1;
}

.todo-item input[type="checkbox"] {
   
    cursor: pointer;
}

.todo-list::-webkit-scrollbar {
    width: 10px; 
}


.todo-list::-webkit-scrollbar-track {

    background-color: rgba(0, 0, 0, 0.1);
    border-radius: 5px;
}

/* This targets the draggable "thumb" (the part that moves) */
.todo-list::-webkit-scrollbar-thumb {
    /* A clean, semi-transparent white */
    background-color: rgba(255, 255, 255, 0.5); 
    
    /* Rounded corners to make it look like a pill shape */
    border-radius: 5px;
}

.todo-list::-webkit-scrollbar-thumb:hover {
    background-color: rgba(255, 255, 255, 0.75); /* Brighter on hover */
}

.grid-stack-item:has(.todo) {
    overflow: hidden !important;
}

.grid-stack-item-content.todo {
    overflow-y: hidden !important;
}

.todo {
    /* This ensures the container itself is flexible */
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 20px;

    /* This prevents the widget's main box from showing a scrollbar */
    overflow: hidden;


    box-sizing: border-box; /* Ensures padding is included in the size */
    width: 100% !important;   /* Force it to fill its container's width */
    max-width: none !important; /* Remove any maximum width limit */
}



/* --- Weather Widget --- */
.weather {
    
    display: flex;
    align-items: center;    /* Vertically align everything */
    justify-content: center; /* Horizontally center */
    gap: 15px;              /* Space between icon and text */
    padding: 15px;          /* Padding around the edges */
    width: 100%;            /* Ensure it fills the grid cell */
    height: 100%;
}

.weather-icon img {
    /* Control the size of the icon image */
    width: 60px;
    height: 60px;
}

.weather-details {
    display: flex;
    flex-direction: column;
    text-align: left;
    line-height: 1.1; /* Reduce the space between the text lines */
}

.weather-temp {
    font-size: 2.5rem; /* Slightly smaller to fit better */
    font-weight: 500;
}

.weather-city {
    font-size: 1.1rem; /* A legible but not overpowering size */
    opacity: 0.8;
}



.checkbox-container {
    position: relative;
    display: inline-block;
    width: 20px;
    height: 20px;
}


.checkbox-container input[type="checkbox"] {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.custom-checkbox {
    position: absolute;
    top: 0;
    left: 0;
    height: 20px;
    width: 20px;
    background-color: rgba(0, 0, 0, 0.2); /* A subtle dark box */
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}


.checkbox-container input:checked ~ .custom-checkbox {
    background-color: rgba(255, 255, 255, 0.5); /* A brighter, "on" state */
    border-color: rgba(255, 255, 255, 0.7);
}


.custom-checkbox::after {
    content: "";
    position: absolute;
    display: none; 
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 3px 3px 0;
    transform: rotate(45deg);
}


.checkbox-container input:checked ~ .custom-checkbox::after {
    display: block;
}


.todo-item .delete-btn {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    opacity: 0; /* Hidden by default */
    transition: opacity 0.2s ease-in-out;
    padding: 0 5px; 
}


.todo-item:hover .delete-btn {
    opacity: 0.7; 
}

.todo-item .delete-btn:hover {
    opacity: 1; 
}

/* --- Widget Resize Handle --- */
.widget-resize-handle {
    position: absolute;
    bottom: 5px;
    right: 5px;
    width: 15px;
    height: 15px;
    cursor: se-resize; 
    z-index: 10;
    

    background-image:
        radial-gradient(circle at 2px 2px, rgba(255,255,255,0.6) 1.5px, transparent 1.5px),
        radial-gradient(circle at 7px 7px, rgba(255,255,255,0.6) 1.5px, transparent 1.5px),
        radial-gradient(circle at 12px 12px, rgba(255,255,255,0.6) 1.5px, transparent 1.5px);
    opacity: 0.5;
    transition: opacity 0.2s ease-in-out;
}

.grid-stack-item-content:hover .widget-resize-handle {
    opacity: 1;
}


/*--- AI Chat Widget ---*/

.ai-chat {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 10px;
}

.ai-chat-history {
    flex-grow: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 10px;
}

/* The custom scrollbar for the chat history */
.ai-chat-history::-webkit-scrollbar { width: 8px; background: transparent; }
.ai-chat-history::-webkit-scrollbar-track { background: rgba(0,0,0,0.1); border-radius: 4px; }
.ai-chat-history::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.4); border-radius: 4px; }
.ai-chat-history::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.6); }

.chat-message {
    padding: 10px 14px;
    border-radius: 12px;
    max-width: 85%;
    line-height: 1.5;
    word-wrap: break-word;
}

.chat-message.user {
    background-color: rgba(90,120,255,0.5);
    align-self: flex-end;
    border-bottom-right-radius: 3px;
}

.chat-message.ai {
    background-color: rgba(255, 255, 255, 0.15);
    align-self: flex-start;
    border-bottom-left-radius: 3px;
}

.chat-message.typing {
    color: rgba(255,255,255,0.7);
    font-style: italic;
}

.ai-chat-input-form {
    display: flex;
    gap: 10px;
    padding: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.ai-chat-input-form input {
    flex-grow: 1;
    background: rgba(0,0,0,0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 10px;
    border-radius: 8px;
    outline: none;
    font-size: 1rem;
}

.ai-chat-input-form input:focus {
    border-color: rgba(255, 255, 255, 0.7);
}

.ai-chat-input-form button {
    background: rgba(90,120,255,0.6);
    border: none;
    color: white;
    padding: 0 15px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ai-chat-input-form button:hover {
    background: rgba(90,120,255,0.8);
}

.ai-chat-input-form button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}


.weather-location-input {
    width: 90%; 
    background: rgba(0, 0, 0, 0.2); 
    border: 1px solid rgba(255, 255, 255, 0.2); 
    color: white;
    font-size: 1.2rem;
    padding: 10px; 
    text-align: center;
    outline: none;
    border-radius: 8px; 
    transition: all 0.2s ease-in-out;
}

.weather-location-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.weather-location-input:focus {
    border-color: rgba(90, 120, 255, 0.8); 
    background: rgba(0, 0, 0, 0.3);
}

/* --- Weather Widget Input Container --- */
.weather-input-container {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center; 
    align-items: center;    
}

/* --- Widget Library --- */
.widget-library-grid {
    display: grid;
    /* Create a grid with 2 columns */
    grid-template-columns: repeat(2, 1fr); 
    gap: 15px;
}

.widget-library-item {
    display: flex;
    flex-direction: column; /* Stack items vertically */
    align-items: center;   /* Center everything */
    background: rgba(0, 0, 0, 0.25);
    padding: 20px 15px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    gap: 15px; /* Space between preview, name, and button */
}

.widget-library-item span {
    font-size: 1rem;
    font-weight: 500;
}

/* --- The Add/Remove Button --- */
.widget-toggle-btn {
    width: 100%;
    padding: 8px 12px;
    border: none;
    background: rgba(90, 120, 255, 0.5); 
    color: white;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: background-color 0.2s ease;
}

.widget-toggle-btn:hover {
    background-color: rgba(90, 120, 255, 0.7);
}


.widget-toggle-btn.is-active {
    background-color: rgba(255, 255, 255, 0.2);
}
.widget-toggle-btn.is-active:hover {
    background-color: rgba(229, 80, 80, 0.7); /* A red color for removal on hover */
}

/* --- Widget Preview Styling --- */
.widget-preview {
    width: 100%;
    height: 100px; 
    background: rgba(255, 255, 255, 0.05); 
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
}

.widget-preview img {
    max-width: 100%;
    max-height: 100%;
    border-radius: 4px; 
}
/* --- Pomodoro Widget --- */
.pomodoro {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 20px;
    gap: 15px;
}

.pomodoro-timer-container {
    position: relative;
    width: 180px;
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;

}

.pomodoro-progress-ring {
    position: absolute;
    top: 0;
    left: 0;
    width: 180px;
    height: 180px;
    transform: rotate(-90deg); 
}

.pomodoro-progress-ring circle {
    transition: stroke-dashoffset 0.5s linear;
}



.pomodoro-time-display {
    position: absolute;
    font-size: 3.5rem;
    font-weight: 500;
    letter-spacing: 2px;
}

.pomodoro-mode-display {
    font-size: 1.1rem;
    font-weight: 500;
    opacity: 0.7;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.pomodoro-controls {
    display: flex;
    gap: 15px;
    margin-top: 10px;
}

.pomodoro-controls button {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: white;
    width: 60px;
    height: 40px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
}

.pomodoro-controls button:hover {
    background: rgba(255, 255, 255, 0.25);
}


.pomodoro-controls button.main-action {
    background: rgba(90, 120, 255, 0.6);
    width: 80px;
}

.pomodoro-controls button.main-action:hover {
    background: rgba(90, 120, 255, 0.8);
}

/* --- Notepad Widget --- */
.notepad .notepad-area {
    /* Make it fill the entire widget space */
    width: 100%;
    height: 100%;

    /* Reset default browser styling */
    border: none;
    outline: none;
    background: transparent;
    resize: none; /* Disable the browser's default resize handle */
    
    /* Text and font styling */
    color: white;
    font-family: inherit; /* Use the dashboard's main font */
    font-size: 1rem;
    line-height: 1.6;
    padding: 5px; /* A little internal breathing room */
}

/* --- Custom Scrollbar for Notepad WIDGET --- */


.notepad {
    overflow: auto;
}


.notepad::-webkit-scrollbar {
    width: 10px;
}
.notepad::-webkit-scrollbar-track {
    background-color: rgba(0, 0, 0, 0.1);
    border-radius: 5px;
}
.notepad::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.5);
    border-radius: 5px;
}
.notepad::-webkit-scrollbar-thumb:hover {
    background-color: rgba(255, 255, 255, 0.75);
}
/* --- News Ticker Widget --- */
.news-ticker {
    padding: 0 !important; 
    overflow: hidden;      
}

.ticker-wrap {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
}

.ticker-content {
    display: inline-block;
    white-space: nowrap; 
    padding-left: 100%; 
    animation: ticker-scroll 60s linear infinite; 
}

/* Pause the animation on hover */
.ticker-wrap:hover .ticker-content {
    animation-play-state: paused;
}

.ticker-content a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 400;
}
.ticker-content a:hover {
    color: white;
    text-decoration: underline;
}

.ticker-separator {
    margin: 0 1.5em; /* Space between headlines */
    color: rgba(255, 255, 255, 0.5);
}

@keyframes ticker-scroll {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}

/* --- Adaptive Weather Widget --- */

/* Base container: Prevents scrollbars on the widget itself */
.weather {
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 15px;
}

/* Tier 1: Compact View */
.weather-compact {
    display: flex;
    align-items: center;
    gap: 15px;
}
.weather-compact img { width: 60px; height: 60px; }
.weather-compact .weather-details { display: flex; flex-direction: column; text-align: left; line-height: 1.1; }

/* Tier 2: Detailed View */
.weather-detailed {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    justify-content: space-around;
}
.weather-detailed-top {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}
.weather-detailed-top img { width: 50px; height: 50px; }
.weather-hourly-forecast {
    display: flex;
    justify-content: space-around;
    width: 100%;
}
.hourly-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    font-size: 0.9rem;
}
.hourly-item img { width: 40px; height: 40px; }

/* Tier 3: Full Forecast View */
.weather-full-forecast {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    justify-content: space-between;
}
.forecast-header {
    text-align: center;
    font-size: 1.2rem;
    font-weight: 500;
    opacity: 0.9;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 5px;
}
.daily-forecast-list {
    display: flex;
    flex-grow: 1;
    justify-content: space-around;
    align-items: center;
}
.daily-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}
.daily-item .daily-day { font-size: 1rem; font-weight: 500; }
.daily-item img { width: 50px; height: 50px; }
.daily-temps {
    display: flex;
    gap: 10px;
    font-size: 0.9rem;
}
.daily-temps .temp-low { opacity: 0.6; }

.widget-drag-handle {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 30px; 
    cursor: move;
    z-index: 10; 
    transition: background-color 0.2s ease;
}


.widget-drag-handle:hover {
    background-color: rgba(255, 255, 255, 0.1);
}


.ui-resizable-handle {
    position: absolute;
    right: 5px;
    bottom: 5px;
    width: 15px;
    height: 15px;
    z-index: 99;
    pointer-events: auto;
    cursor: se-resize;
    background-image:
        radial-gradient(circle at 2px 2px, rgba(255,255,255,0.7) 1.5px, transparent 1.5px),
        radial-gradient(circle at 7px 7px, rgba(255,255,255,0.7) 1.5px, transparent 1.5px),
        radial-gradient(circle at 12px 12px, rgba(255,255,255,0.7) 1.5px, transparent 1.5px);
}

.grid-stack-item-content:hover .ui-resizable-handle {
    opacity: 1;
}


.grid-stack-item-content {
    pointer-events: none;
}


.widget-drag-handle,
.widget button,
.widget input,
.widget textarea,
.widget a,
.widget select,
.todo-item span,
.checkbox-container {
    pointer-events: auto;
}


.ui-resizable-handle {
    pointer-events: auto !important; 
    background-color: transparent;

    background-image:
        radial-gradient(circle at 2px 2px, rgba(255,255,255,0.7) 1.5px, transparent 1.5px),
        radial-gradient(circle at 7px 7px, rgba(255,255,255,0.7) 1.5px, transparent 1.5px),
        radial-gradient(circle at 12px 12px, rgba(255,255,255,0.7) 1.5px, transparent 1.5px);
    opacity: 0.8;
}

.grid-stack-item .ui-resizable-handle.ui-resizable-se {
    width: 16px;
    height: 16px;
    bottom: 6px;
    right: 6px;
    cursor: se-resize;
    z-index: 999;
    background-image:
      radial-gradient(circle at 2px 2px, rgba(255,255,255,0.7) 1.5px, transparent 1.5px),
      radial-gradient(circle at 7px 7px, rgba(255,255,255,0.7) 1.5px, transparent 1.5px),
      radial-gradient(circle at 12px 12px, rgba(255,255,255,0.7) 1.5px, transparent 1.5px) !important;
    background-color: rgba(0,0,0,0.25);
    border-radius: 3px;
    opacity: 0.8;
    transition: opacity 0.2s ease-in-out;
}
  
  .grid-stack-item .ui-resizable-handle.ui-resizable-se:hover {
    opacity: 1;
  }
/* --- Countdown Widget --- */
.countdown {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    overflow: hidden;
}

/* Setup Form */
.countdown-setup-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 80%;
}
.countdown-setup-form input, .countdown-setup-form button {
    width: 100%;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.2);
    background: rgba(0,0,0,0.3);
    color: white;
    font-size: 1rem;
}
.countdown-setup-form button {
    background: rgba(90, 120, 255, 0.6);
    cursor: pointer;
}

/* Display State */

.countdown-display { 
    position: relative; 
    text-align: center; 
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
}
.countdown-title { font-size: 1.2rem; font-weight: 500; margin-bottom: 15px; }

.countdown-timer { 
    display: flex; 
    justify-content: space-around; 
    width: 100%; 
}
.time-segment { display: flex; flex-direction: column; }
.time-segment span { font-size: 2.5rem; font-weight: 500; }
.time-segment label { font-size: 0.8rem; opacity: 0.7; }
.countdown-finished { font-size: 1.5rem; font-weight: 500; padding: 20px; }

.countdown-edit-btn {
    position: absolute;
    top: 10px; right: 10px;
    background: none; border: none; color: white;
    cursor: pointer; opacity: 0.5; font-size: 0.9rem;
}
.countdown-edit-btn:hover { opacity: 1; }


/* --- Stock Ticker Widget --- */
/* --- Stock Ticker Widget --- */
.stock-ticker {
    display: flex; 
    flex-direction: column; 
    padding: 0;
    overflow: hidden; 
    position: relative;
}

.stock-setup-form {
    display: flex; flex-direction: column; justify-content: center;
    height: 100%; padding: 25px; text-align: center; gap: 10px;
}
.stock-setup-form input, .stock-setup-form button {
    padding: 10px; border-radius: 8px; border: 1px solid rgba(255,255,255,0.2);
    background: rgba(0,0,0,0.3); color: white; font-size: 1rem;
}
.stock-setup-form p { font-size: 0.8rem; opacity: 0.6; }
.stock-setup-form button { background: rgba(90, 120, 255, 0.6); cursor: pointer; }

.loading-stocks { padding: 20px; text-align: center; }

.stock-list {
    list-style: none;
    margin: 0;
    padding: 0;
    overflow: hidden; 
}
.stock-item {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    padding: 15px 20px;
    gap: 2px 15px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.stock-symbol { font-size: 1.5rem; font-weight: 500; }
.stock-price { font-size: 1.5rem; font-weight: 500; text-align: right; }
.stock-change { grid-column: 2 / 3; grid-row: 2 / 3; text-align: right; }

.stock-item.is-up .stock-change { color: #4ade80; /* Green */ }
.stock-item.is-down .stock-change { color: #f87171; /* Red */ }

/* --- GitHub Stats Widget --- */
.github-stats { padding: 20px;
    overflow: hidden;
 }

/* Login View */
.github-login-view { text-align: center; display: flex; flex-direction: column; justify-content: center; height: 100%; gap: 15px; }
.github-login-view h4 { font-size: 1.2rem; margin: 0; }
.github-login-view p { font-size: 0.9rem; opacity: 0.7; margin: 0; }
.github-connect-btn {
    background: #24292e; color: white; padding: 10px 15px;
    border-radius: 8px; text-decoration: none; font-weight: 500;
}

/* Stats View */
.github-stats-view { display: flex; flex-direction: column; height: 100%; }
.github-header { display: flex; align-items: center; gap: 15px; position: relative; }
.github-header img { width: 50px; height: 50px; border-radius: 50%; }
.github-header div { display: flex; flex-direction: column; }
.github-name { font-size: 1.1rem; font-weight: 500; }
.github-login { font-size: 0.9rem; opacity: 0.6; }
.github-logout-btn { position: absolute; top: -10px; right: -10px; background: none; border: none; color: white; cursor: pointer; font-size: 1.2rem; opacity: 0.5; }
.github-body { flex-grow: 1; display: flex; justify-content: space-around; align-items: center; }
.stat-item { text-align: center; }
.stat-value { font-size: 2rem; font-weight: 600; }
.stat-label { font-size: 0.8rem; opacity: 0.7; }

/* --- Quote of the Day Widget --- */
.quote-widget {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 25px;
    overflow: hidden;
}

.quote-loading {
    font-style: italic;
    opacity: 0.7;
    text-align: center;
}

.quote-text {
    font-size: 1.4rem;
    font-weight: 500;
    line-height: 1.5;
    font-style: italic;
    margin: 0;
}

.quote-author {
    font-size: 1rem;
    text-align: right;
    opacity: 0.8;
    margin-top: 15px;
}

/* --- Quick Links Widget --- */
.quick-links { overflow: auto; padding: 15px; position: relative; }
.quick-links-container { height: 100%; }

/* Display View */
.links-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); gap: 15px; }
.link-item {
    display: flex; flex-direction: column; align-items: center; text-align: center;
    text-decoration: none; color: white; gap: 8px; padding: 10px;
    border-radius: 8px; transition: background-color 0.2s ease;
}
.link-item:hover { background-color: rgba(255, 255, 255, 0.1); }
.link-item img { width: 48px; height: 48px; border-radius: 8px; }
.link-item span { font-size: 0.8rem; overflow-wrap: break-word; }

.quick-links-add-btn {
    display: flex; align-items: center; justify-content: center; font-size: 2rem;
    background: rgba(255, 255, 255, 0.05); color: white; border: 1px dashed rgba(255,255,255,0.3);
    border-radius: 8px; cursor: pointer; min-height: 80px;
}

/* Edit Buttons */
.quick-links-edit-btn, .quick-links-done-btn {
    position: absolute; top: 10px; right: 10px; font-size: 0.9rem;
    background: none; border: none; color: white; cursor: pointer; opacity: 0.6;
}
.quick-links-done-btn { background: rgba(90, 120, 255, 0.6); padding: 5px 10px; border-radius: 5px; opacity: 1; }

/* Edit View */
.links-grid-edit { display: grid; grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); gap: 15px; margin-top: 10px; }
.link-item-edit { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; }
.delete-link-btn {
    position: absolute; top: -8px; right: -8px; width: 24px; height: 24px;
    background: #f87171; color: white; border: none; border-radius: 50%;
    font-size: 1rem; cursor: pointer;
}

/* Add Form */
.add-link-form { display: flex; flex-direction: column; gap: 15px; padding: 10px; }
.add-link-form input { background: rgba(0,0,0,0.3); border: 1px solid rgba(255,255,255,0.2); color: white; padding: 10px; border-radius: 8px; }
.add-link-form div { display: flex; gap: 10px; }
.add-link-form button { flex-grow: 1; background: rgba(90, 120, 255, 0.6); border: none; color: white; padding: 10px; border-radius: 8px; cursor: pointer; }
.add-link-form .cancel-add-btn { background: rgba(255,255,255,0.2); }


/* --- System Stats Widget --- */
.system-stats {
    display:flex;
    padding: 15px;
    overflow: hidden;
}

.stats-grid {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    height: 100%;
    gap: 10px;
}

.stat-container {
    display: flex;
    align-items: center;
    gap: 15px;
}
.stat-container.hidden { display: none; }

.stat-container i {
    font-size: 2.5rem;
    color: rgba(255, 255, 255, 0.7);
}

.stat-container div {
    display: flex;
    flex-direction: column;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.7;
}

.stat-value {
    font-size: 1.2rem;
    font-weight: 500;
}

/* --- Custom Scrollbar for System Stats Widget --- */


.system-stats {
    overflow: auto; 
}


.system-stats::-webkit-scrollbar {
    width: 10px; 
}
.system-stats::-webkit-scrollbar-track {
    background-color: rgba(0, 0, 0, 0.1);
    border-radius: 5px;
}


.system-stats::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.5); 
    border-radius: 5px;
}
.system-stats::-webkit-scrollbar-thumb:hover {
    background-color: rgba(255, 255, 255, 0.75); 
}

/* --- Unit Converter Widget --- */
.unit-converter {
    display: flex;
    flex-direction: column;
    padding: 15px;
    gap: 15px;
    overflow: hidden; 
}
.converter-header select {
    width: 100%;
    padding: 8px;
    background: rgba(0,0,0,0.3);
    color: white;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 8px;
}
.converter-body {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.converter-body i { font-size: 1.5rem; }


.converter-side {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-grow: 1;
}
.converter-side input, .converter-side select {
    width: 100%;
    padding: 8px;
    background: rgba(0,0,0,0.2);
    color: white;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 8px;
}
#to-value {
    background: rgba(0,0,0,0.4);
    text-align: center;
    font-weight: 500;
    font-size: 1.2rem;
    padding: 8px; /* Match the height of the inputs */
    border-radius: 8px;
}

/* --- Calculator Widget --- */
.calculator {

    flex-direction: column;
    padding: 10px;
    background: rgba(255,255,255,0.1);
    overflow: auto;
}

.calculator-display {
    color: white;
    font-size: 2.5rem;
    text-align: right;
    padding: 20px 15px;
    word-wrap: break-word;
    word-break: break-all;
    flex-grow: 1;
}

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

.calculator-grid button{
    padding: 20px;
    font-size: 1.2rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    background: rgba(255,255,255,0.1);
    color: white;
    transition: background-color 0.2s ease;
}

.calculator-grid button:hover {
    background: rgba(255,255,255,0.2);
}

.calculator-grid button[data-action="operation"]{
    background: rgba(255,165,0,0.5);
}
.calculator-grid button[data-action="operation"]:hover {
    background: rgba(255, 165, 0, 0.7);
}



.calculator-grid .span-two {
    grid-column: span 2;
}


.calculator {
    overflow: auto;
}


.calculator::-webkit-scrollbar {
    width: 10px; 
}
.calculator::-webkit-scrollbar-track {
    background-color: rgba(0, 0, 0, 0.1);
    border-radius: 5px;
}
.calculator::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.4); 
    border-radius: 5px;
}
.calculator::-webkit-scrollbar-thumb:hover {
    background-color: rgba(255, 255, 255, 0.6);
}


.settings-content::-webkit-scrollbar {
    width: 10px; 
}
.settings-content::-webkit-scrollbar-track {
    background-color: rgba(0, 0, 0, 0.1);
    border-radius: 5px;
}


.settings-content::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.5); 
    border-radius: 5px;
}
.settings-content::-webkit-scrollbar-thumb:hover {
    background-color: rgba(255, 255, 255, 0.75);
}





.ui-resizable-handle .ui-icon {
    display: none !important;
  }
  

  .ui-resizable-handle.ui-resizable-se {
    background: none !important;
    border: none !important;
  }

  