/*
 * Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
 * See LICENSE in the project root for license information.
 */

/* Base Styles */
html,
body {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    background: linear-gradient(135deg, #f9f9f9 0%, #f0f0f0 100%);
    display: flex;
    flex-direction: column;
    font-family: 'Roboto', 'Segoe UI', Arial, sans-serif;
    color: #333;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    margin-top: 0;
    font-weight: 500;
    color: #333;
}

/* Header Styles */
.app-header {
    background: linear-gradient(135deg, #0078d4, #106ebe);
    color: white;
    padding: 16px 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header-content {
    display: flex;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.app-logo {
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    margin-right: 16px;
}

.app-title {
    margin: 0;
    font-size: 24px;
    font-weight: 500;
    letter-spacing: 0.5px;
}

/* Loading Styles */
.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 0;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(0, 120, 212, 0.1);
    border-radius: 50%;
    border-top-color: #0078d4;
    border-left-color: #0078d4;
    animation: spin 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
    margin-top: 20px;
    box-shadow: 0 0 10px rgba(0, 120, 212, 0.1);
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Card Styles */
.card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
    width: 100%;
    overflow: hidden;
    transition: all 0.3s ease;
    transform: translateY(0);
}

.card:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    transform: translateY(-3px);
}

.card-header {
    padding: 16px 20px;
    border-bottom: 1px solid #f0f0f0;
    background-color: #fafafa;
}

.card-title {
    margin: 0;
    font-size: 18px;
    display: flex;
    align-items: center;
}

.card-title i {
    margin-right: 10px;
    color: #0078d4;
}

.card-content {
    padding: 20px;
}

/* Code Styles */
.code-container {
    position: relative;
    background: #f8f8f8;
    border-radius: 6px;
    padding: 16px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-left: 4px solid #0078d4;
}

code {
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 14px;
    background: transparent;
    word-wrap: break-word;
    color: #333;
    flex-grow: 1;
}

.example-code {
    font-weight: 500;
}

.copy-button {
    background: transparent;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.copy-button:hover {
    color: #0078d4;
    background-color: rgba(0, 120, 212, 0.1);
}

/* Form Styles */
.settings-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-group {
    margin-bottom: 5px;
}

label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    font-size: 14px;
    color: #555;
}

input,
textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    color: #333;
    background-color: #fff;
    transition: all 0.3s ease;
    box-sizing: border-box;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
}

input:focus,
textarea:focus {
    border-color: #0078d4;
    box-shadow: 0 0 0 3px rgba(0, 120, 212, 0.1);
    outline: none;
}

textarea {
    resize: vertical;
    min-height: 60px;
}

/* Button Styles */
.ms-Button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 20px;
    height: 40px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    outline: none;
    margin-top: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ms-Button i {
    margin-right: 8px;
}

.ms-Button--primary {
    background-color: #0078d4;
    color: white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.ms-Button--primary:hover {
    background-color: #106ebe;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.ms-Button--primary:active {
    background-color: #005a9e;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transform: translateY(1px);
}

.ms-Button-label {
    font-weight: 600;
}

/* Password Input Styles */
.password-container {
    position: relative;
    width: 100%;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background-color: transparent;
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

.password-toggle:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.eye-icon {
    fill: #777;
    transition: fill 0.3s ease;
}

.eye-icon:hover {
    fill: #333;
}

/* Footer Styles */
.app-footer {
    margin-top: auto;
    background: #2a2a2a;
    color: #999;
    padding: 15px 0;
    text-align: center;
    font-size: 14px;
}

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

.footer-links {
    display: flex;
    justify-content: center;
    margin-bottom: 10px;
}

.footer-link {
    color: #999;
    font-size: 20px;
    margin: 0 15px;
    transition: color 0.3s ease;
}

.footer-link:hover {
    color: white;
}

.footer-text {
    font-size: 12px;
}

/* Main Content Styles */
.ms-welcome__main {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    padding: 20px;
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}

/* Notification Styles */
.notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    width: auto;
    max-width: 300px;
}

.notification {
    padding: 12px 16px;
    margin-bottom: 10px;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    animation: fadeIn 0.3s ease-in-out;
    text-align: center;
    font-weight: 500;
    font-size: 14px;
}

.notification-info {
    background-color: #e6f7ff;
    border-left: 4px solid #1890ff;
    color: #0050b3;
}

.notification-success {
    background-color: #f6ffed;
    border-left: 4px solid #52c41a;
    color: #135200;
}

.notification-error {
    background-color: #fff2f0;
    border-left: 4px solid #ff4d4f;
    color: #a8071a;
}

.notification-loading {
    background-color: #f5f5f5;
    border-left: 4px solid #722ed1;
    color: #531dab;
}

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

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

/* Responsive Adjustments */
@media (max-width: 600px) {
    .app-header {
        padding: 12px 16px;
    }

    .app-title {
        font-size: 20px;
    }

    .ms-welcome__main {
        padding: 16px;
    }

    .card-header {
        padding: 12px 16px;
    }

    .card-content {
        padding: 16px;
    }
}