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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

header {
    background: rgba(255, 255, 255, 0.95);
    padding: 2rem;
    text-align: center;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
}

header h1 {
    color: #667eea;
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

header p {
    color: #666;
    font-size: 1.1rem;
}

main {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.current-time {
    background: white;
    border-radius: 10px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.current-time h2 {
    color: #667eea;
    margin-bottom: 1.5rem;
}

.time-display {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.time-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.time-item label {
    font-weight: 500;
    color: #555;
}

.timestamp-value, .datetime-value {
    font-family: 'Courier New', monospace;
    font-size: 1.2rem;
    font-weight: bold;
    color: #667eea;
    padding: 0.5rem 1rem;
    background: #f8f9fa;
    border-radius: 5px;
    min-width: 200px;
}

.converter-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.converter-section {
    background: white;
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.converter-section h3 {
    color: #667eea;
    margin-bottom: 1.5rem;
    text-align: center;
}

.input-group {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    align-items: center;
}

.input-group input, .input-group select {
    flex: 1;
    padding: 0.8rem;
    border: 2px solid #e0e0e0;
    border-radius: 5px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.input-group input:focus, .input-group select:focus {
    outline: none;
    border-color: #667eea;
}

.output-group {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.output-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.output-item label {
    min-width: 120px;
    font-weight: 500;
    color: #555;
}

.output-item input {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    background: #f8f9fa;
    font-family: 'Courier New', monospace;
    font-size: 14px;
}

.primary-btn, .secondary-btn {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
    white-space: nowrap;
}

.primary-btn {
    background: #667eea;
    color: white;
}

.primary-btn:hover {
    background: #5a6fd8;
    transform: translateY(-2px);
}

.secondary-btn {
    background: #f5f5f5;
    color: #666;
}

.secondary-btn:hover {
    background: #e0e0e0;
}

.copy-btn {
    background: #764ba2;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s;
    white-space: nowrap;
}

.copy-btn:hover {
    background: #6a4190;
}

.copy-btn.copied {
    background: #4caf50;
}

.batch-converter {
    background: white;
    border-radius: 10px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.batch-converter h3 {
    color: #667eea;
    margin-bottom: 1.5rem;
}

.batch-converter textarea {
    width: 100%;
    min-height: 120px;
    padding: 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 5px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    resize: vertical;
    margin-bottom: 1rem;
}

.batch-controls {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    align-items: center;
}

.batch-output {
    position: relative;
}

.batch-output pre {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    padding: 1rem;
    min-height: 100px;
    overflow-x: auto;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    white-space: pre-wrap;
}

.batch-output .copy-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
}

.history {
    background: white;
    border-radius: 10px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.history h3 {
    color: #667eea;
    margin-bottom: 1rem;
}

.history-controls {
    margin-bottom: 1rem;
}

.history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid #f0f0f0;
}

.history-item:last-child {
    border-bottom: none;
}

.history-content {
    font-family: 'Courier New', monospace;
    font-size: 14px;
    color: #333;
}

.history-time {
    font-size: 12px;
    color: #999;
}

.no-history {
    text-align: center;
    color: #999;
    font-style: italic;
    padding: 2rem;
}

.features {
    background: white;
    border-radius: 10px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.features h3 {
    color: #667eea;
    margin-bottom: 1.5rem;
    text-align: center;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.feature-item {
    text-align: center;
}

.feature-item h4 {
    color: #333;
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.feature-item p {
    color: #666;
    line-height: 1.5;
}

footer {
    background: rgba(255, 255, 255, 0.95);
    padding: 2rem;
    text-align: center;
    margin-top: 3rem;
}

.ad-area {
    background: #f0f0f0;
    padding: 2rem;
    margin-bottom: 1rem;
    border-radius: 5px;
    border: 2px dashed #ccc;
}

@media (max-width: 768px) {
    .time-display, .converter-container {
        grid-template-columns: 1fr;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .input-group, .batch-controls {
        flex-direction: column;
    }
    
    .output-item {
        flex-direction: column;
        align-items: stretch;
    }
    
    .output-item label {
        min-width: auto;
        margin-bottom: 0.5rem;
    }
}