* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
}

body {
    background-color: #f8f9fa;
    color: #333;
    line-height: 1.6;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.container {
    max-width: 900px;
    width: 100%;
    background-color: white;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    padding: 30px;
    margin-top: 20px;
}

header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e9ecef;
}

h1 {
    color: #2c3e50;
    font-size: 2.5rem;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

h1 i {
    color: #3498db;
}

.subtitle {
    color: #7f8c8d;
    font-size: 1.1rem;
}

.color-display {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 30px;
    gap: 30px;
    flex-wrap: wrap;
}

.color-preview {
    width: 150px;
    height: 150px;
    border-radius: 16px;
    border: 5px solid white;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.color-preview:hover {
    transform: scale(1.03);
}

.color-info {
    flex: 1;
    min-width: 300px;
}

.current-hex {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.hex-actions {
    display: flex;
    gap: 10px;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 1rem;
}

.btn-primary {
    background-color: #3498db;
    color: white;
}

.btn-primary:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: #e9ecef;
    color: #495057;
}

.btn-secondary:hover {
    background-color: #dee2e6;
    transform: translateY(-2px);
}

.btn-small {
    padding: 6px 12px;
    font-size: 0.9rem;
}

.btn-success {
    background-color: #2ecc71;
    color: white;
}

.btn-success:hover {
    background-color: #27ae60;
}

.color-formats {
    margin-top: 30px;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

th {
    background-color: #f1f3f5;
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: #495057;
    border-bottom: 2px solid #dee2e6;
}

td {
    padding: 15px;
    border-bottom: 1px solid #e9ecef;
    vertical-align: middle;
}

tr:hover {
    background-color: #f8f9fa;
}

.color-name {
    font-weight: 600;
    width: 100px;
}

.color-value {
    font-family: 'Courier New', monospace;
    background-color: #f8f9fa;
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid #e9ecef;
    flex-grow: 1;
    word-break: break-all;
}

.actions-cell {
    width: 180px;
    text-align: right;
}

.color-row {
    display: flex;
    align-items: center;
    gap: 15px;
}

.copy-btn {
    background-color: #6c757d;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 8px 15px;
    cursor: pointer;
    transition: background-color 0.2s;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

.copy-btn:hover {
    background-color: #5a6268;
}

.copy-btn.copied {
    background-color: #2ecc71;
}

.case-toggle {
    background-color: #adb5bd;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 8px 15px;
    cursor: pointer;
    transition: background-color 0.2s;
    font-size: 0.9rem;
}

.case-toggle:hover {
    background-color: #868e96;
}

.instructions {
    background-color: #e8f4fc;
    border-left: 4px solid #3498db;
    padding: 15px 20px;
    margin-top: 30px;
    border-radius: 0 8px 8px 0;
}

.instructions h3 {
    color: #2c3e50;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.instructions p {
    margin-bottom: 8px;
    color: #34495e;
}

.footer {
    margin-top: 30px;
    text-align: center;
    color: #7f8c8d;
    font-size: 0.9rem;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
    width: 100%;
}

.notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #2ecc71;
    color: white;
    padding: 15px 25px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 10px;
}

.notification.show {
    transform: translateY(0);
    opacity: 1;
}

@media (max-width: 768px) {
    .container {
        padding: 20px;
    }

    h1 {
        font-size: 2rem;
    }

    .color-display {
        flex-direction: column;
        text-align: center;
    }

    .color-info {
        min-width: 100%;
    }

    .current-hex {
        justify-content: center;
        flex-wrap: wrap;
    }

    th,
    td {
        padding: 10px;
    }

    .actions-cell {
        width: 140px;
    }
}