:root {
    --primary-color: #3F51B5;
    --secondary-color: #303F9F;
    --accent-color: #FFC107;
    --text-color: #333;
    --light-color: #f4f4f4;
    --dark-color: #333;
    --success-color: #66BB6A;
    --error-color: #F44336;
    --warning-color: #FF9800;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--light-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 20px;
    flex: 1;
}

header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: #fff;
    padding: 0;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.header-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 0;
}

.logo-container {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.logo-icon {
    font-size: 2.5rem;
    margin-right: 15px;
    color: var(--accent-color);
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

header h1 {
    margin: 0;
    font-size: 2.2rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

header p {
    font-size: 1.1rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 10px auto 0;
}

.main-nav {
    width: 100%;
    background-color: rgba(0,0,0,0.1);
    padding: 12px 0;
}

.nav-links {
    display: flex;
    justify-content: center;
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-links li {
    margin: 0 15px;
}

.nav-links a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    padding: 5px 0;
    position: relative;
    transition: all 0.3s ease;
}

.nav-links a:after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--accent-color);
    transition: width 0.3s ease;
}

.nav-links a:hover:after {
    width: 100%;
}

.nav-links a:hover {
    color: var(--accent-color);
}

main {
    padding: 40px 0;
}

.card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    padding: 30px;
    margin-bottom: 30px;
}

.btn {
    display: inline-block;
    background: var(--primary-color);
    color: #fff;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
    font-size: 16px;
    transition: background 0.3s ease;
}

.btn:hover {
    background: var(--secondary-color);
}

footer {
    background: var(--dark-color);
    color: #fff;
    text-align: center;
    padding: 20px 0;
    margin-top: auto;
}

.status-summary {
    text-align: center;
    padding: 30px;
    border-radius: 10px;
    margin-bottom: 30px;
    color: white;
}

.status-summary.online {
    background-color: var(--success-color);
}

.status-summary.offline {
    background-color: var(--error-color);
}

.status-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.status-message {
    font-size: 1.8rem;
    font-weight: bold;
    margin-bottom: 10px;
}

.status-details {
    font-size: 1.1rem;
    margin-bottom: 20px;
}

.response-time {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 5px 15px;
    margin-top: 10px;
}

.history-list {
    border: 1px solid #eee;
    border-radius: 5px;
    overflow-y: auto;
}

.history-item {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.status-badge {
    padding: 5px 10px;
    border-radius: 20px;
    color: white;
    font-size: 0.8rem;
}

.status-badge.online {
    background-color: var(--success-color);
}

.status-badge.offline {
    background-color: var(--error-color);
}

.timestamp {
    color: #888;
    font-size: 0.8rem;
}

.info-box {
    background: #f9f9f9;
    border-left: 4px solid var(--primary-color);
    padding: 15px;
    margin: 20px 0;
}

.info-box h3 {
    margin-bottom: 10px;
    color: var(--primary-color);
}

.info-box ul {
    margin-left: 20px;
}

.info-box li {
    margin-bottom: 5px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    padding: 20px;
    text-align: center;
}

.stat-card h3 {
    font-size: 1rem;
    color: #777;
    margin-bottom: 10px;
}

.stat-value {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 5px;
}

.stat-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.chart-container {
    position: relative;
    height: 300px;
    margin-bottom: 30px;
}

.section-title {
    margin-bottom: 20px;
    color: var(--primary-color);
    display: flex;
    align-items: center;
}

.section-title i {
    margin-right: 10px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: bold;
    margin-bottom: 20px;
}

.back-link i {
    margin-right: 5px;
}

.check-again {
    display: inline-flex;
    align-items: center;
    margin-left: 20px;
}

/* New compact design styles */
.status-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 20px;
    overflow: hidden;
}

.website-snapshot {
    padding: 15px;
    text-align: center;
    background: #f9f9f9;
    display: none; /* Hidden by default, shown on larger screens */
}

.website-preview {
    max-width: 100%;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}

.preview-placeholder {
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #eee;
    color: #999;
    font-size: 3rem;
}

.preview-placeholder i {
    opacity: 0.5;
}

.status-info {
    padding: 15px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    font-weight: bold;
    color: #666;
}

.info-value {
    text-align: right;
    color: #333;
}

.status-indicator {
    padding: 15px;
    border-radius: 10px;
    margin: 20px 0;
    color: white;
    font-weight: bold;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
}

.status-indicator.online {
    background-color: var(--success-color);
}

.status-indicator.offline {
    background-color: var(--error-color);
}

.status-indicator.forbidden {
    background-color: var(--warning-color);
}

.status-indicator.not-found {
    background-color: #9C27B0;
}

.status-indicator.server-error {
    background-color: #E91E63;
}

.status-indicator.timeout {
    background-color: #795548;
}

.status-badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 5px 10px;
    border-radius: 4px;
    margin-right: 15px;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.status-indicator.online .status-badge {
    background: rgba(255, 255, 255, 0.25);
}

.status-indicator.offline .status-badge {
    background: rgba(255, 255, 255, 0.25);
}

.status-indicator.forbidden .status-badge {
    background: rgba(255, 255, 255, 0.25);
}

.status-indicator.not-found .status-badge {
    background: rgba(255, 255, 255, 0.25);
}

.status-indicator.server-error .status-badge {
    background: rgba(255, 255, 255, 0.25);
}

.status-indicator.timeout .status-badge {
    background: rgba(255, 255, 255, 0.25);
}

.action-buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
}

.btn-light {
    background: #f0f0f0;
    color: #666;
}

.btn-secondary {
    background: #757575;
}

.btn-secondary:hover {
    background: #616161;
}

.desktop-only-content {
    display: block;
}

.compact-history {
    border: 1px solid #eee;
    border-radius: 5px;
    overflow: hidden;
}

.history-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.history-table th {
    background: #f9f9f9;
    padding: 8px 10px;
    text-align: left;
    font-weight: 600;
    color: #555;
    border-bottom: 1px solid #eee;
}

.history-table td {
    padding: 8px 10px;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
}

.history-table tr:last-child td {
    border-bottom: none;
}

.history-table tr.online {
    background-color: rgba(102, 187, 106, 0.05);
}

.history-table tr.offline {
    background-color: rgba(244, 67, 54, 0.05);
}

.status-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 5px;
}

.status-dot.online {
    background-color: var(--success-color);
}

.status-dot.offline {
    background-color: var(--error-color);
}

.status-dot.forbidden {
    background-color: var(--warning-color);
}

.status-dot.not-found {
    background-color: #9C27B0;
}

.status-dot.server-error {
    background-color: #E91E63;
}

.status-dot.timeout {
    background-color: #795548;
}

.history-table tr.online {
    border-left: 3px solid var(--success-color);
}

.history-table tr.offline {
    border-left: 3px solid var(--error-color);
}

.history-table tr.forbidden {
    border-left: 3px solid var(--warning-color);
}

.history-table tr.not-found {
    border-left: 3px solid #9C27B0;
}

.history-table tr.server-error {
    border-left: 3px solid #E91E63;
}

.history-table tr.timeout {
    border-left: 3px solid #795548;
}

.history-footer {
    padding: 10px;
    text-align: center;
    border-top: 1px solid #eee;
    background: #f9f9f9;
}

.btn-sm {
    padding: 5px 10px;
    font-size: 0.8rem;
}

.no-data {
    text-align: center;
    color: #888;
    padding: 15px !important;
}

/* Website Info Styles */
.website-info-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    margin-bottom: 25px;
}

.info-item {
    display: flex;
    padding: 10px 15px;
    background: #f9f9f9;
    border-radius: 6px;
    border-left: 3px solid var(--primary-color);
}

.related-websites {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.related-websites h3 {
    margin-bottom: 15px;
    color: #555;
}

.related-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.related-link {
    display: inline-block;
    padding: 8px 12px;
    background: #f0f0f0;
    border-radius: 4px;
    text-decoration: none;
    color: var(--primary-color);
    font-size: 0.9rem;
    transition: background 0.2s;
}

.related-link:hover {
    background: #e5e5e5;
}

.checking-status {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    font-weight: 500;
    color: var(--primary-color);
}

.checking-status i {
    margin-right: 10px;
    color: var(--primary-color);
}

/* Form styling */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.form-control {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
}

/* Status Checker styles */
.search-container {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
}

.search-container input {
    flex: 1;
}

.loader {
    display: none;
    text-align: center;
    margin: 30px 0;
}

.loader.show {
    display: block;
}

.spinner {
    border: 5px solid #f3f3f3;
    border-top: 5px solid var(--primary-color);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

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

.result-container {
    display: none;
    padding: 30px;
    border-radius: 10px;
    margin-bottom: 30px;
    color: white;
    text-align: center;
}

.result-container.show {
    display: block;
    animation: fadeIn 0.5s;
}

.result-container.online {
    background-color: var(--success-color);
}

.result-container.offline {
    background-color: var(--error-color);
}

.result-container.error {
    background-color: var(--warning-color);
}

.result-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.result-message {
    font-size: 1.8rem;
    font-weight: bold;
    margin-bottom: 10px;
}

.result-details {
    font-size: 1.1rem;
    margin-bottom: 20px;
}

.history-container {
    margin-top: 40px;
}

.history-title {
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.clear-history {
    font-size: 0.9rem;
    padding: 5px 10px;
    background: #f1f1f1;
    color: #666;
    border: none;
    border-radius: 3px;
    cursor: pointer;
}

.website-url {
    font-weight: bold;
}

/* Top websites grid */
.top-websites-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.top-websites-header i {
    margin-right: 10px;
    font-size: 1.8rem;
}

.top-websites-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.website-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border-radius: 5px;
    border: 1px solid #eee;
    transition: transform 0.2s, box-shadow 0.2s;
}

.website-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.website-card a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: bold;
}

.website-info {
    display: flex;
    align-items: center;
}

.status-icon {
    margin-right: 10px;
    font-size: 1.2rem;
}

.status-icon.online {
    color: var(--success-color);
}

.status-icon.offline {
    color: var(--error-color);
}

.website-status {
    font-size: 0.85rem;
    color: #777;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* FAQ Styles */
.faq-container {
    margin-top: 20px;
}

.faq-item {
    margin-bottom: 20px;
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
}

.faq-question {
    padding: 15px 20px;
    background-color: #f9f9f9;
    cursor: pointer;
    position: relative;
}

.faq-question h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-color);
    padding-right: 30px;
}

.faq-question::after {
    content: '\f107';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary-color);
    transition: transform 0.3s ease;
}

.faq-item.active .faq-question::after {
    transform: translateY(-50%) rotate(180deg);
}

.faq-answer {
    padding: 0 20px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-item.active .faq-answer {
    padding: 20px;
    max-height: 1000px;
}

.faq-answer p {
    margin-top: 0;
    margin-bottom: 15px;
}

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

.faq-answer ul, .faq-answer ol {
    margin-left: 20px;
    margin-bottom: 15px;
}

.faq-answer li {
    margin-bottom: 5px;
}

/* Responsive styles */
@media (max-width: 768px) {
    .card {
        padding: 20px;
    }

    .search-container {
        flex-direction: column;
        gap: 15px;
    }

    .history-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }

    .result-message {
        font-size: 1.5rem;
    }

    .top-websites-grid {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .status-message {
        font-size: 1.5rem;
    }

    /* Mobile header optimization */
    header {
        padding: 10px 0;
    }

    header h1 {
        font-size: 1.8rem;
        margin-bottom: 5px;
    }

    header p {
        font-size: 1rem;
    }

    main {
        padding: 20px 0;
    }

    .status-summary {
        padding: 20px;
    }

    /* Hide desktop content on mobile */
    .desktop-only-content {
        display: none;
    }

    /* Mobile header optimization */
    .header-container {
        padding: 15px 0 10px;
    }

    .logo-icon {
        font-size: 1.8rem;
        margin-right: 10px;
    }

    header h1 {
        font-size: 1.5rem;
    }

    header p {
        font-size: 0.9rem;
        margin-top: 5px;
    }

    .main-nav {
        padding: 8px 0;
        overflow-x: auto;
    }

    .nav-links {
        justify-content: flex-start;
        width: max-content;
        padding: 0 15px;
    }

    .nav-links li {
        margin: 0 10px;
    }

    .nav-links a {
        font-size: 0.85rem;
        white-space: nowrap;
    }

    .history-table th:nth-child(3),
    .history-table td:nth-child(3) {
        display: none;
    }
}

@media (min-width: 768px) {
    .website-snapshot {
        display: block;
    }

    .website-info-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
