/* Reset default margin & padding */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

/* Navigation Bar ------------------------------*/
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: #18453B;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    z-index: 1000;
}

.navbar ul {
    list-style: none;
    display: flex;
    gap: 20px;
}

.navbar ul li {
    display: inline;
}

.navbar ul li a {
    color: white;
    text-decoration: none;
    font-size: 18px;
}

.navbar ul li a:hover {
    text-decoration: underline;
}

/* Default link styles */
.navbar a {
    color: white;
    text-decoration: none;
}

/* Prevent visited links from turning purple */
.navbar a:visited {
    color: white;
}

/* Hover effect */
.navbar a:hover {
    color: white;
    text-decoration: underline;
}

/* Welcome Section ------------------------------*/
.welcome {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    background: black;
    color: white;
    font-size: 3rem;
    font-weight: bold;
}

.welcome1 {
    height: 20vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    text-align: center;
    background: black;
    color: white;
    font-size: 3rem;
    font-weight: bold;
    padding-top: 70px;
}

/* Full-screen center container */
.container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

.stock-card {
    width: 350px;
    height: 500px;
    background-color: #f0f0f0;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    box-shadow: 3px 3px 10px rgba(0, 0, 0, 0.1);
    padding: 20px;
    position: relative;
    transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
}

/* Position buttons at the bottom ------------------------------*/
.buttons {
    margin-top: auto;
    display: flex;
    gap: 12px;
    justify-content: center;
}

button {
    padding: 12px 20px;
    border: none;
    cursor: pointer;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    transition: all 0.3s ease-in-out;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Red Button */
button:first-child {
    background: linear-gradient(135deg, #ff4e50, #f53d3d);
    color: white;
    box-shadow: 0 4px 8px rgba(255, 78, 80, 0.3);
}

button:first-child:hover {
    background: linear-gradient(135deg, #ff3134, #e32b2b);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(255, 49, 52, 0.5);
}

/* Green Button */
button:last-child {
    background: linear-gradient(135deg, #4caf50, #2e8b57);
    color: white;
    box-shadow: 0 4px 8px rgba(76, 175, 80, 0.3);
}

button:last-child:hover {
    background: linear-gradient(135deg, #3e8e41, #247a45);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(62, 142, 65, 0.5);
}

/* Trash Bin Icon */
.trash-bin {
    position: absolute;
    bottom: -83vh;
    right: 65vw;
    padding: 10px;
    color: white;
    width: 25vw;
    height: 25vw;
    display: flex;
    justify-content: center;
    align-items: center;
}

.file {
    position: absolute;
    bottom: -83vh;
    right: 9vw;
    padding: 10px;
    color: white;
    width: 25vw;
    height: 25vw;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Enhanced Animation Classes */
.discard-animation {
    animation: swipeLeft 0.7s ease-out forwards;
}

.save-animation {
    animation: swipeRight 0.7s ease-out forwards;
}

/* Animation Keyframes */
@keyframes swipeLeft {
    0% {
        transform: translateX(0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateX(-300px) rotate(-15deg);
        opacity: 0;
    }
}

@keyframes swipeRight {
    0% {
        transform: translateX(0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateX(300px) rotate(15deg);
        opacity: 0;
    }
}

/* Add smooth transition back after animation */
.stock-card:not(.discard-animation):not(.save-animation) {
    transition: transform 0.3s ease-out, opacity 0.3s ease-out;
}

#discarded-list {
    color: white;
    font-size: 1.5rem;
    list-style-type: none;
    padding: 20px;
    text-align: center;
}
#saved-list {
    color: white;
    font-size: 1.5rem;
    list-style-type: none;
    padding: 20px;
    text-align: center;
}

/* Saved & Discarded Stocks Page Styling */
ul#saved-list, ul#discarded-list {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    max-width: 600px;
    margin: 50px auto;
}

ul#saved-list li, ul#discarded-list li {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    padding: 15px 20px;
    border-radius: 8px;
    margin: 20px 0;
    width: 100%;
    text-align: center;
    font-size: 1.5rem;
    font-weight: bold;
    box-shadow: 0 4px 8px rgba(255, 255, 255, 0.2);
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
}

ul#saved-list li:hover, ul#discarded-list li:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 12px rgba(255, 255, 255, 0.3);
}

ul#saved-list p, ul#discarded-list p {
    text-align: center;
    font-size: 1.2rem;
    opacity: 0.7;
}
