/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, #e6f4ea 0%, #c8e6c9 100%);
    min-height: 100vh;
    color: #2e7d32;
    overflow-x: hidden;
    position: relative;
}

.leaf-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100' viewBox='0 0 100 100'%3E%3Cpath fill='%23a5d6a7' fill-opacity='0.2' d='M35.5,27.5c0-2.5-2-4.5-4.5-4.5s-4.5,2-4.5,4.5s2,4.5,4.5,4.5S35.5,30,35.5,27.5z M27.5,55.5 c0-2.5-2-4.5-4.5-4.5s-4.5,2-4.5,4.5s2,4.5,4.5,4.5S27.5,58,27.5,55.5z M63.5,55.5c0-2.5-2-4.5-4.5-4.5s-4.5,2-4.5,4.5s2,4.5,4.5,4.5 S63.5,58,63.5,55.5z M71.5,27.5c0-2.5-2-4.5-4.5-4.5s-4.5,2-4.5,4.5s2,4.5,4.5,4.5S71.5,30,71.5,27.5z M51.5,41.5c0-2.5-2-4.5-4.5-4.5 s-4.5,2-4.5,4.5s2,4.5,4.5,4.5S51.5,44,51.5,41.5z M51.5,41.5'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: -1;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Header Styles */
.header {
    text-align: center;
    margin-bottom: 1rem;
}

.time-display {
    margin-bottom: 2rem;
}

.time {
    font-family: 'Montserrat', sans-serif;
    font-size: 4rem;
    font-weight: 500;
    color: #1b5e20;
    margin-bottom: 0.5rem;
    letter-spacing: -1px;
    text-shadow: 2px 2px 4px rgba(46, 125, 50, 0.2);
}

.date {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.3rem;
    color: #388e3c;
    font-weight: 400;
}

/* Search Section */
.search-section {
    display: flex;
    justify-content: center;
    margin-bottom: 3rem;
}

.search-container {
    width: 100%;
    max-width: 600px;
}

.search-box {
    position: relative;
    background: #f1f8e9;
    border-radius: 50px;
    box-shadow: 0 8px 25px rgba(46, 125, 50, 0.2);
    padding: 1.2rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
    border: 2px solid #c8e6c9;
}

.search-box:hover {
    box-shadow: 0 12px 35px rgba(46, 125, 50, 0.3);
    transform: translateY(-2px);
}

.search-icon {
    color: #4caf50;
    font-size: 1.3rem;
}

#search-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 1.1rem;
    color: #2e7d32;
    font-weight: 400;
    background: transparent;
    font-family: 'Open Sans', sans-serif;
}

#search-input::placeholder {
    color: #81c784;
}

.search-engines {
    display: flex;
    gap: 0.5rem;
    margin-left: auto;
}

.engine-btn {
    width: 38px;
    height: 38px;
    border: none;
    border-radius: 50%;
    background: #e8f5e9;
    color: #4caf50;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-size: 1.1rem;
    border: 1px solid #c8e6c9;
}

.engine-btn:hover {
    background: #c8e6c9;
    transform: scale(1.1);
}

.engine-btn.active {
    background: #2e7d32;
    color: #f1f8e9;
    border: 1px solid #1b5e20;
}

/* Bookmarks Section */
.bookmarks-section {
    flex: 1;
}

.bookmarks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.bookmark-category {
    background: #f1f8e9;
    border-radius: 20px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    border: 2px solid #c8e6c9;
    box-shadow: 0 5px 15px rgba(46, 125, 50, 0.1);
    position: relative;
    overflow: hidden;
}

.bookmark-category::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, #2e7d32, #4caf50);
}

.bookmark-category:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(46, 125, 50, 0.2);
}

.bookmark-category h3 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.2rem;
    font-weight: 600;
    color: #1b5e20;
    margin-bottom: 1rem;
    text-align: center;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.bookmark-links {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.bookmark-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.9rem 1.1rem;
    border-radius: 12px;
    text-decoration: none;
    color: #2e7d32;
    transition: all 0.2s ease;
    background: rgba(241, 248, 233, 0.7);
    border: 1px solid #c8e6c9;
}

.bookmark-link:hover {
    background: #e8f5e9;
    transform: translateX(5px);
    color: #1b5e20;
    box-shadow: 0 3px 10px rgba(46, 125, 50, 0.1);
}

.bookmark-link i {
    font-size: 1.2rem;
    width: 22px;
    text-align: center;
    color: #4caf50;
}

.bookmark-link span {
    font-weight: 500;
    font-size: 0.95rem;
}

/* Tools Section */
.tools-section {
    margin: 2rem 0;
}

.tools-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.tool-card {
    background: #f1f8e9;
    border-radius: 20px;
    padding: 1.5rem;
    border: 2px solid #c8e6c9;
    box-shadow: 0 8px 25px rgba(46, 125, 50, 0.15);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.tool-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, #2e7d32, #4caf50);
}

.tool-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 35px rgba(46, 125, 50, 0.25);
}

.tool-header {
    text-align: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #c8e6c9;
}

.tool-icon {
    font-size: 2rem;
    color: #4caf50;
    margin-bottom: 0.5rem;
}

.tool-header h3 {
    font-family: 'Montserrat', sans-serif;
    color: #1b5e20;
    font-size: 1.4rem;
    font-weight: 600;
    margin: 0;
}

.tool-content {
    min-height: 300px;
}

/* Calculator Styles */
.calculator {
    background: white;
    border-radius: 15px;
    padding: 1rem;
    box-shadow: 0 5px 15px rgba(46, 125, 50, 0.1);
}

.calc-display {
    width: 100%;
    height: 60px;
    font-size: 1.5rem;
    text-align: right;
    padding: 0 1rem;
    border: 2px solid #c8e6c9;
    border-radius: 10px;
    margin-bottom: 1rem;
    background: #f8f9fa;
    color: #2e7d32;
    font-family: 'Courier New', monospace;
}

.calc-buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
}

.calc-btn {
    height: 50px;
    border: none;
    border-radius: 10px;
    background: #e8f5e9;
    color: #2e7d32;
    font-size: 1.2rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid #c8e6c9;
}

.calc-btn:hover {
    background: #c8e6c9;
    transform: translateY(-2px);
}

.calc-btn:active {
    transform: translateY(0);
}

.calc-btn.operator {
    background: #4caf50;
    color: white;
}

.calc-btn.operator:hover {
    background: #2e7d32;
}

.calc-btn.equals {
    grid-row: span 2;
    background: #2e7d32;
    color: white;
}

.calc-btn.equals:hover {
    background: #1b5e20;
}

.calc-btn.zero {
    grid-column: span 2;
}

/* Currency Converter Styles */
.currency-converter {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 5px 15px rgba(46, 125, 50, 0.1);
}

.currency-input-group {
    margin-bottom: 1.5rem;
}

.currency-input {
    width: 100%;
    padding: 1rem;
    font-size: 1.2rem;
    border: 2px solid #c8e6c9;
    border-radius: 10px;
    background: #f8f9fa;
    color: #2e7d32;
    text-align: center;
}

.currency-input:focus {
    outline: none;
    border-color: #4caf50;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

.currency-selectors {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.currency-select {
    flex: 1;
    min-width: 120px;
    padding: 0.8rem;
    border: 2px solid #c8e6c9;
    border-radius: 10px;
    background: #f8f9fa;
    color: #2e7d32;
    font-size: 1rem;
}

.currency-select:focus {
    outline: none;
    border-color: #4caf50;
}

.swap-btn {
    padding: 0.8rem 1.2rem;
    background: #4caf50;
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.2s ease;
}

.swap-btn:hover {
    background: #2e7d32;
    transform: scale(1.1);
}

.conversion-result {
    margin: 1.5rem 0;
    text-align: center;
}

.result-display {
    font-size: 1.3rem;
    font-weight: 600;
    color: #1b5e20;
    padding: 1rem;
    background: #e8f5e9;
    border-radius: 10px;
    border: 1px solid #c8e6c9;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.convert-btn {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, #4caf50, #2e7d32);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.convert-btn:hover {
    background: linear-gradient(135deg, #2e7d32, #1b5e20);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(46, 125, 50, 0.4);
}

/* News Section */
.news-section {
    margin-top: 2rem;
}

.news-widget {
    background: #f1f8e9;
    border-radius: 20px;
    padding: 1.5rem;
    border: 2px solid #c8e6c9;
    box-shadow: 0 5px 15px rgba(46, 125, 50, 0.1);
    position: relative;
}

.news-widget::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, #2e7d32, #4caf50);
}

.news-widget h3 {
    font-family: 'Montserrat', sans-serif;
    color: #1b5e20;
    margin-bottom: 1rem;
    font-size: 1.3rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-align: center;
}

.news-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1.5rem;
}

/* 新闻卡片样式 */
.news-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(46, 125, 50, 0.15);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid #e8f5e9;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.news-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 15px 35px rgba(46, 125, 50, 0.25);
    border-color: #c8e6c9;
}

.news-image-container {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.news-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.news-card:hover .news-image {
    transform: scale(1.05);
}

.news-source-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(46, 125, 50, 0.9);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 12px rgba(46, 125, 50, 0.3);
}

.news-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.news-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: #1b5e20;
    margin-bottom: 0.8rem;
    line-height: 1.4;
    transition: color 0.2s ease;
}

.news-card:hover .news-title {
    color: #2e7d32;
}

.news-excerpt {
    color: #5a8f60;
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 1.2rem;
    flex: 1;
}

.news-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid #e8f5e9;
}

.news-time {
    font-size: 0.85rem;
    color: #81c784;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.news-link {
    background: linear-gradient(135deg, #4caf50, #2e7d32);
    color: white;
    padding: 8px 16px;
    border-radius: 25px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.news-link:hover {
    background: linear-gradient(135deg, #2e7d32, #1b5e20);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(46, 125, 50, 0.4);
}

.news-link i {
    transition: transform 0.2s ease;
}

.news-link:hover i {
    transform: translateX(3px);
}

.news-loading {
    text-align: center;
    color: #4caf50;
    font-style: italic;
    padding: 3rem;
    font-family: 'Montserrat', sans-serif;
    font-size: 1.1rem;
    background: rgba(241, 248, 233, 0.5);
    border-radius: 15px;
    border: 2px dashed #c8e6c9;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 1.2rem;
        gap: 1.5rem;
    }
    
    /* Tools Section Responsive */
    .tools-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .tool-card {
        padding: 1.2rem;
    }
    
    .tool-content {
        min-height: 250px;
    }
    
    .calc-display {
        height: 50px;
        font-size: 1.2rem;
    }
    
    .calc-btn {
        height: 45px;
        font-size: 1.1rem;
    }
    
    .currency-selectors {
        flex-direction: column;
        gap: 0.8rem;
    }
    
    .currency-select {
        min-width: 100%;
    }
    
    .swap-btn {
        align-self: center;
        padding: 0.6rem 1rem;
    }
    
    .result-display {
        font-size: 1.1rem;
        min-height: 50px;
    }
    
    .time {
        font-size: 2.8rem;
    }
    
    .date {
        font-size: 1.1rem;
    }
    
    .search-box {
        padding: 1rem 1.2rem;
    }
    
    #search-input {
        font-size: 1rem;
    }
    
    .bookmarks-grid {
        grid-template-columns: 1fr;
        gap: 1.2rem;
    }
    
    .bookmark-category {
        padding: 1.2rem;
    }
    
    .bookmark-links {
        gap: 0.7rem;
    }
    
    .bookmark-link {
        padding: 0.7rem 0.9rem;
    }
    
    .news-container {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .news-card {
        max-width: 100%;
    }
    
    .news-image-container {
        height: 160px;
    }
    
    .news-content {
        padding: 1.2rem;
    }
    
    .news-title {
        font-size: 1rem;
    }
    
    .news-excerpt {
        font-size: 0.85rem;
    }
    
    .news-meta {
        flex-direction: column;
        gap: 0.8rem;
        align-items: flex-start;
    }
    
    .news-link {
        align-self: flex-end;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0.8rem;
    }
    
    /* Tools Section Mobile */
    .tools-container {
        gap: 1rem;
    }
    
    .tool-card {
        padding: 1rem;
        border-radius: 15px;
    }
    
    .tool-header {
        margin-bottom: 1rem;
        padding-bottom: 0.8rem;
    }
    
    .tool-icon {
        font-size: 1.5rem;
    }
    
    .tool-header h3 {
        font-size: 1.2rem;
    }
    
    .tool-content {
        min-height: 220px;
    }
    
    .calc-display {
        height: 45px;
        font-size: 1.1rem;
        padding: 0 0.8rem;
    }
    
    .calc-btn {
        height: 40px;
        font-size: 1rem;
    }
    
    .currency-converter {
        padding: 1rem;
    }
    
    .currency-input {
        padding: 0.8rem;
        font-size: 1.1rem;
    }
    
    .currency-select {
        padding: 0.6rem;
        font-size: 0.9rem;
    }
    
    .swap-btn {
        padding: 0.5rem 0.8rem;
        font-size: 1rem;
    }
    
    .result-display {
        font-size: 1rem;
        padding: 0.8rem;
        min-height: 45px;
    }
    
    .convert-btn {
        padding: 0.8rem;
        font-size: 1rem;
    }
    
    .time {
        font-size: 2.2rem;
    }
    
    .search-engines {
        display: none;
    }
    
    .engine-btn {
        width: 34px;
        height: 34px;
        font-size: 1rem;
    }
    
    .news-widget {
        padding: 1.2rem;
    }
    
    .news-container {
        gap: 0.8rem;
    }
    
    .news-card {
        border-radius: 12px;
    }
    
    .news-image-container {
        height: 140px;
    }
    
    .news-content {
        padding: 1rem;
    }
    
    .news-title {
        font-size: 0.95rem;
    }
    
    .news-source-badge {
        font-size: 0.7rem;
        padding: 4px 10px;
        top: 8px;
        left: 8px;
    }
    
    .news-link {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.bookmark-category,
.news-widget {
    animation: fadeInUp 0.6s ease forwards;
}

.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; }

/* Floating leaves effect */
.floating-leaf {
    position: fixed;
    font-size: 2rem;
    color: rgba(76, 175, 80, 0.3);
    pointer-events: none;
    z-index: -1;
    animation: float 15s infinite linear;
}

@keyframes float {
    0% {
        transform: translateY(100vh) rotate(0deg);
    }
    100% {
        transform: translateY(-100px) rotate(360deg);
    }
}