/* =========================================
   EMBEDDED CARDS STYLES (News, Weather, Time)
   ========================================= */

.embedded-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    padding: 1.25rem;
    margin: 1.25rem 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
    /* Softer border */
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 100%;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.embedded-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

body.dark-theme .embedded-card {
    background: rgba(30, 30, 36, 0.95);
    border-color: rgba(255, 255, 255, 0.08);
    color: #e0e0e0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

/* Glassmorphism support */
@supports (backdrop-filter: blur(10px)) {
    .embedded-card {
        background: rgba(255, 255, 255, 0.8);
        backdrop-filter: blur(12px);
    }

    body.dark-theme .embedded-card {
        background: rgba(30, 30, 36, 0.8);
    }
}

/* --- News Card --- */
.news-card-container {
    border-left: 4px solid #ff4757;
}

.news-header {
    font-weight: 800;
    font-size: 1.15rem;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #ff4757;
    margin-bottom: 0.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid rgba(255, 71, 87, 0.1);
    letter-spacing: -0.01em;
}

.news-header::before {
    content: '\f1ea';
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
}

.news-item {
    display: flex;
    padding: 0.75rem;
    text-decoration: none;
    border: 1px solid transparent;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.02);
    /* Subtle card bg */
    transition: all 0.2s ease;
    gap: 1rem;
}

.news-item:hover {
    background: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-color: rgba(0, 0, 0, 0.05);
    transform: scale(1.01);
}

body.dark-theme .news-item {
    background: rgba(255, 255, 255, 0.03);
}

body.dark-theme .news-item:hover {
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.05);
}

.news-thumbnail-wrapper {
    flex-shrink: 0;
    width: 72px;
    height: 72px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.news-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.news-item:hover .news-thumbnail {
    transform: scale(1.1);
}

.news-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

.news-title {
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 0.35rem;
    color: #1a1a2e;
    line-height: 1.35;
}

body.dark-theme .news-title {
    color: #fff;
}

.news-snippet {
    font-size: 0.85rem;
    color: #666;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

body.dark-theme .news-snippet {
    color: #aaa;
}

/* --- Weather Card --- */
.weather-card {
    background: linear-gradient(135deg, #0acffe 0%, #495aff 100%);
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    align-items: center;
    text-align: center;
    border: none;
    position: relative;
    overflow: hidden;
}

/* Add a subtle shine effect */
.weather-card::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.2) 0%, transparent 60%);
    opacity: 0.6;
    pointer-events: none;
}

.weather-header {
    font-size: 1.25rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
    text-align: center;
}

.weather-temp {
    font-size: 3.5rem;
    font-weight: 800;
    margin: 0.25rem 0;
    letter-spacing: -2px;
    z-index: 1;
}

.weather-details {
    display: flex;
    gap: 1.5rem;
    font-size: 0.95rem;
    opacity: 0.95;
    background: rgba(255, 255, 255, 0.15);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    margin-top: 0.5rem;
    z-index: 1;
    backdrop-filter: blur(4px);
}

.weather-condition {
    margin-top: 0.75rem;
    font-weight: 600;
    text-transform: capitalize;
    font-size: 1.1rem;
    z-index: 1;
}

/* --- Time Card --- */
.time-card {
    background: #050505;
    color: #00ff41;
    /* Hacker Green */
    font-family: 'Courier New', monospace;
    align-items: center;
    border: 1px solid #00ff41;
    box-shadow: 0 0 15px rgba(0, 255, 65, 0.15);
    position: relative;
}

/* Scanline effect */
.time-card::before {
    content: " ";
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
    z-index: 2;
    background-size: 100% 2px, 3px 100%;
    pointer-events: none;
}

.time-main {
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-shadow: 0 0 10px rgba(0, 255, 65, 0.6);
    margin: 0.5rem 0;
    position: relative;
    z-index: 3;
}

.time-date {
    opacity: 0.8;
    color: #fff;
    font-family: sans-serif;
    /* Cleaner font for date */
    font-size: 1.1rem;
    z-index: 3;
}

.time-zone {
    font-size: 0.8rem;
    text-transform: uppercase;
    color: #00ff41;
    opacity: 0.7;
    margin-top: 0.75rem;
    border-top: 1px dashed #00ff41;
    padding-top: 0.5rem;
    width: 60%;
    text-align: center;
    z-index: 3;
}

/* --- Link Preview Card --- */
.link-preview-card {
    display: flex;
    flex-direction: row;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    margin-top: 0.75rem;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    max-width: 100%;
    cursor: pointer;
}

.link-preview-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.link-preview-image {
    width: 120px;
    height: 80px;
    object-fit: cover;
    background: #f0f0f0;
    flex-shrink: 0;
}

.link-preview-content {
    padding: 10px 15px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
    flex: 1;
}

.link-preview-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.link-preview-desc {
    font-size: 0.8rem;
    color: #666;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
    margin-bottom: 4px;
}

.link-preview-domain {
    font-size: 0.75rem;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

/* Dark Theme Support */
body.dark-theme .link-preview-card {
    background: #2a2a2a;
    border-color: rgba(255, 255, 255, 0.1);
}

body.dark-theme .link-preview-title {
    color: #e0e0e0;
}

body.dark-theme .link-preview-desc {
    color: #aaa;
}

/* Mobile Responsiveness */
@media (max-width: 480px) {
    .link-preview-card {
        flex-direction: column;
    }

    .link-preview-image {
        width: 100%;
        height: 140px;
    }

    .news-thumbnail-wrapper {
        width: 64px;
        height: 64px;
    }

    .embedded-card {
        padding: 1rem;
        margin: 1rem 0;
    }

    .news-item {
        padding: 0.625rem;
        gap: 0.75rem;
    }
}

/* Extra small screens (Android phones) */
@media (max-width: 375px) {
    .news-thumbnail-wrapper {
        width: 56px;
        height: 56px;
    }

    .link-preview-image {
        height: 120px;
    }

    .embedded-card {
        padding: 0.875rem;
        border-radius: 12px;
    }
}