/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #000814;
    min-height: 100vh;
    color: #333;
    margin: 0;
    padding: 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0;
}

/* Header styles */
header {
    background: #000814;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
    border-bottom: 1px solid #333;
    position: relative;
}

.logo {
    width: 40px;
    height: 40px;
    background: #ffc300;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    font-weight: bold;
    font-size: 18px;
    color: #000814;
}

header h1 {
    color: white;
    font-size: 1.5rem;
    margin: 0;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

header h1 button {
    background: #ffc300;
    color: #000814;
    border: none;
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(255, 195, 0, 0.3);
}

header h1 button:hover {
    background: #e6b000;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 195, 0, 0.4);
}

header h1 button:active {
    transform: translateY(0);
    background: #cc9900;
}

header p {
    display: none;
}

.datetime-display {
    position: absolute;
    top: 15px;
    right: 20px;
    color: white;
    font-size: 0.9rem;
    font-weight: 500;
    text-align: right;
    line-height: 1.2;
}

#current-datetime {
    background: rgba(255, 255, 255, 0.1);
    padding: 8px 12px;
    border-radius: 8px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Main content */
main {
    /* background: white; */
    padding: 40px 20px;
    min-height: calc(100vh - 80px);
}

/* Websites grid */
.websites-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 10px;
    margin-top: 20px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* Website cards */
.website-card {
    background: white;
    border-radius: 8px;
    padding: 0;
    box-shadow: none;
    transition: all 0.3s ease;
    border: none;
    display: flex;
    flex-direction: column;
}

.website-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.661);
}

.website-card h3 {
    font-size: 20px;
    margin: 0;
    color: rgb(0, 0, 0);
    font-weight: 500;
    padding: 15px 20px;
    text-align: center;
    font-family: monospace;
}

.website-card p {
    display: none;
}

/* Buttons */
.redirect-btn, .add-btn {
    width: 100%;
    padding: 15px 20px;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: none;
    letter-spacing: normal;
    background: #e6b000;
    color: #000814;
    margin: 0;
}

.redirect-btn:hover, .add-btn:hover {
    background: #ffffff3b;
    transform: none;
}

.redirect-btn:active, .add-btn:active {
    background: #ff0000;
    color: white;
}

/* Add new website card */
.add-new {
    border: 2px dashed #ccc;
    background: #f8f9fa;
    border-radius: 8px;
}

.add-new:hover {
    border-color: #ffc300;
    background: #fff;
}

.add-new h3 {
    color: #666 !important;
}

.add-new .add-btn {
    background: #ffc300;
    color: #000814;
}

/* Mobile-first responsive design */
@media (max-width: 768px) {
    .container {
        padding: 0;
    }
    
    header {
        padding: 12px 15px;
    }
    
    header h1 {
        font-size: 1.3rem;
        gap: 10px;
    }
    
    header h1 button {
        font-size: 0.7rem;
        padding: 6px 12px;
        border-radius: 15px;
    }
    
    .datetime-display {
        top: 12px;
        right: 15px;
        font-size: 0.8rem;
        max-width: 120px;
    }
    
    #current-datetime {
        padding: 6px 10px;
        border-radius: 6px;
        text-align: center;
    }
    
    #current-datetime div:first-child {
        font-size: 0.75em;
        line-height: 1.1;
    }
    
    #current-datetime div:last-child {
        font-size: 0.7em;
    }
    
    .logo {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }
    
    main {
        padding: 20px 15px;
    }
    
    .websites-grid {
        grid-template-columns: 1fr;
        gap: 15px;
        margin-top: 15px;
    }
    
    .website-card h3 {
        font-size: 0.9rem;
        padding: 12px 15px;
    }
    
    .redirect-btn, .add-btn {
        padding: 12px 15px;
        font-size: 0.85rem;
    }
}

/* Extra small mobile devices */
@media (max-width: 480px) {
    .container {
        padding: 0;
    }
    
    header {
        padding: 10px 12px;
    }
    
    header h1 {
        font-size: 1.1rem;
        gap: 8px;
    }
    
    header h1 button {
        font-size: 0.65rem;
        padding: 5px 10px;
        border-radius: 12px;
    }
    
    .datetime-display {
        top: 10px;
        right: 12px;
        font-size: 0.7rem;
        max-width: 100px;
    }
    
    #current-datetime {
        padding: 5px 8px;
        border-radius: 5px;
        text-align: center;
    }
    
    #current-datetime div:first-child {
        font-size: 0.7em;
        line-height: 1.0;
    }
    
    #current-datetime div:last-child {
        font-size: 0.65em;
    }
    
    .logo {
        width: 30px;
        height: 30px;
        font-size: 14px;
    }
    
    main {
        padding: 15px 12px;
    }
    
    .websites-grid {
        gap: 12px;
    }
    
    .website-card h3 {
        font-size: 0.8rem;
        padding: 10px 12px;
    }
    
    .redirect-btn, .add-btn {
        padding: 10px 12px;
        font-size: 0.8rem;
    }
}

/* Touch-friendly interactions */
@media (hover: none) and (pointer: coarse) {
    .website-card:hover {
        transform: none;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.85);
        border-color: transparent;
    }
    
    .redirect-btn:hover, .add-btn:hover {
        transform: none;
    }
    
    .website-card:active {
        transform: scale(0.98);
        transition: transform 0.1s ease;
    }
    
    .redirect-btn:active, .add-btn:active {
        transform: scale(0.95);
        transition: transform 0.1s ease;
    }
}

/* Animation for page load */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.website-card {
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
    transform: translateY(30px);
}

.website-card:nth-child(1) { animation-delay: 0.1s; }
.website-card:nth-child(2) { animation-delay: 0.2s; }
.website-card:nth-child(3) { animation-delay: 0.3s; }
.website-card:nth-child(4) { animation-delay: 0.4s; }
.website-card:nth-child(5) { animation-delay: 0.5s; }
.website-card:nth-child(6) { animation-delay: 0.6s; }
.website-card:nth-child(7) { animation-delay: 0.7s; }
.website-card:nth-child(8) { animation-delay: 0.8s; }
.website-card:nth-child(9) { animation-delay: 0.9s; }
.website-card:nth-child(10) { animation-delay: 1.0s; }

/* Copy toast */
.copy-toast {
    position: fixed;
    left: 50%;
    bottom: 20px;
    transform: translateX(-50%) translateY(20px);
    background: rgba(0, 0, 0, 0.9);
    color: #fff;
    padding: 10px 14px;
    border-radius: 999px;
    font-size: 0.9rem;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.15);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
    z-index: 2000;
}

.copy-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.copy-toast.hide {
    opacity: 0;
    transform: translateX(-50%) translateY(20px);
}