* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Meiryo, sans-serif;
    background: radial-gradient(ellipse at bottom, #0d1b2a 0%, #1b263b 50%, #0f172a 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    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;
    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);
    padding: 40px;
    max-width: 600px;
    width: 100%;
    border: 1px solid rgba(59, 130, 246, 0.2);
    position: relative;
    z-index: 1;
    margin-top: 80px;
}

h1 {
    text-align: center;
    margin-bottom: 10px;
    font-size: 28px;
    color: #f1f5f9;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.3), 0 4px 6px rgba(0, 0, 0, 0.5);
}

.subtitle {
    text-align: center;
    color: rgba(241, 245, 249, 0.8);
    margin-bottom: 30px;
    font-size: 14px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.drop-zone {
    border: 3px dashed rgba(59, 130, 246, 0.6);
    border-radius: 15px;
    padding: 50px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(15, 23, 42, 0.5);
}

.drop-zone:hover {
    border-color: rgba(96, 165, 250, 0.8);
    background: rgba(15, 23, 42, 0.7);
}

.drop-zone.dragover {
    border-color: #60a5fa;
    background: rgba(30, 58, 138, 0.3);
    transform: scale(1.02);
}

.drop-zone-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.drop-zone-text {
    color: rgba(241, 245, 249, 0.9);
    font-size: 16px;
    margin-bottom: 10px;
}

.drop-zone-hint {
    color: rgba(241, 245, 249, 0.6);
    font-size: 13px;
}

input[type="file"] {
    display: none;
}

.file-info {
    display: none;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(8px);
    border-radius: 10px;
    padding: 20px;
    margin-top: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.file-info.show {
    display: block;
}

.file-name {
    font-weight: bold;
    color: #f1f5f9;
    margin-bottom: 10px;
    word-break: break-all;
}

.file-size {
    color: rgba(241, 245, 249, 0.7);
    font-size: 14px;
}

.convert-btn {
    width: 100%;
    background: linear-gradient(45deg, #3b82f6, #1e40af);
    color: white;
    border: none;
    border-radius: 10px;
    padding: 15px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    margin-top: 20px;
    transition: all 0.3s ease;
    display: none;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.convert-btn.show {
    display: block;
}

.convert-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.6);
    background: linear-gradient(45deg, #2563eb, #1d4ed8);
}

.convert-btn:active {
    transform: translateY(0);
}

.convert-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.progress-container {
    display: none;
    margin-top: 20px;
}

.progress-container.show {
    display: block;
}

.progress-bar {
    width: 100%;
    height: 30px;
    background: rgba(15, 23, 42, 0.5);
    border-radius: 15px;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6 0%, #1e40af 100%);
    width: 0%;
    transition: width 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 14px;
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.5);
}

.status-text {
    text-align: center;
    margin-top: 10px;
    color: rgba(241, 245, 249, 0.8);
    font-size: 14px;
}

.download-btn {
    display: none;
    width: 100%;
    background: linear-gradient(45deg, #10b981, #059669);
    color: white;
    border: none;
    border-radius: 10px;
    padding: 15px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    margin-top: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.download-btn.show {
    display: block;
}

.download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.6);
    background: linear-gradient(45deg, #059669, #047857);
}

.reset-btn {
    display: none;
    width: 100%;
    background: rgba(15, 23, 42, 0.6);
    color: rgba(241, 245, 249, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    padding: 12px;
    font-size: 14px;
    cursor: pointer;
    margin-top: 10px;
    transition: all 0.3s ease;
}

.reset-btn.show {
    display: block;
}

.reset-btn:hover {
    background: rgba(30, 41, 59, 0.7);
    border-color: rgba(255, 255, 255, 0.3);
}
