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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu,
                 Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    height: 100vh;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.container {
    max-width: 800px;
    width: 100%;
    max-height: calc(100vh - 40px);
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    padding: 40px;
    display: flex;
    flex-direction: column;
}

h1 {
    color: #333;
    font-size: 32px;
    margin-bottom: 8px;
    text-align: center;
}

.subtitle {
    color: #666;
    text-align: center;
    margin-bottom: 30px;
    font-size: 14px;
}

.input-section {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

#urlInput {
    flex: 1;
    padding: 14px 18px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
}

#urlInput:focus {
    outline: none;
    border-color: #667eea;
}

#checkButton {
    padding: 14px 32px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

#checkButton:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

#checkButton:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.result {
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 30px;
    font-size: 15px;
    line-height: 1.6;
}

.result.hidden {
    display: none;
}

.result.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.result.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.history-section {
    margin-top: 40px;
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

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

h2 {
    color: #333;
    font-size: 24px;
}

.clear-btn {
    padding: 8px 16px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.3s;
}

.clear-btn:hover {
    background: #c82333;
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #b0b0b0 transparent;
}

.history-list::-webkit-scrollbar {
    width: 6px;
}

.history-list::-webkit-scrollbar-track {
    background: transparent;
}

.history-list::-webkit-scrollbar-thumb {
    background: #b0b0b0;
    border-radius: 3px;
}

.history-list::-webkit-scrollbar-thumb:hover {
    background: #888;
}

.empty-message {
    text-align: center;
    color: #999;
    padding: 40px;
    font-style: italic;
}

.history-item {
    padding: 16px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    transition: background 0.2s, box-shadow 0.2s;
}

.history-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.history-item.success:hover {
    background: #eefbef;
}

.history-item.error:hover {
    background: #fdeef0;
}

.history-item.success {
    background: #f8fff9;
    border-left: 4px solid #28a745;
}

.history-item.error {
    background: #fff8f8;
    border-left: 4px solid #dc3545;
}

.history-url {
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    word-break: break-all;
}

.history-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: #666;
}

.history-time {
    font-weight: 500;
}

.history-date {
    color: #999;
}

.recheck-btn {
    padding: 4px 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.recheck-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4);
}

@media (max-width: 600px) {
    .container {
        padding: 24px;
    }

    .input-section {
        flex-direction: column;
    }

    h1 {
        font-size: 24px;
    }

    .history-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .history-details {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
}
