/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #121212;
    color: #ffffff;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

/* App Container */
.app-container {
    width: 90%;
    max-width: 600px;
    background-color: #1e1e1e;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Navigation */
.navbar {
    display: flex;
    background-color: #2c2c2c;
}

.nav-link {
    flex: 1;
    padding: 15px;
    background: none;
    border: none;
    color: #b3b3b3;
    font-size: 1.1rem;
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s;
}

.nav-link:hover {
    background-color: #3d3d3d;
}

.nav-link.active {
    color: #ffffff;
    background-color: #1e1e1e;
    border-bottom: 3px solid #ff4757;
}

/* Content Area & Views */
.content {
    padding: 40px 20px;
    min-height: 400px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.view {
    display: none; 
    width: 100%;
    text-align: center;
    animation: fadeIn 0.4s ease-in-out;
}

.view.active {
    display: block; 
}

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

/* Analog Clock Styles */
.clock-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
}

.clock-face {
    position: relative;
    width: 280px;
    height: 280px;
    border: 10px solid #ff4757;
    border-radius: 50%;
    background: #2a2a2a;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.5), 0 0 20px rgba(255, 71, 87, 0.2);
}

.hand {
    position: absolute;
    bottom: 50%;
    left: 50%;
    transform-origin: bottom center;
    background-color: #ffffff;
    border-radius: 10px;
    /* Center the hands precisely based on their own width */
    transform: translateX(-50%) rotate(0deg); 
    transition: transform 0.05s cubic-bezier(0.4, 2.08, 0.55, 0.44);
}

/* Specific Hand Dimensions */
.hour-hand {
    width: 8px;
    height: 30%;
    background-color: #ffffff;
    margin-left: -4px; /* Offset half the width to center perfectly */
}

.minute-hand {
    width: 4px;
    height: 40%;
    background-color: #a0a0a0;
    margin-left: -2px;
}

.second-hand {
    width: 2px;
    height: 45%;
    background-color: #ff4757;
    margin-left: -1px;
}

.center-dot {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    background-color: #ff4757;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 5px rgba(0,0,0,0.5);
}

/* Data View Styles */
.data-container {
    display: flex;
    flex-direction: column;
    gap: 25px;
    align-items: center;
}

.data-container h2 {
    font-size: 1.5rem;
    color: #ff4757;
}

.joke-text {
    font-size: 1.2rem;
    font-style: italic;
    line-height: 1.6;
    color: #e0e0e0;
    min-height: 60px;
}

.primary-btn {
    padding: 12px 24px;
    font-size: 1rem;
    background-color: #ff4757;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: transform 0.2s, background-color 0.2s;
}

.primary-btn:hover {
    background-color: #ff2a3f;
    transform: scale(1.05);
}

.primary-btn:active {
    transform: scale(0.95);
}

.primary-btn:disabled {
    background-color: #555;
    cursor: not-allowed;
    transform: scale(1);
}

/* Responsive */
@media (max-width: 480px) {
    .clock-face {
        width: 220px;
        height: 220px;
    }
    .joke-text { font-size: 1.1rem; }
}