/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #4a90e2 100%);
    min-height: 100vh;
    color: #333;
    overflow-x: hidden;
    background-attachment: fixed;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Header Styles */
.header {
    text-align: center;
    margin-bottom: 0.5rem;
}

.time-display {
    margin-bottom: 1rem;
}

.time {
    font-size: 3.5rem;
    font-weight: 300;
    color: white;
    margin-bottom: 0.3rem;
    letter-spacing: -2px;
    text-shadow: 
        0 2px 10px rgba(0,0,0,0.3),
        0 1px 2px rgba(0,0,0,0.2);
}

.date {
    font-size: 1.1rem;
    color: rgba(255,255,255,0.95);
    font-weight: 400;
    text-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

/* Search Section */
.search-section {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.search-container {
    width: 100%;
    max-width: 700px;
}

.search-box {
    position: relative;
    background: rgba(255, 255, 255, 0.98);
    border-radius: 50px;
    box-shadow: 
        0 15px 35px rgba(0, 0, 0, 0.25),
        0 5px 15px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    padding: 1.1rem 1.6rem;
    display: flex;
    align-items: center;
    gap: 0.9rem;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    border: 1px solid rgba(255, 255, 255, 0.6);
}

.search-box:hover {
    box-shadow: 
        0 20px 45px rgba(0, 0, 0, 0.3),
        0 8px 20px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    transform: translateY(-3px);
    background: white;
}

.search-icon {
    color: #667eea;
    font-size: 1.3rem;
}

#search-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 1.1rem;
    color: #333;
    font-weight: 400;
    background: transparent;
}

#search-input::placeholder {
    color: #a0aec0;
}

.search-engines {
    display: flex;
    gap: 0.5rem;
    margin-left: auto;
}

.engine-btn {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: #f8f9fa;
    color: #6c757d;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-size: 1.1rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.engine-btn:hover {
    background: #e9ecef;
    transform: scale(1.1);
}

.engine-btn.active {
    background: #667eea;
    color: white;
}

/* Bookmarks Section */
.bookmarks-section {
    flex: 1;
}

.bookmarks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

/* Enhanced Bookmark Categories with Better Visual Hierarchy */
.bookmark-category {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    padding: 1.4rem;
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.08),
        0 1px 4px rgba(0, 0, 0, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
    overflow: hidden;
}

.bookmark-category:hover {
    transform: translateY(-4px);
    box-shadow: 
        0 12px 30px rgba(0, 0, 0, 0.15),
        0 4px 12px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.bookmark-category h3 {
    font-size: 1.15rem;
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 1rem;
    text-align: center;
    letter-spacing: 0.3px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding-bottom: 0.8rem;
    border-bottom: 2px solid rgba(102, 126, 234, 0.1);
}

.bookmark-category h3 i {
    font-size: 1.2rem;
    color: #667eea;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.bookmark-links {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

/* Enhanced Interactive Elements with Better Feedback */
.bookmark-link {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.9rem 1.1rem;
    border-radius: 12px;
    text-decoration: none;
    color: #4a5568;
    transition: all 0.25s cubic-bezier(0.25, 0.8, 0.25, 1);
    background: linear-gradient(145deg, rgba(247, 250, 252, 0.8) 0%, rgba(241, 245, 249, 0.6) 100%);
    border: 1px solid rgba(237, 242, 247, 0.8);
    font-size: 0.95rem;
    position: relative;
    overflow: hidden;
}

.bookmark-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.25s ease;
    z-index: 0;
}

.bookmark-link:hover {
    background: linear-gradient(145deg, white 0%, rgba(250, 251, 252, 0.9) 100%);
    transform: translateX(6px) translateY(-2px);
    color: #667eea;
    box-shadow: 
        0 6px 16px rgba(102, 126, 234, 0.15),
        0 2px 8px rgba(0, 0, 0, 0.08);
    border-color: rgba(102, 126, 234, 0.3);
}

.bookmark-link:hover::before {
    opacity: 1;
}

.bookmark-link i {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
    position: relative;
    z-index: 1;
    transition: transform 0.2s ease;
}

.bookmark-link:hover i {
    transform: scale(1.1);
}

.bookmark-link span {
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
    z-index: 1;
}

/* News Section */
.news-section {
    margin-top: 1rem;
}

/* Enhanced News Widget with Modern Design */
.news-widget {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    padding: 1.4rem;
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.08),
        0 1px 4px rgba(0, 0, 0, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    overflow: hidden;
}

.news-widget:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 8px 20px rgba(0, 0, 0, 0.12),
        0 3px 8px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.news-widget h3 {
    color: #1a202c;
    margin-bottom: 1rem;
    font-size: 1.15rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    letter-spacing: 0.3px;
    padding-bottom: 0.8rem;
    border-bottom: 2px solid rgba(102, 126, 234, 0.1);
}

.news-widget h3 i {
    font-size: 1.2rem;
    color: #667eea;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.news-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 0.8rem;
}

.news-item {
    padding: 1rem;
    border-radius: 12px;
    background: linear-gradient(145deg, rgba(247, 250, 252, 0.8) 0%, rgba(241, 245, 249, 0.6) 100%);
    transition: all 0.25s cubic-bezier(0.25, 0.8, 0.25, 1);
    cursor: pointer;
    border: 1px solid rgba(237, 242, 247, 0.8);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.news-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.25s ease;
    z-index: 0;
}

.news-item:hover {
    background: linear-gradient(145deg, white 0%, rgba(250, 251, 252, 0.9) 100%);
    transform: translateY(-3px);
    box-shadow: 
        0 8px 20px rgba(102, 126, 234, 0.12),
        0 3px 10px rgba(0, 0, 0, 0.08);
    border-color: rgba(102, 126, 234, 0.2);
}

.news-item:hover::before {
    opacity: 1;
}

.news-item:hover .news-image {
    transform: scale(1.03);
}

.news-image {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 0.8rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.9rem;
    text-align: center;
    padding: 0.6rem;
    transition: transform 0.25s ease;
    position: relative;
    z-index: 1;
}

.news-image-placeholder {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 0.6rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.9rem;
    text-align: center;
    padding: 0.5rem;
}

.news-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.news-source {
    font-size: 0.8rem;
    color: #667eea;
    font-weight: 600;
    margin-bottom: 0.2rem;
}

.news-title {
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 0.4rem;
    font-size: 0.95rem;
    line-height: 1.4;
    flex: 1;
}

.news-time {
    font-size: 0.75rem;
    color: #a0aec0;
}

.news-loading {
    text-align: center;
    color: #718096;
    font-style: italic;
    padding: 1rem;
}

/* Main Grid Layout */
.main-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1rem;
}

/* Mobile Grid Adjustments */
@media (max-width: 1024px) {
    .main-grid {
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }
    
    .bookmarks-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.8rem;
    }
    
    .news-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.6rem;
    }
}

/* Enhanced Widget Styles with Better Visual Hierarchy */
.widget {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.08),
        0 1px 4px rgba(0, 0, 0, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.widget:hover {
    transform: translateY(-4px);
    box-shadow: 
        0 12px 30px rgba(0, 0, 0, 0.15),
        0 4px 12px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.widget-header {
    padding: 1.2rem 1.4rem 0.8rem;
    border-bottom: 1px solid rgba(237, 242, 247, 0.9);
    background: linear-gradient(to bottom, rgba(248, 250, 252, 0.7) 0%, rgba(241, 245, 249, 0.4) 100%);
}

.widget-header h3 {
    font-size: 1.15rem;
    font-weight: 600;
    color: #1a202c;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    letter-spacing: 0.3px;
}

.widget-header h3 i {
    font-size: 1.2rem;
    color: #667eea;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.widget-content {
    padding: 1.2rem 1.4rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Weather Widget */
.weather-info {
    text-align: center;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.weather-main {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    margin-bottom: 0.8rem;
}

.weather-temp {
    font-size: 2rem;
    font-weight: 300;
    color: #2d3748;
}

.weather-desc {
    font-size: 1rem;
    color: #4a5568;
    text-transform: capitalize;
}

.weather-details {
    display: flex;
    justify-content: space-around;
    margin-top: 0.8rem;
    padding-top: 0.8rem;
    border-top: 1px solid rgba(237, 242, 247, 0.8);
}

.weather-detail-item {
    text-align: center;
}

.weather-detail-label {
    font-size: 0.8rem;
    color: #a0aec0;
    margin-bottom: 0.2rem;
}

.weather-detail-value {
    font-size: 0.9rem;
    font-weight: 500;
    color: #2d3748;
}

.weather-location {
    font-size: 1rem;
    font-weight: 500;
    color: #2d3748;
    margin-bottom: 0.4rem;
}

.weather-loading, .weather-error {
    text-align: center;
    color: #718096;
    font-style: italic;
    padding: 0.8rem;
}

/* Todo Widget */
.todo-container {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    flex: 1;
}

.todo-input-container {
    display: flex;
    gap: 0.4rem;
}

#todo-input {
    flex: 1;
    padding: 0.6rem 0.8rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s ease;
}

#todo-input:focus {
    border-color: #667eea;
}

#add-todo-btn {
    padding: 0.6rem 0.8rem;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

#add-todo-btn:hover {
    background: #5a6fd8;
}

.todo-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    overflow-y: auto;
    max-height: 150px;
}

.todo-item {
    display: flex;
    align-items: center;
    padding: 0.6rem;
    background: rgba(247, 250, 252, 0.8);
    border-radius: 8px;
    border: 1px solid rgba(237, 242, 247, 0.8);
    transition: all 0.2s ease;
}

.todo-item:hover {
    background: white;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
}

.todo-item.completed .todo-text {
    text-decoration: line-through;
    color: #a0aec0;
}

.todo-checkbox {
    margin-right: 0.6rem;
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.todo-text {
    flex: 1;
    font-size: 0.9rem;
    color: #4a5568;
    word-break: break-word;
}

.todo-delete {
    background: none;
    border: none;
    color: #e53e3e;
    cursor: pointer;
    font-size: 0.9rem;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
    margin-left: 0.4rem;
}

.todo-delete:hover {
    background: rgba(229, 62, 62, 0.1);
}

/* Notes Widget */
.notes-container {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    flex: 1;
}

#notes-textarea {
    width: 100%;
    flex: 1;
    min-height: 120px;
    padding: 0.8rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    resize: none;
    outline: none;
    transition: border-color 0.2s ease;
}

#notes-textarea:focus {
    border-color: #667eea;
}

#save-notes-btn {
    align-self: flex-end;
    padding: 0.6rem 1.2rem;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    transition: background 0.2s ease;
}

#save-notes-btn:hover {
    background: #5a6fd8;
}

/* Quick Bookmarks Widget */
.quick-bookmarks {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.8rem;
    flex: 1;
}

.quick-bookmark-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.8rem;
    border-radius: 8px;
    text-decoration: none;
    color: #4a5568;
    background: rgba(247, 250, 252, 0.8);
    border: 1px solid rgba(237, 242, 247, 0.8);
    transition: all 0.2s ease;
    font-size: 0.85rem;
}

.quick-bookmark-link:hover {
    background: white;
    transform: translateY(-2px);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
    color: #667eea;
}

.quick-bookmark-link i {
    font-size: 1.2rem;
}

.quick-bookmark-link span {
    font-size: 0.85rem;
    font-weight: 500;
    text-align: center;
}

/* Privacy and Terms Pages */
.legal-section {
    margin-top: 1rem;
}

.legal-widget {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 1.5rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.legal-widget h1 {
    color: #2d3748;
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid rgba(237, 242, 247, 0.8);
}

.legal-content {
    line-height: 1.7;
}

.policy-section {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(237, 242, 247, 0.5);
}

.policy-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.policy-section h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 1rem;
}

.policy-section h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #2d3748;
    margin: 1.5rem 0 1rem 0;
}

.policy-section h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2d3748;
    margin: 1.2rem 0 0.8rem 0;
}

.policy-section p {
    margin-bottom: 1rem;
    color: #4a5568;
    font-size: 1rem;
}

.policy-section ul, 
.policy-section ol {
    margin: 1rem 0 1rem 2rem;
    padding: 0;
}

.policy-section li {
    margin-bottom: 0.8rem;
    color: #4a5568;
    line-height: 1.6;
}

.policy-section ul li {
    list-style-type: disc;
}

.policy-section ol li {
    list-style-type: decimal;
}

.policy-section strong {
    font-weight: 600;
    color: #2d3748;
}

.policy-section .last-updated {
    font-style: italic;
    color: #718096;
    margin-bottom: 1.5rem;
}

.policy-section .important {
    background: rgba(255, 245, 225, 0.8);
    border-left: 4px solid #f6ad55;
    padding: 1rem;
    border-radius: 0 8px 8px 0;
    margin: 1.5rem 0;
}

.policy-section .toc {
    background: rgba(247, 250, 252, 0.8);
    border-radius: 10px;
    padding: 1.5rem;
    margin: 1rem 0;
    border: 1px solid rgba(237, 242, 247, 0.8);
}

.policy-section .toc p {
    margin-bottom: 0.5rem;
}

.policy-section .toc a {
    color: #667eea;
    text-decoration: none;
    transition: all 0.2s ease;
}

.policy-section .toc a:hover {
    color: #5a6fd8;
    text-decoration: underline;
}

.highlight {
    background: rgba(102, 126, 234, 0.1);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-weight: 500;
    color: #667eea;
}

.subsection {
    margin: 1.5rem 0;
}

/* Footer Links */
.footer-links {
    text-align: center;
    padding: 20px;
    color: rgba(255,255,255,0.7);
    font-size: 0.9rem;
    margin-top: auto;
}

.footer-links a {
    color: rgba(255,255,255,0.9);
    text-decoration: none;
    margin: 0 10px;
    transition: all 0.2s ease;
    padding: 5px 10px;
    border-radius: 5px;
}

.footer-links a:hover {
    background: rgba(255,255,255,0.1);
    color: white;
    text-decoration: underline;
}

/* Responsive Design - Mobile First Approach */
@media (max-width: 768px) {
    .container {
        padding: 0.8rem;
        gap: 0.8rem;
    }
    
    .header {
        margin-bottom: 0.3rem;
    }
    
    .time {
        font-size: 2.5rem;
        letter-spacing: -1px;
    }
    
    .date {
        font-size: 0.9rem;
    }
    
    .search-section {
        margin-bottom: 1rem;
    }
    
    .search-box {
        padding: 0.8rem 1rem;
        gap: 0.6rem;
    }
    
    #search-input {
        font-size: 1rem;
    }
    
    .search-engines {
        gap: 0.3rem;
    }
    
    .engine-btn {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
    
    /* Main Grid for Mobile */
    .main-grid {
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }
    
    .widget {
        margin-bottom: 0.5rem;
    }
    
    .widget-header {
        padding: 0.8rem 1rem 0.5rem;
    }
    
    .widget-header h3 {
        font-size: 1rem;
    }
    
    .widget-content {
        padding: 0.8rem 1rem;
    }
    
    /* Bookmark Grid Mobile */
    .bookmarks-grid {
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }
    
    .bookmark-category {
        padding: 1rem;
    }
    
    .bookmark-category h3 {
        font-size: 1rem;
        margin-bottom: 0.6rem;
    }
    
    .bookmark-link {
        padding: 0.7rem 0.8rem;
        font-size: 0.9rem;
        gap: 0.6rem;
    }
    
    /* News Section Mobile */
    .news-section {
        margin-top: 0.8rem;
    }
    
    .news-widget {
        padding: 1rem;
    }
    
    .news-widget h3 {
        font-size: 1rem;
        margin-bottom: 0.6rem;
    }
    
    .news-container {
        grid-template-columns: 1fr;
        gap: 0.6rem;
    }
    
    .news-item {
        padding: 0.7rem;
    }
    
    .news-title {
        font-size: 0.9rem;
    }
    
    /* Widget Specific Mobile Adjustments */
    .todo-list {
        max-height: 120px;
    }
    
    #todo-input {
        padding: 0.5rem 0.7rem;
        font-size: 0.85rem;
    }
    
    #add-todo-btn {
        padding: 0.5rem 0.7rem;
        font-size: 0.85rem;
    }
    
    #notes-textarea {
        min-height: 100px;
        padding: 0.7rem;
        font-size: 0.85rem;
    }
    
    #save-notes-btn {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }
    
    .quick-bookmarks {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.6rem;
    }
    
    .quick-bookmark-link {
        padding: 0.7rem;
        font-size: 0.8rem;
    }
    
    .quick-bookmark-link i {
        font-size: 1rem;
    }
    
    .footer-links {
        padding: 15px;
        font-size: 0.8rem;
    }
    
    .footer-links a {
        margin: 0 8px;
        padding: 4px 8px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0.6rem;
        gap: 0.6rem;
    }
    
    .time {
        font-size: 2rem;
    }
    
    .date {
        font-size: 0.8rem;
    }
    
    .search-box {
        padding: 0.7rem 0.9rem;
        gap: 0.5rem;
    }
    
    #search-input {
        font-size: 0.9rem;
    }
    
    .engine-btn {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
    }
    
    .widget-header {
        padding: 0.7rem 0.9rem 0.4rem;
    }
    
    .widget-header h3 {
        font-size: 0.95rem;
    }
    
    .widget-content {
        padding: 0.7rem 0.9rem;
    }
    
    .bookmark-category {
        padding: 0.8rem;
    }
    
    .bookmark-category h3 {
        font-size: 0.95rem;
    }
    
    .bookmark-link {
        padding: 0.6rem 0.7rem;
        font-size: 0.85rem;
    }
    
    .news-widget {
        padding: 0.8rem;
    }
    
    .news-widget h3 {
        font-size: 0.95rem;
    }
    
    .news-item {
        padding: 0.6rem;
    }
    
    .news-title {
        font-size: 0.85rem;
    }
    
    .todo-list {
        max-height: 100px;
    }
    
    .quick-bookmarks {
        gap: 0.5rem;
    }
    
    .quick-bookmark-link {
        padding: 0.6rem;
        font-size: 0.75rem;
    }
    
    .footer-links {
        padding: 12px;
        font-size: 0.75rem;
    }
    
    .footer-links a {
        margin: 0 6px;
        padding: 3px 6px;
    }
}

/* Enhanced Animations and Modern UI Elements */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-10px);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(102, 126, 234, 0.4);
    }
    70% {
        transform: scale(1.02);
        box-shadow: 0 0 0 10px rgba(102, 126, 234, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(102, 126, 234, 0);
    }
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
    100% {
        transform: translateY(0px);
    }
}

/* Staggered Animations for Better Visual Flow */
.bookmark-category,
.news-widget,
.widget {
    animation: fadeInUp 0.6s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
    opacity: 0;
}

.bookmark-category:nth-child(1) { animation-delay: 0.1s; }
.bookmark-category:nth-child(2) { animation-delay: 0.2s; }
.bookmark-category:nth-child(3) { animation-delay: 0.3s; }
.bookmark-category:nth-child(4) { animation-delay: 0.4s; }
.bookmark-category:nth-child(5) { animation-delay: 0.5s; }

.news-widget {
    animation-delay: 0.6s;
}

.widget:nth-child(1) { animation-delay: 0.1s; }
.widget:nth-child(2) { animation-delay: 0.2s; }
.widget:nth-child(3) { animation-delay: 0.3s; }
.widget:nth-child(4) { animation-delay: 0.4s; }

/* Enhanced Loading States */
.news-loading,
.weather-loading {
    text-align: center;
    color: #718096;
    font-style: italic;
    padding: 1.5rem;
    position: relative;
}

.news-loading::after,
.weather-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid rgba(102, 126, 234, 0.2);
    border-top: 2px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Enhanced Focus States for Accessibility */
#search-input:focus,
#todo-input:focus,
#notes-textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 
        0 0 0 3px rgba(102, 126, 234, 0.1),
        0 0 0 1px #667eea;
}

/* Enhanced Button States */
.engine-btn:focus {
    outline: none;
    box-shadow: 
        0 0 0 3px rgba(102, 126, 234, 0.2),
        0 0 0 1px #667eea;
}

#add-todo-btn:focus,
#save-notes-btn:focus,
.todo-delete:focus {
    outline: none;
    box-shadow: 
        0 0 0 3px rgba(102, 126, 234, 0.2),
        0 0 0 1px #667eea;
}

/* Smooth Scroll Behavior */
html {
    scroll-behavior: smooth;
}

/* Enhanced Selection Styling */
::selection {
    background: rgba(102, 126, 234, 0.2);
    color: #1a202c;
}

::-moz-selection {
    background: rgba(102, 126, 234, 0.2);
    color: #1a202c;
}
