:root {
    --primary-color: #f39c12;
    --primary-hover: #e67e22;
    --bg-color: #0f0f0f;
    --card-bg: #1a1a1a;
    --text-color: #ffffff;
    --text-secondary: #a0a0a0;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

body.light-theme {
    --bg-color: #f5f5f5;
    --card-bg: #ffffff;
    --text-color: #2c3e50;
    --text-secondary: #7f8c8d;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    transition: background-color 0.3s ease;
}

.container {
    text-align: center;
    max-width: 600px;
    width: 100%;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease;
    margin-bottom: 80px;
}

.show-content {
    opacity: 1;
    transform: translateY(0);
}

.datetime-container {
    background: var(--card-bg);
    padding: 25px;
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: var(--shadow);
}

#time {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 5px;
}

#date {
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 400;
}

.theme-toggle {
    position: fixed;
    top: 20px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--card-bg);
    border: none;
    color: var(--primary-color);
    font-size: 1.3rem;
    cursor: pointer;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-toggle:hover {
    transform: rotate(180deg) scale(1.1);
    background: var(--primary-color);
    color: #ffffff;
    box-shadow: 0 6px 20px rgba(243, 156, 18, 0.4);
}

.theme-toggle:active {
    transform: rotate(180deg) scale(1.05);
}

.logo {
    width: 120px;
    height: 120px;
    margin: 0 auto 20px;
    border-radius: 50%;
    background: url('/public/img/RS.png') no-repeat center center/cover;
    box-shadow: var(--shadow);
    transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    cursor: pointer;
}

.logo:hover {
    transform: rotate(360deg) scale(1.1);
}

.logo:active {
    transform: rotate(360deg) scale(1.05);
}

h1 {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
}

h2 {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 30px;
    font-weight: 400;
}

.connect-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    flex-wrap: nowrap;
    margin: 30px 0;
}

.connect-container a {
    text-decoration: none;
}

.connect-icon {
    width: 70px;
    height: 70px;
    border-radius: 15px;
    background: var(--card-bg);
    box-shadow: var(--shadow);
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
}

.connect-icon:hover {
    transform: translateY(-5px);
    background: var(--primary-color);
    box-shadow: 0 8px 25px rgba(243, 156, 18, 0.4);
}

.connect-icon:active {
    transform: translateY(-3px) scale(0.98);
}

.connect-icon img {
    width: 35px;
    height: 35px;
    transition: transform 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.connect-icon:hover img {
    transform: rotate(360deg) scale(1.1);
}

.connect-icon:active img {
    transform: rotate(360deg) scale(1.05);
}

.refresh-button {
    margin-top: 20px;
    padding: 12px 30px;
    background: var(--primary-color);
    border: none;
    border-radius: 25px;
    color: #ffffff;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
    font-family: 'Poppins', sans-serif;
}

.refresh-button:hover {
    transform: translateY(-2px);
    background: var(--primary-hover);
    box-shadow: 0 6px 20px rgba(243, 156, 18, 0.4);
}

.refresh-button:active {
    transform: translateY(0);
}

.footer-connect {
    margin-top: 20px;
    display: flex;
    flex-direction: row;
    gap: 15px;
    align-items: center;
    justify-content: center;
}

.footer-connect a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 1.5rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--card-bg);
    box-shadow: var(--shadow);
}

.footer-connect a:hover {
    color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(243, 156, 18, 0.3);
}

.footer-connect i {
    font-size: 1.3rem;
}

footer {
    position: fixed;
    bottom: 20px;
    left: 0;
    right: 0;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
    z-index: 10;
}

footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

footer a:hover {
    color: var(--primary-hover);
}

.loader-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-color);
    z-index: 9999;
    transition: all 0.5s ease;
}

.loader {
    position: relative;
    width: 60px;
    height: 60px;
}

.loader::before,
.loader::after {
    content: '';
    position: absolute;
    border-radius: 50%;
}

.loader::before {
    width: 100%;
    height: 100%;
    background: rgba(243, 156, 18, 0.2); 
    animation: pulse 1.5s infinite ease-in-out;
}

.loader::after {
    width: 70%;
    height: 70%;
    background: var(--primary-color);
    top: 15%;
    left: 15%;    
    animation: pulse-inner 1.5s infinite ease-in-out;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.5;
    }
}

@keyframes pulse-inner {
    0%, 100% {
        transform: scale(1) rotate(0deg);
    }    
    50% {
        transform: scale(0.8) rotate(180deg);
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .theme-toggle {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
        top: 15px;
        right: 20px;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1rem;
    }
    
    .logo {
        width: 100px;
        height: 100px;
    }
    
    #time {
        font-size: 2rem;
    }
    
    .connect-container {
        gap: 12px;
    }
    
    .connect-icon {
        width: 65px;
        height: 65px;
    }
    
    .connect-icon img {
        width: 32px;
        height: 32px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 15px;
    }
    
    .container {
        margin-bottom: 70px;
    }
    
    .datetime-container {
        padding: 20px;
        margin-bottom: 25px;
    }
    
    #time {
        font-size: 1.8rem;
    }
    
    #date {
        font-size: 0.9rem;
    }
    
    .logo {
        width: 90px;
        height: 90px;
        margin-bottom: 15px;
    }
    
    h1 {
        font-size: 1.8rem;
        margin-bottom: 8px;
    }
    
    h2 {
        font-size: 0.95rem;
        margin-bottom: 25px;
    }
    
    .connect-container {
        gap: 10px;
    }
    
    .connect-icon {
        width: 60px;
        height: 60px;
    }
    
    .connect-icon img {
        width: 30px;
        height: 30px;
    }
    
    .refresh-button {
        padding: 10px 25px;
        font-size: 0.95rem;
    }
    
    .footer-connect {
        margin-top: 15px;
        gap: 12px;
    }
    
    .footer-connect a {
        width: 45px;
        height: 45px;
        font-size: 1.3rem;
    }
    
    .footer-connect i {
        font-size: 1.1rem;
    }
    
    footer {
        font-size: 0.85rem;
        bottom: 15px;
    }
}

@media (max-width: 360px) {
    h1 {
        font-size: 1.6rem;
    }
    
    h2 {
        font-size: 0.9rem;
    }
    
    .connect-icon {
        width: 55px;
        height: 55px;
    }
    
    .connect-icon img {
        width: 28px;
        height: 28px;
    }
}

@media (max-height: 600px) and (orientation: landscape) {
    body {
        padding: 10px;
        justify-content: flex-start;
        overflow-y: auto;
    }
    
    .container {
        margin: 20px 0 80px 0;
    }
    
    .datetime-container {
        padding: 15px;
        margin-bottom: 15px;
    }
    
    #time {
        font-size: 1.5rem;
    }
    
    #date {
        font-size: 0.85rem;
    }
    
    .logo {
        width: 70px;
        height: 70px;
        margin-bottom: 10px;
    }
    
    h1 {
        font-size: 1.5rem;
        margin-bottom: 5px;
    }
    
    h2 {
        font-size: 0.85rem;
        margin-bottom: 15px;
    }
    
    .connect-container {
        margin: 15px 0;
        gap: 8px;
    }
    
    .connect-icon {
        width: 50px;
        height: 50px;
    }
    
    .connect-icon img {
        width: 25px;
        height: 25px;
    }
    
    .refresh-button {
        margin-top: 15px;
        padding: 8px 20px;
        font-size: 0.9rem;
    }
    
    .footer-connect {
        margin-top: 15px;
        gap: 10px;
    }
    
    .footer-connect a {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }
    
    .footer-connect i {
        font-size: 1rem;
    }
    
    footer {
        position: relative;
        margin-top: 20px;
    }
}
