/* 
 * 图片链接查看器样式表
 * 提供响应式设计和现代UI界面
 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Helvetica Neue', Arial, sans-serif;
}

body {
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 900px;
    margin: 30px auto;
    padding: 20px;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

h1 {
    text-align: center;
    margin-bottom: 25px;
    color: #2c3e50;
}

h2 {
    margin: 15px 0;
    color: #2c3e50;
    font-size: 1.3rem;
}

.input-container {
    display: flex;
    margin-bottom: 20px;
}

input[type="text"] {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px 0 0 4px;
    font-size: 16px;
    outline: none;
    transition: border-color 0.3s;
}

input[type="text"]:focus {
    border-color: #3498db;
}

button {
    padding: 12px 20px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #2980b9;
}

.image-container {
    width: 100%;
    min-height: 300px;
    border: 2px dashed #ddd;
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}

.placeholder-text {
    color: #999;
    text-align: center;
}

.drag-hint {
    font-size: 0.9em;
    color: #3498db;
    display: block;
    margin-top: 5px;
}

.dragover {
    background-color: rgba(52, 152, 219, 0.1);
    border: 2px dashed #3498db;
}

#displayedImage {
    max-width: 100%;
    max-height: 500px;
    display: none;
    border-radius: 4px;
}

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

.history-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.history-item {
    width: calc(25% - 10px);
    position: relative;
    cursor: pointer;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s;
}

.history-item:hover {
    transform: translateY(-3px);
}

.history-item img {
    width: 100%;
    height: 100px;
    object-fit: cover;
}

.history-item .delete-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    background-color: rgba(255, 0, 0, 0.7);
    color: white;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s;
}

.history-item:hover .delete-btn {
    opacity: 1;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        margin: 10px;
        padding: 15px;
    }
    
    .history-item {
        width: calc(33.33% - 10px);
    }
}

@media (max-width: 480px) {
    .input-container {
        flex-direction: column;
    }
    
    input[type="text"] {
        border-radius: 4px;
        margin-bottom: 10px;
    }
    
    button {
        border-radius: 4px;
        width: 100%;
    }
    
    .history-item {
        width: calc(50% - 5px);
    }
}