/* Global Styles */
@font-face {
    font-family: 'Segoe UI Local';
    src: local('Segoe UI'), local('SegoeUI');
}


body {
    font-family: 'Segoe UI Local', 'Segoe UI', "Helvetica Neue", Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 0;
    color: #000;
    background-color: #fff;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
}

/* Header */
header {
    background-color: #fff;
    border-bottom: 1px solid #e1dfdd;
    height: 54px;
    display: flex;
    align-items: center;
    padding: 0 5%;
    font-size: 13px;
}

.header-container {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-right: 20px;
}

.ms-logo {
    width: 108px;
    /* Appears to include text in accurate SVGs, but we keep simple icon + text here */
    width: 23px;
    height: 23px;
}

.brand-name {
    font-weight: 600;
    font-size: 18px;
    color: #737373;
    /* Slightly lighter gray for "Microsoft" part usually, but bold one is fine */
    color: #5e5e5e;
    margin-left: 5px;
}

/* Correcting brand name display to match typical header */
.brand-name {
    display: inline-block;
    /* Often Microsoft logo includes text, here simulating with text */
    font-weight: 600;
    font-size: 19px;
    color: #727272;
    margin-left: 8px;
    font-family: 'Segoe UI Semibold', 'Segoe UI', sans-serif;
}

.divider {
    font-size: 20px;
    margin: 0 10px;
    color: #000;
}

.sub-brand {
    font-weight: 600;
    font-size: 18px;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-grow: 1;
}

.main-nav a {
    color: #262626;
    display: flex;
    align-items: center;
    gap: 4px;
}

.main-nav a:hover {
    text-decoration: underline;
}

.chevron {
    font-size: 10px;
    margin-top: 2px;
}

.copilot-btn {
    border: 1px solid #e1dfdd;
    padding: 6px 12px;
    border-radius: 4px;
    font-weight: 600;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.search-btn {
    display: flex;
    align-items: center;
    gap: 5px;
}

.sign-in {
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
    padding-right: 40px;
    /* Space for avatar */
}

.avatar-placeholder {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    /* Circle */
    border: 1px solid #707070;
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><circle cx="16" cy="10" r="6" fill="none" stroke="%23555" stroke-width="1.5"/><path d="M6 26c0-6 4-9 10-9s10 3 10 9" fill="none" stroke="%23555" stroke-width="1.5"/></svg>') no-repeat center;
}

/* Hero Section */
.hero {
    background-image: url('../images/topbg.png');
    background-size: cover;
    background-position: center;
    height: 400px;
    /* Adjust height as needed */
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: #fff;
    position: relative;
}

/* Semi-transparent overlay handled by image usually, but if image is raw without gradient, add one? 
   Assuming topbg.png is the full banner image provided. 
*/

.hero-content {
    max-width: 800px;
    width: 100%;
}

.hero h1 {
    font-size: 36px;
    font-weight: 600;
    margin-bottom: 20px;
}

.hero p {
    font-size: 18px;
    margin-bottom: 30px;
}

.hero-sign-in {
    display: inline-block;
    border: 1px solid #fff;
    padding: 6px 16px;
    margin-left: 10px;
    color: #fff;
    text-decoration: none;
    font-size: 15px;
}

.hero-sign-in:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.search-bar {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
    background-color: #fff;
    border-radius: 2px;
    display: flex;
    align-items: center;
    padding: 2px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.search-bar input {
    border: none;
    outline: none;
    width: 100%;
    padding: 12px 16px;
    font-size: 16px;
    color: #000;
}

.search-arrow {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px 16px;
    color: #0067b8;
    /* Microsoft Blue */
}

/* Products Grid */
.products-grid {
    display: flex;
    justify-content: center;
    gap: 30px;
    padding: 40px 5%;
    flex-wrap: wrap;
}

.product-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    cursor: pointer;
    width: 100px;
}

.icon-placeholder {
    width: 48px;
    height: 48px;
    margin-bottom: 10px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    /* Using colored squares/abstract shapes to mimic icons via CSS/SVG data URIs for robust standalone demo */
}

/* Simple CSS geometric icons to mimic the look */
.ms-365 {
    background-color: #d83b01;
    mask: url('data:image/svg+xml;utf8,<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><rect width="24" height="24"/></svg>');
    -webkit-mask: url('data:image/svg+xml;utf8,<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><rect width="24" height="24"/></svg>');
    background: linear-gradient(135deg, #e33d02, #f25022);
}

/* Actually, real icons are complex. I'll use colored squares with initials or simplified SVGs */

.ms-365 {
    background: #f25022;
}

.outlook {
    background: #0078d4;
}

.onedrive {
    background: #0078d4;
    border-radius: 50%;
    /* Cloud-ish fallback */
}

.windows {
    background: #0078d4;
}

.copilot {
    background: linear-gradient(135deg, #fce100, #ff0000, #8f00ff);
    border-radius: 50%;
}

.surface {
    background: #737373;
}

.gaming {
    background: #107c10;
    border-radius: 50%;
}

.teams {
    background: #6264a7;
}

.store {
    background: #000000;
}

.product-item span {
    font-size: 14px;
    font-weight: 600;
    color: #000;
}

.more-products {
    text-align: center;
    padding-bottom: 40px;
}

.more-products a {
    color: #0067b8;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

/* Trending Topics */
.trending-topics {
    padding: 40px 5%;
    text-align: center;
}

.trending-topics h2 {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 40px;
    color: #000;
}

.topics-grid {
    display: flex;
    justify-content: space-between;
    text-align: left;
    max-width: 1200px;
    margin: 0 auto;
}

.topic-column {
    flex: 1;
    padding: 0 10px;
}

.topic-column h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #000;
}

.topic-column a {
    color: #0067b8;
    font-size: 14px;
    display: block;
    margin-bottom: 8px;
}

.topic-column a:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
    }

    .main-nav {
        display: none;
        /* Simplify for mobile for now as per "copy paste ui" request which implies desktop static usually, but adding basic hiding */
    }

    .hero {
        height: auto;
        padding: 40px 20px;
    }

    .products-grid {
        justify-content: center;
    }

    .topics-grid {
        flex-direction: column;
        text-align: center;
    }

    .topic-column {
        margin-bottom: 30px;
    }
}

/* Auth Drawer Styles */
.auth-drawer {
    display: none;
    /* Hidden by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
}

.auth-drawer.open {
    display: block;
}

.auth-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.auth-drawer.open .auth-backdrop {
    opacity: 1;
}

.auth-panel {
    position: absolute;
    top: 0;
    right: -400px;
    /* Hidden off-screen */
    width: 400px;
    height: 100%;
    background-color: #fff;
    box-shadow: -2px 0 5px rgba(0, 0, 0, 0.2);
    transition: right 0.3s ease;
    padding: 20px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

.auth-drawer.open .auth-panel {
    right: 0;
}

.close-drawer {
    align-self: flex-end;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #555;
    margin-bottom: 20px;
}

.auth-tabs {
    display: flex;
    border-bottom: 2px solid #e1dfdd;
    margin-bottom: 20px;
}

.auth-tabs .tab-btn {
    flex: 1;
    padding: 10px;
    background: none;
    border: none;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    color: #555;
    position: relative;
    font-family: inherit;
}

.auth-tabs .tab-btn.active {
    color: #0067b8;
}

.auth-tabs .tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #0067b8;
}

.auth-content {
    display: none;
}

.auth-content.active {
    display: block;
}

.auth-content h2 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 20px;
}

.auth-content input {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #707070;
    border-radius: 2px;
    font-size: 15px;
    box-sizing: border-box;
}

.primary-btn {
    width: 100%;
    padding: 10px;
    background-color: #0067b8;
    color: #fff;
    border: none;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}

.primary-btn:hover {
    background-color: #005da6;
}

@media (max-width: 480px) {
    .auth-panel {
        width: 100%;
        right: -100%;
    }
}


/* ===== Windows Security Drawer ===== */

.security-drawer {
    position: fixed;
    inset: 0;
    display: none;
    z-index: 9999;
}

.security-drawer.active {
    display: block;
}

.security-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.55);
}

.security-panel {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 520px;
    background: #ffffff;
    border-radius: 10px;
    padding: 28px;
    font-family: "Segoe UI", sans-serif;
    box-shadow: 0 20px 60px rgba(0,0,0,0.4);
    animation: fadeIn 0.25s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translate(-50%, -48%); }
    to { opacity: 1; transform: translate(-50%, -50%); }
}

.close-security {
    position: absolute;
    top: 16px;
    right: 16px;
    border: none;
    background: transparent;
    font-size: 18px;
    cursor: pointer;
}

.security-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.security-header-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.security-header h2 {
    margin: 0;
    font-weight: 600;
}

.activate {
    font-size: 13px;
    color: #555;
}

.scan-section h3 {
    margin-bottom: 18px;
    font-weight: 600;
}

.progress-bar {
    height: 28px;
    background: #e6e6e6;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 22px;
}

.progress-fill {
    height: 100%;
    width: 35%;
    background: #0078d4;
    color: white;
    display: flex;
    align-items: center;
    padding-left: 12px;
    font-size: 13px;
    font-weight: 600;
}

.scan-stats {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 24px;
    margin-bottom: 28px;
}

.scan-stats span {
    display: block;
    font-size: 13px;
    color: #666;
}

.scan-stats strong {
    font-size: 16px;
    font-weight: 600;
}

.scan-actions {
    display: flex;
    gap: 12px;
}

.sec-btn {
    background: #f3f3f3;
    border: 1px solid #ccc;
    padding: 10px 18px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
}

.sec-btn.outline {
    margin-left: auto;
}

/* ===== Microsoft Defender Drawer ===== */

.defender-drawer {
    position: fixed;
    inset: 0;
    display: none;
    z-index: 10000;
}

.defender-drawer.active {
    display: block;
}

.defender-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.55);
}

.defender-panel {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 420px;
    background: #ffffff;
    border-radius: 10px;
    padding: 28px;
    padding-bottom: 32px;
    font-family: "Segoe UI", sans-serif;
    box-shadow: 0 20px 60px rgba(0,0,0,0.4);
    animation: fadeIn 0.25s ease;
}

.close-defender {
    position: absolute;
    top: 16px;
    right: 16px;
    border: none;
    background: transparent;
    font-size: 12px;
    cursor: pointer;
    color: #666;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}


.defender-header {
    display: flex;
    align-items: center;
    gap: 4px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e1dfdd;
}

.defender-header h2 {
    margin: 0;
    font-weight: 600;
    font-size: 20px;
    color: #000;
}

.defender-content {
    padding-top: 4px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.error-heading {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #000;
    line-height: 1.4;
}

.support-call-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.support-call-text {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: #000;
}

.phone-box {
    background: #fff;
    border: 1px solid #000;
    padding: 8px 12px;
    display: inline-block;
    width: fit-content;
}

.phone-number {
    font-size: 16px;
    font-weight: 600;
    color: #000;
}

.defender-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
}

.defender-logo-section {
    display: flex;
    align-items: center;
    gap: 8px;
}

.defender-logo-section .ms-logo {
    width: 20px;
    height: 20px;
}

.windows-security-text {
    font-size: 13px;
    font-weight: 500;
    color: #000;
}

.defender-actions {
    display: flex;
    gap: 8px;
}

.defender-btn {
    padding: 8px 20px;
    border-radius: 2px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
    min-width: 80px;
}

.defender-btn.cancel {
    background-color: #fff;
    color: #000;
    border: 1px solid #999;
}

.defender-btn.cancel:hover {
    background-color: #f5f5f5;
}

.defender-btn.ok {
    background-color: #0078d4;
    color: #fff;
    border: none;
}

.defender-btn.ok:hover {
    background-color: #0067b8;
}

.defender-bottom-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background-color: #0078d4;
    border-radius: 0 0 10px 10px;
}

/* ===== Defender Notification Bar (Absolute Footer) ===== */

.defender-notification-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: #0078d4;
    padding: 12px 20px;
    display: none;
    align-items: center;
    justify-content: space-between;
    z-index: 10001;
    font-family: "Segoe UI", sans-serif;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.2);
}

.defender-drawer.active .defender-notification-bar {
    display: flex;
}

.notification-left {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.ms-logo-small {
    width: 18px;
    height: 18px;
}

.notification-text {
    color: #fff;
    font-size: 14px;
    font-weight: 500;
}

.notification-center {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
    justify-content: center;
}

.notification-phone {
    color: #fff;
    font-size: 14px;
    font-weight: 600;
}

.notification-right {
    flex-shrink: 0;
    text-align: right;
}

.notification-small-text {
    color: rgba(255, 255, 255, 0.8);
    font-size: 12px;
    font-weight: 400;
}