/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

/* Container Layout */
.container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar Styles */
.sidebar {
    width: 300px;
    background: #4B286D;
    color: white;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 2px 0 15px rgba(0, 0, 0, 0.1);
    border-right: 3px solid #4b286d;
}

.sidebar-header {
    padding: 2rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sidebar-header p {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Search Container */
.search-container {
    position: relative;
    margin: 1.5rem;
}

.search-input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    border: none;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 0.9rem;
    backdrop-filter: blur(10px);
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.search-input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.2);
}

.search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.7);
}

/* Navigation Menu */
.nav-menu {
    list-style: none;
    padding: 0 1rem 2rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    border-radius: 8px;
    margin-bottom: 0.25rem;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    transform: translateX(4px);
}

.nav-link.active {
    background: rgba(102, 204, 0, 0.2);
    color: white;
    font-weight: 600;
    border-left: 3px solid #2B8000;
    padding-left: 0.75rem;
}

.nav-link i {
    width: 16px;
    text-align: center;
}

/* Sub-navigation Menu */
.nav-submenu {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 0 0 8px 8px;
}

.nav-menu li:hover .nav-submenu,
.nav-menu li.active .nav-submenu {
    max-height: 500px;
}

.nav-sublink {
    display: block;
    padding: 0.5rem 1rem 0.5rem 2.5rem;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.85rem;
    transition: all 0.2s ease;
    border-left: 2px solid transparent;
}

.nav-sublink:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
    border-left-color: #2B8000;
    transform: translateX(2px);
}

.nav-submenu li {
    margin: 0;
}

/* Main Content */
.main-content {
    margin-left: 300px;
    flex: 1;
    padding: 2rem;
    max-width: calc(100vw - 300px);
}

/* Content Sections */
.content-section {
    display: none;
    animation: fadeIn 0.3s ease-in;
}

.content-section.active {
    display: block;
}

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

/* Section Headers */
.section-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 3px solid #2B8000;
}

.section-header h1 {
    font-size: 2.5rem;
    font-weight: 600;
    color: #4B286D;
    margin-bottom: 0.5rem;
}

.section-description {
    font-size: 1.1rem;
    color: #555;
    margin: 0;
    line-height: 1.7;
}

/* Cards */
.card {
    background: white;
    border-radius: 12px;
    padding: 2.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #d8d8d8;
    border-left: 4px solid #4B286D;
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(75, 40, 109, 0.15);
    border-left-color: #2B8000;
}

.card h2 {
    font-size: 1.8rem;
    font-weight: 600;
    color: #4B286D;
    margin-bottom: 1.5rem;
    border-bottom: 3px solid #2B8000;
    padding-bottom: 0.75rem;
}

.card h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #4B286D;
    margin-bottom: 1rem;
}

.card h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #4B286D;
    margin-bottom: 0.5rem;
}

.card p {
    color: #555;
    margin-bottom: 1.5rem;
    line-height: 1.7;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
}

.card p:last-child {
    margin-bottom: 0;
}

/* Feature Grid */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.feature-card {
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
    padding: 1.5rem;
    border-radius: 10px;
    text-align: center;
    border: 1px solid #e2e8f0;
    transition: transform 0.2s ease;
}

.feature-card:hover {
    transform: translateY(-4px);
}

.feature-card i {
    font-size: 2.5rem;
    color: #4B286D;
    margin-bottom: 1rem;
}

.feature-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 0.5rem;
}

.feature-card p {
    font-size: 0.9rem;
    color: #64748b;
    margin: 0;
}

/* Feature List */
.feature-list {
    list-style: none;
    margin-top: 1rem;
}

.feature-list li {
    padding: 0.75rem 0;
    border-bottom: 1px solid #f1f5f9;
    color: #4a5568;
}

.feature-list li:last-child {
    border-bottom: none;
}

.feature-list strong {
    color: #2d3748;
}

/* Feature Items */
.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid #f1f5f9;
}

.feature-item:last-child {
    border-bottom: none;
}

.feature-item i {
    color: #4B286D;
    font-size: 1.25rem;
    margin-top: 0.25rem;
    min-width: 20px;
}

.feature-item div h4 {
    margin-bottom: 0.25rem;
}

.feature-item div p {
    margin: 0;
    font-size: 0.9rem;
}

/* Browser Grid */
.browser-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.browser-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.browser-item i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: #4a5568;
}

.browser-item span {
    font-size: 0.9rem;
    font-weight: 500;
    color: #2d3748;
}

/* Step Container */
.step-container {
    margin-top: 1.5rem;
}

.step {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #f1f5f9;
}

.step:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.step-number {
    background: #4B286D;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1.1rem;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(75, 40, 109, 0.3);
}

.step-content h3 {
    margin-bottom: 0.5rem;
    color: #2d3748;
}

.step-content p {
    margin: 0;
    color: #4a5568;
}

.step-content a {
    color: #667eea;
    text-decoration: none;
    word-break: break-all;
}

.step-content a:hover {
    text-decoration: underline;
}

/* Verification Steps */
.verification-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.verification-step {
    background: #f8fafc;
    padding: 1.5rem;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
}

.verification-step h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    color: #2d3748;
}

.verification-step i {
    color: #667eea;
}

.verification-step ul {
    list-style: none;
    margin: 0;
}

.verification-step li {
    padding: 0.25rem 0;
    color: #4a5568;
    position: relative;
    padding-left: 1.5rem;
}

.verification-step li::before {
    content: "•";
    color: #667eea;
    position: absolute;
    left: 0;
}

/* Numbered List */
.numbered-list {
    margin-top: 1rem;
    padding-left: 1.5rem;
}

.numbered-list li {
    margin-bottom: 0.5rem;
    color: #4a5568;
}

/* Alerts */
.alert {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin: 1.5rem 0;
}

.alert i {
    font-size: 1.25rem;
    margin-top: 0.125rem;
    flex-shrink: 0;
}

.alert-info {
    background: #ebf8ff;
    border: 1px solid #bee3f8;
    color: #2b6cb0;
}

.alert-info i {
    color: #3182ce;
}

.alert-warning {
    background: #fffbeb;
    border: 1px solid #fed7aa;
    color: #c05621;
}

.alert-warning i {
    color: #dd6b20;
}

/* Records Grid */
.records-grid,
.measurement-grid,
.vitals-grid,
.logs-grid,
.health-history-grid,
.preferences-grid,
.device-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.record-type,
.measurement-item,
.vital-item,
.log-item,
.history-item,
.preference-item,
.device-item {
    background: #f8fafc;
    padding: 1.5rem;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    text-align: center;
    transition: transform 0.2s ease;
}

.record-type:hover,
.measurement-item:hover,
.vital-item:hover,
.log-item:hover,
.history-item:hover,
.preference-item:hover,
.device-item:hover {
    transform: translateY(-2px);
}

.record-type i,
.measurement-item i,
.vital-item i,
.log-item i,
.history-item i,
.preference-item i,
.device-item i {
    font-size: 2rem;
    color: #4B286D;
    margin-bottom: 1rem;
}

.record-type h3,
.measurement-item h4,
.vital-item h4,
.log-item h4,
.history-item h4,
.preference-item h4,
.device-item h4 {
    margin-bottom: 0.5rem;
    color: #2d3748;
}

.record-type p,
.measurement-item p,
.vital-item p,
.log-item p,
.history-item p,
.preference-item p,
.device-item p {
    margin: 0;
    color: #64748b;
    font-size: 0.9rem;
}

/* File Types */
.file-types {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1rem 0;
}

.file-type {
    background: #4B286D;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* FAQ Styles */
.faq-container {
    margin-top: 1rem;
}

.faq-category {
    margin-bottom: 2rem;
}

.faq-category h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e2e8f0;
}

.faq-item {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    overflow: hidden;
    transition: box-shadow 0.2s ease;
}

.faq-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    cursor: pointer;
    background: #f8fafc;
    transition: background-color 0.2s ease;
}

.faq-question:hover {
    background: #f1f5f9;
}

.faq-question h3 {
    font-size: 1.1rem;
    font-weight: 500;
    color: #2d3748;
    margin: 0;
}

.faq-question i {
    color: #667eea;
    transition: transform 0.2s ease;
}

.faq-item.active .faq-question i {
    transform: rotate(180deg);
}

.faq-answer {
    padding: 0 1.5rem;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item.active .faq-answer {
    padding: 1.5rem;
    max-height: 500px;
}

.faq-answer p {
    color: #4a5568;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.faq-answer p:last-child {
    margin-bottom: 0;
}

.faq-answer ol {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.faq-answer li {
    margin-bottom: 0.5rem;
    color: #4a5568;
}

/* Troubleshooting Styles */
.troubleshooting-item {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.troubleshooting-item h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    color: #2d3748;
}

.troubleshooting-item i {
    color: #f56565;
}

.troubleshooting-item p {
    color: #4a5568;
    margin-bottom: 1rem;
}

.troubleshooting-item ul {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.troubleshooting-item li {
    margin-bottom: 0.5rem;
    color: #4a5568;
}

.solution-steps {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    margin-top: 1rem;
    border: 1px solid #e2e8f0;
}

.solution-steps h4 {
    color: #2d3748;
    margin-bottom: 1rem;
}

.solution-steps ol {
    margin: 0;
    padding-left: 1.5rem;
}

.solution-steps li {
    margin-bottom: 0.75rem;
    color: #4a5568;
    line-height: 1.6;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .sidebar {
        width: 260px;
    }
    
    .main-content {
        margin-left: 260px;
        max-width: calc(100vw - 260px);
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
        max-width: 100vw;
        padding: 1rem;
    }
    
    .section-header h1 {
        font-size: 2rem;
    }
    
    .feature-grid {
        grid-template-columns: 1fr;
    }
    
    .browser-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .step {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .step-number {
        align-self: flex-start;
    }
    
    .verification-steps {
        grid-template-columns: 1fr;
    }
    
    .records-grid,
    .measurement-grid,
    .vitals-grid,
    .logs-grid,
    .health-history-grid,
    .preferences-grid,
    .device-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .card {
        padding: 1.5rem;
    }
    
    .section-header {
        padding-bottom: 0.75rem;
    }
    
    .section-header h1 {
        font-size: 1.75rem;
    }
    
    .browser-grid {
        grid-template-columns: 1fr;
    }
    
    .file-types {
        justify-content: center;
    }
    
    .alert {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .alert i {
        align-self: flex-start;
    }
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 1001;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.75rem;
    font-size: 1.25rem;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }
}

/* Scrollbar Styling */
.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* Print Styles */
@media print {
    .sidebar,
    .mobile-menu-toggle {
        display: none;
    }
    
    .main-content {
        margin-left: 0;
        max-width: 100%;
    }
    
    .card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    .content-section {
        display: block !important;
    }
    
    .section-header {
        break-after: avoid;
    }
}

/* Focus Styles for Accessibility */
.nav-link:focus,
.search-input:focus,
.faq-question:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* Animation for smooth transitions */
.card,
.feature-card,
.record-type,
.measurement-item,
.vital-item,
.log-item,
.history-item,
.preference-item,
.device-item,
.troubleshooting-item {
    transition: all 0.2s ease;
}

/* Loading animation */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.loading {
    animation: pulse 2s infinite;
}
