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

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

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.header {
    text-align: center;
    margin-bottom: 40px;
    color: white;
}

.header h1 {
    font-size: 3rem;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.header p {
    font-size: 1.2rem;
    opacity: 0.9;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.15);
}

.card h3 {
    margin-bottom: 20px;
    color: #4a5568;
    font-size: 1.3rem;
}

.clock {
    font-size: 2.5rem;
    font-weight: bold;
    color: #2d3748;
    margin-bottom: 10px;
    font-family: 'Courier New', monospace;
}

.date {
    font-size: 1.1rem;
    color: #718096;
}

.color-display {
    width: 100%;
    height: 80px;
    border-radius: 10px;
    margin-bottom: 15px;
    border: 2px solid #e2e8f0;
    transition: all 0.3s ease;
}

.color-code {
    margin-top: 10px;
    font-family: monospace;
    font-weight: bold;
    color: #4a5568;
}

.counter {
    font-size: 3rem;
    font-weight: bold;
    text-align: center;
    color: #2d3748;
    margin-bottom: 20px;
}

.btn {
    background: #4299e1;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn:hover {
    background: #3182ce;
    transform: translateY(-2px);
}

.btn-primary {
    background: #48bb78;
}

.btn-primary:hover {
    background: #38a169;
}

.btn-secondary {
    background: #ed8936;
}

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

.btn-outline {
    background: transparent;
    color: #4a5568;
    border: 2px solid #e2e8f0;
}

.btn-outline:hover {
    background: #f7fafc;
    border-color: #cbd5e0;
}

.btn-sm {
    padding: 8px 12px;
    font-size: 0.9rem;
}

.btn-group {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.calculator {
    display: grid;
    grid-template-columns: 1fr auto 1fr auto;
    gap: 10px;
    align-items: center;
    margin-bottom: 15px;
}

.calculator input,
.calculator select {
    padding: 10px;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    font-size: 1rem;
}

.calculator input:focus,
.calculator select:focus {
    outline: none;
    border-color: #4299e1;
}

.result {
    font-size: 1.5rem;
    font-weight: bold;
    color: #2d3748;
    text-align: center;
    padding: 10px;
    background: #f7fafc;
    border-radius: 8px;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#textInput {
    width: 100%;
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    margin-bottom: 15px;
}

#textInput:focus {
    outline: none;
    border-color: #4299e1;
}

.text-output {
    margin-top: 15px;
    padding: 15px;
    background: #f7fafc;
    border-radius: 8px;
    font-size: 1.2rem;
    font-weight: 500;
    color: #2d3748;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.info-grid {
    display: grid;
    gap: 15px;
}

.info-grid div {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background: #f7fafc;
    border-radius: 6px;
}

.footer {
    text-align: center;
    color: white;
    margin-top: 40px;
}

.footer p {
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.stats {
    display: flex;
    justify-content: center;
    gap: 30px;
    font-size: 0.95rem;
    opacity: 0.9;
}

@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .grid {
        grid-template-columns: 1fr;
    }
    
    .calculator {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .btn-group {
        flex-wrap: wrap;
    }
    
    .stats {
        flex-direction: column;
        gap: 10px;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card {
    animation: fadeIn 0.6s ease-out;
}

.card:nth-child(1) { animation-delay: 0.1s; }
.card:nth-child(2) { animation-delay: 0.2s; }
.card:nth-child(3) { animation-delay: 0.3s; }
.card:nth-child(4) { animation-delay: 0.4s; }
.card:nth-child(5) { animation-delay: 0.5s; }
.card:nth-child(6) { animation-delay: 0.6s; }