/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

/* Navigation styles */
.top-nav {
    background-color: #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
}

.nav-left {
    display: flex;
    align-items: center;
}

.site-title {
    font-size: 1.5rem;
    font-weight: bold;
    color: #5c5c5c;
    margin-right: 2rem;
}

.nav-links a {
    color: #4b5563;
    text-decoration: none;
    margin-right: 1rem;
    font-size: 0.9rem;
}

.nav-links a:hover,
.nav-links a.active {
    color: #4b5563;
}

.notification-btn {
    background: none;
    border: none;
    cursor: pointer;
}

.notification-btn svg {
    width: 1.5rem;
    height: 1.5rem;
    color: #4b5563;
}

/* Main content styles */
main {
    padding: 2rem 1rem;
}

.container {
    max-width: 800px;
    margin: 0 auto;
}

.login-section,
.discount-section,
.subscribe-section,
.subscriptions-section {
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    margin-bottom: 2rem;
}

h1 {
    font-size: 1.8rem;
    color: #5c5c5c;
    margin-bottom: 1rem;
    text-align: center;
}

h2 {
    font-size: 1.4rem;
    color: #5c5c5c;
    margin-bottom: 1rem;
}

/* Form styles */
#loginForm,
#createForm,
#subscribeForm {
    display: flex;
    gap: 0.5rem;
}

#discount-table td {
    padding: 0em 0.5em;
}

input[type="url"] {
    flex-grow: 1;
    padding: 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 1rem;
}

button[type="submit"] {
    background-color: #5c5c5c;
    color: #ffffff;
    border: none;
    border-radius: 4px;
    padding: 0.5rem 1rem;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

button[type="submit"]:hover {
    background-color: #5c5c5c;
}

/* Subscriptions list styles */
#discountsContainer,
#subscriptionsContainer {
    list-style-type: none;
}

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

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

.delete-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #ef4444;
}

.delete-btn svg {
    width: 1.25rem;
    height: 1.25rem;
}

.empty-message {
    text-align: center;
    color: #6b7280;
    font-style: italic;
}

/* Responsive design */
@media (max-width: 640px) {
    .nav-container {
        flex-direction: column;
        align-items: flex-start;
    }

    .nav-left {
        margin-bottom: 1rem;
    }

    .nav-links {
        margin-top: 0.5rem;
    }

    #subscribeForm {
        flex-direction: column;
    }

    button[type="submit"] {
        width: 100%;
        margin-top: 0.5rem;
    }
}

.spinner {
    width: 2em;
    height: 2em;
    border: 0.2em solid #f3f3f3;
    border-top: 0.2em solid #5c5c5c;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

#login-name {
    color: #000000;
    border:1px solid #367dff;
    border-radius: 4px;
    padding: 0.5rem 1rem;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#login-name:hover {
    color: #ffffff;
    background-color: #367dff;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

body {
    margin: 0;
    font-family: sans-serif;
  }
  
  .user-menu {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 1000;
  }
  
  .avatar {
    width: 40px;
    height: 40px;
    background-color: #2563eb; /* blue-600 */
    color: white;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 9999px;
    cursor: pointer;
  }
  
  .dropdown {
    margin-top: 8px;
    background-color: white;
    border: 1px solid #ccc;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    width: 150px;
    position: absolute;
    right: 0;
  }
  
  .dropdown ul {
    list-style: none;
    padding: 0;
    margin: 0;
  }
  
  .dropdown li a {
    display: block;
    padding: 10px 16px;
    color: #333;
    text-decoration: none;
  }
  
  .dropdown li a:hover {
    background-color: #f0f0f0;
  }
  
  .hidden {
    display: none;
  }
  