* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', 'Yu Gothic', 'Meiryo', sans-serif;
    background: radial-gradient(ellipse at bottom, #0d1b2a 0%, #1b263b 50%, #0f172a 100%);
    min-height: 100vh;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    position: relative;
}

/* Background stars animation */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(2px 2px at 20px 30px, rgba(255,255,255,0.3), transparent),
        radial-gradient(2px 2px at 40px 70px, rgba(255,255,255,0.2), transparent),
        radial-gradient(1px 1px at 90px 40px, rgba(255,255,255,0.5), transparent),
        radial-gradient(1px 1px at 130px 80px, rgba(255,255,255,0.3), transparent),
        radial-gradient(2px 2px at 160px 30px, rgba(255,255,255,0.4), transparent);
    background-repeat: repeat;
    background-size: 200px 100px;
    animation: twinkle 3s infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 0.4; }
}

/* ヘッダースタイル */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 12px 0;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.header-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 20px;
    font-weight: 600;
    color: white;
    text-decoration: none;
    font-size: 1.1rem;
    transition: color 0.3s ease;
}

.header-link:hover {
    color: #60a5fa;
}

.header-logo {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.container {
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(12px);
    border-radius: 20px;
    padding: 40px;
    max-width: 800px;
    width: 100%;
    box-shadow: 
        0 0 0 1px rgba(255, 255, 255, 0.05),
        0 25px 50px -12px rgba(0, 0, 0, 0.25),
        0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(59, 130, 246, 0.2);
    position: relative;
    z-index: 1;
    margin-top: 80px;
}

h1 {
    color: #f1f5f9;
    margin-bottom: 10px;
    font-size: 28px;
    text-align: center;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.3), 0 4px 6px rgba(0, 0, 0, 0.5);
}

.subtitle {
    color: rgba(241, 245, 249, 0.8);
    text-align: center;
    margin-bottom: 30px;
    font-size: 14px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.section {
    margin-bottom: 30px;
}

.section-title {
    color: #f1f5f9;
    font-size: 18px;
    margin-bottom: 10px;
    font-weight: 600;
}

.file-upload {
    border: 3px dashed rgba(59, 130, 246, 0.5);
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    background: rgba(15, 23, 42, 0.5);
}

.file-upload:hover {
    border-color: rgba(96, 165, 250, 0.7);
    background: rgba(15, 23, 42, 0.7);
}

.file-upload.dragover {
    border-color: rgba(96, 165, 250, 0.7);
    background: rgba(15, 23, 42, 0.7);
}

.file-upload-icon {
    font-size: 48px;
    margin-bottom: 10px;
}

.file-input {
    display: none;
}

.file-name {
    margin-top: 10px;
    color: #60a5fa;
    font-weight: 600;
}

textarea {
    width: 100%;
    min-height: 150px;
    padding: 15px;
    border: 2px solid rgba(59, 130, 246, 0.4);
    border-radius: 10px;
    font-size: 14px;
    font-family: 'Courier New', monospace;
    resize: vertical;
    transition: border-color 0.3s;
    background: rgba(15, 23, 42, 0.7);
    color: #f1f5f9;
}

textarea:focus {
    outline: none;
    border-color: rgba(96, 165, 250, 0.7);
}

textarea::placeholder {
    color: rgba(241, 245, 249, 0.4);
}

.textarea-hint {
    color: rgba(241, 245, 249, 0.6);
    font-size: 12px;
    margin-top: 5px;
}

.preview {
    background: rgba(15, 23, 42, 0.5);
    border-radius: 10px;
    padding: 15px;
    margin-top: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.preview-title {
    font-size: 14px;
    color: #60a5fa;
    font-weight: 600;
    margin-bottom: 10px;
}

.preview-list {
    font-size: 13px;
    color: rgba(241, 245, 249, 0.8);
    max-height: 150px;
    overflow-y: auto;
}

.preview-item {
    padding: 5px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.preview-item:last-child {
    border-bottom: none;
}

.preview-item.duplicate {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    font-weight: 600;
    border-left: 3px solid #f87171;
    padding-left: 8px;
}

.duplicate-warning {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.4);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 10px;
    color: #f87171;
    font-size: 13px;
    font-weight: 600;
}

.btn-container {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 15px;
    margin-top: 30px;
}

button {
    flex: 1;
    padding: 15px 30px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.8), rgba(37, 99, 235, 0.8));
    color: white;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(59, 130, 246, 0.4);
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.9), rgba(37, 99, 235, 0.9));
}

.btn-secondary {
    background: rgba(51, 65, 85, 0.6);
    color: #f1f5f9;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-secondary:hover:not(:disabled) {
    background: rgba(51, 65, 85, 0.8);
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.status {
    margin-top: 20px;
    padding: 15px;
    border-radius: 10px;
    text-align: center;
    font-weight: 600;
}

.status.success {
    background: rgba(34, 197, 94, 0.2);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.status.error {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.status.info {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.count-badge {
    display: inline-block;
    background: rgba(59, 130, 246, 0.8);
    color: white;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 12px;
    margin-left: 10px;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

@media (max-width: 600px) {
    .container {
        padding: 20px;
    }

    h1 {
        font-size: 24px;
    }

    .btn-container {
        grid-template-columns: 1fr;
    }
}
