/* Windows Phone 8 Style CSS */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #1e1e1e;
    color: #ffffff;
    line-height: 1.6;
    font-weight: 300;
}

/* Header Styles */
.header {
    background-color: #0078d4;
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

.logo {
    font-size: 24px;
    font-weight: 300;
    color: #ffffff;
    text-decoration: none;
}

.nav {
    display: flex;
    gap: 30px;
}

.nav-link {
    color: #ffffff;
    text-decoration: none;
    font-size: 16px;
    font-weight: 300;
    padding: 8px 16px;
    transition: background-color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    background-color: rgba(255, 255, 255, 0.2);
}

/* Main Content */
.main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px;
}

/* Tile Container - Windows Phone Style */
.tile-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 2px;
    max-width: 800px;
    margin: 0 auto;
}

/* Tile Base Styles */
.tile {
    position: relative;
    cursor: pointer;
    transition: all 0.2s ease;
    overflow: hidden;
    font-weight: 300;
}

.tile:hover {
    transform: scale(1.02);
}

.tile:active {
    transform: scale(0.98);
}

/* Tile Sizes */
.tile-small {
    grid-column: span 1;
    grid-row: span 1;
    height: 150px;
}

.tile-medium {
    grid-column: span 2;
    grid-row: span 2;
    height: 302px;
}

.tile-wide {
    grid-column: span 4;
    grid-row: span 2;
    height: 302px;
}

.tile-large {
    grid-column: span 4;
    grid-row: span 4;
    height: 606px;
}

/* Tile Color Themes */
.tile-primary {
    background-color: #0078d4;
}

.tile-accent {
    background-color: #00bcf2;
}

.tile-success {
    background-color: #107c10;
}

.tile-warning {
    background-color: #ff8c00;
}

.tile-danger {
    background-color: #ff4343;
}

.tile-info {
    background-color: #5c2d91;
}

.tile-secondary {
    background-color: #6c757d;
}

/* Tile Content */
.tile-content {
    padding: 20px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    color: #ffffff;
}

.tile-content h2 {
    font-size: 20px;
    font-weight: 300;
    margin-bottom: 10px;
    line-height: 1.2;
}

.tile-content h3 {
    font-size: 18px;
    font-weight: 300;
    margin-bottom: 8px;
    line-height: 1.2;
}

.tile-content h4 {
    font-size: 16px;
    font-weight: 300;
    margin-bottom: 5px;
}

.tile-content p {
    font-size: 14px;
    opacity: 0.9;
    line-height: 1.4;
}

.tile-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: rgba(255, 255, 255, 0.2);
    padding: 4px 8px;
    font-size: 12px;
    font-weight: 400;
}

/* News Page Styles */
.news-container {
    max-width: 1000px;
    margin: 0 auto;
}

.news-header {
    margin-bottom: 30px;
    text-align: center;
}

.news-header h2 {
    font-size: 28px;
    font-weight: 300;
    margin-bottom: 20px;
    color: #ffffff;
}

.news-filters {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-btn {
    background-color: #404040;
    color: #ffffff;
    border: none;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 300;
    cursor: pointer;
    transition: background-color 0.2s ease;
    font-family: inherit;
}

.filter-btn:hover,
.filter-btn.active {
    background-color: #0078d4;
}

/* News List */
.news-list {
    display: grid;
    gap: 20px;
}

.news-item {
    background-color: #2d2d2d;
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 20px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    overflow: hidden;
}

.news-item:hover {
    background-color: #3a3a3a;
}

.news-image {
    position: relative;
    overflow: hidden;
}

.news-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.news-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: #ff4343;
    color: #ffffff;
    padding: 4px 8px;
    font-size: 12px;
    font-weight: 400;
}

.video-badge {
    background-color: #9a0089;
}

.news-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.news-content h3 {
    font-size: 20px;
    font-weight: 400;
    margin-bottom: 10px;
    color: #ffffff;
    line-height: 1.3;
}

.news-content p {
    font-size: 14px;
    color: #cccccc;
    margin-bottom: 15px;
    line-height: 1.5;
}

.news-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.news-time {
    font-size: 12px;
    color: #999999;
}

.news-category {
    background-color: #0078d4;
    color: #ffffff;
    padding: 4px 8px;
    font-size: 12px;
    font-weight: 400;
}

/* Article Detail Styles */
.article-container {
    max-width: 800px;
    margin: 0 auto;
}

.article-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #404040;
}

.back-btn {
    background-color: #0078d4;
    color: #ffffff;
    border: none;
    padding: 10px 20px;
    font-size: 14px;
    cursor: pointer;
    font-family: inherit;
    font-weight: 300;
}

.back-btn:hover {
    background-color: #106ebe;
}

.article-meta {
    display: flex;
    gap: 20px;
    align-items: center;
}

.article-category {
    background-color: #0078d4;
    color: #ffffff;
    padding: 6px 12px;
    font-size: 14px;
    font-weight: 400;
}

.article-time {
    font-size: 14px;
    color: #999999;
}

/* Article Content */
.article {
    background-color: #2d2d2d;
    padding: 40px;
    margin-bottom: 30px;
}

.article-title {
    font-size: 32px;
    font-weight: 300;
    color: #ffffff;
    margin-bottom: 30px;
    line-height: 1.2;
}

.article-image {
    margin-bottom: 30px;
}

.article-image img {
    width: 100%;
    height: auto;
    display: block;
}

.image-caption {
    font-size: 12px;
    color: #999999;
    margin-top: 10px;
    text-align: center;
}

.article-content {
    color: #ffffff;
    line-height: 1.8;
}

.article-lead {
    font-size: 18px;
    color: #cccccc;
    margin-bottom: 25px;
    font-weight: 400;
    line-height: 1.6;
}

.article-content p {
    margin-bottom: 20px;
    font-size: 16px;
    line-height: 1.7;
}

.article-content h3 {
    font-size: 24px;
    font-weight: 300;
    color: #ffffff;
    margin: 30px 0 15px 0;
}

.article-content h4 {
    font-size: 20px;
    font-weight: 300;
    color: #ffffff;
    margin: 25px 0 10px 0;
}

/* Video Player */
.video-container {
    margin: 30px 0;
    background-color: #1e1e1e;
    padding: 20px;
}

.video-container h4 {
    margin-bottom: 15px;
    color: #ffffff;
}

.video-player {
    position: relative;
}

.video-player video {
    width: 100%;
    height: auto;
    background-color: #000000;
}

.video-caption {
    font-size: 12px;
    color: #999999;
    margin-top: 10px;
    text-align: center;
}

/* Highlight Box */
.highlight-box {
    background-color: #0078d4;
    padding: 20px;
    margin: 20px 0;
    color: #ffffff;
}

.highlight-box h4 {
    margin-bottom: 15px;
    font-weight: 400;
}

.highlight-box ul {
    list-style: none;
}

.highlight-box li {
    padding: 5px 0;
    font-size: 14px;
}

.highlight-box li:before {
    content: "▶ ";
    margin-right: 10px;
}

/* Article Tags */
.article-tags {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #404040;
}

.tag {
    display: inline-block;
    background-color: #404040;
    color: #ffffff;
    padding: 6px 12px;
    margin: 5px 10px 5px 0;
    font-size: 12px;
    font-weight: 400;
}

/* Related News */
.related-news {
    background-color: #2d2d2d;
    padding: 30px;
}

.related-news h3 {
    font-size: 20px;
    font-weight: 300;
    color: #ffffff;
    margin-bottom: 20px;
}

.related-items {
    display: grid;
    gap: 15px;
}

.related-item {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 15px;
    padding: 15px;
    background-color: #404040;
    text-decoration: none;
    color: inherit;
    transition: background-color 0.2s ease;
}

.related-item:hover {
    background-color: #4a4a4a;
}

.related-item img {
    width: 100%;
    height: 100px;
    object-fit: cover;
}

.related-content h4 {
    font-size: 14px;
    font-weight: 400;
    color: #ffffff;
    margin-bottom: 5px;
}

.related-content p {
    font-size: 12px;
    color: #cccccc;
}

/* Footer */
.footer {
    background-color: #0078d4;
    margin-top: 50px;
    padding: 20px 0;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
    padding: 0 20px;
}

.footer-content p {
    color: #ffffff;
    font-size: 14px;
    font-weight: 300;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 15px;
    }
    
    .nav {
        gap: 15px;
    }
    
    .tile-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 1px;
    }
    
    .tile-large {
        grid-column: span 2;
        grid-row: span 2;
        height: 302px;
    }
    
    .tile-wide {
        grid-column: span 2;
        grid-row: span 1;
        height: 150px;
    }
    
    .tile-medium {
        grid-column: span 2;
        grid-row: span 2;
        height: 302px;
    }
    
    .news-item {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .news-image img {
        height: 150px;
    }
    
    .related-item {
        grid-template-columns: 100px 1fr;
    }
    
    .related-item img {
        height: 80px;
    }
    
    .article {
        padding: 20px;
    }
    
    .article-title {
        font-size: 24px;
    }
    
    .news-filters {
        gap: 5px;
    }
    
    .filter-btn {
        padding: 8px 12px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .main {
        padding: 20px 10px;
    }
    
    .tile-container {
        grid-template-columns: 1fr 1fr;
    }
    
    .tile-large,
    .tile-wide,
    .tile-medium {
        grid-column: span 2;
        grid-row: span 1;
        height: 150px;
    }
    
    .tile-content {
        padding: 15px;
    }
    
    .tile-content h2 {
        font-size: 16px;
    }
    
    .tile-content h3 {
        font-size: 14px;
    }
    
    .article-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
}

/* Animation for tile loading */
.tile {
    animation: fadeInUp 0.6s ease-out forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Add staggered animation delays */
.tile:nth-child(1) { animation-delay: 0.1s; }
.tile:nth-child(2) { animation-delay: 0.2s; }
.tile:nth-child(3) { animation-delay: 0.3s; }
.tile:nth-child(4) { animation-delay: 0.4s; }
.tile:nth-child(5) { animation-delay: 0.5s; }
.tile:nth-child(6) { animation-delay: 0.6s; }
.tile:nth-child(7) { animation-delay: 0.7s; }
.tile:nth-child(8) { animation-delay: 0.8s; }