* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
html{
    height: 100%;
}
:root {
    --background-color: #ffffff;
    --text-color: #000000;
    --stats-color: rgba(0, 0, 0, 0.6);
    --shadow-color: rgba(0, 0, 0, 0.1);
    --social-shadow-color: rgba(0, 0, 0, 0.3);
    --button-bg-color: #4CAF50;
    --button-hover-bg-color: #45a049;
    --link-color: rgba(0, 0, 155, 0.9);
    --input-border-color: #ccc;
    --blog-container:  #ffffff;
    --input-bg-color: #fff;
}
.dark-mode {
    --background-color: rgba(0, 0, 0, 0.8);
    --text-color: #ffffff;
    --stats-color: rgba(255, 255, 255, 0.6);
    --shadow-color: rgba(255, 255, 255, 0.1);
    --social-shadow-color: rgba(255, 255, 255, 0.3);
    --button-bg-color: #3498db;
    --button-hover-bg-color: #2980b9;
    --link-color: rgba(0, 155, 255, 0.9);
    --input-border-color: #ddd;
    --blog-container:  rgba(0,0,0,0.2);
    --input-bg-color: rgba(0,0,0,0.2);
}
body {
    font-family: Arial, sans-serif;
    transition: background-color 0.3s, color 0.3s;
    display: flex;
    flex-direction: column;
    background-color: var(--background-color);
    color: var(--text-color);
    min-height: 100vh;
    min-width: 99vw;
}
button {
    transition: background-color 0.3s ease;
}
.header{
    min-height: 20vh;
}
.footer{
    min-height: 20vh;
}
.main{
    min-height: 60vh;
}
.container {
    display: flex;
    flex-direction: row;
    gap: 20px;
    padding: 20px;
    justify-content: space-between;
    align-items: start;
    min-width: 99vw;
}
aside {
    padding: 20px;
    flex: 1 1 20%;
    border-radius: 8px;
}
.left, .right {
    margin-left: 1.5rem;
}
h2 {
    margin-bottom: 15px;
}
.main {
    padding: 20px;
    flex: 1 1 70%;
    border-radius: 8px;
}
input[type="email"] {
    padding: 10px;
    width: 80%;
    margin-bottom: 10px;
    border: 1px solid  var(--input-border-color);
    border-radius: 5px;
}
button {
    padding: 10px 15px;
    border: none;
    color: white;
    border-radius: 5px;
    cursor: pointer;
}
button:hover {
    background-color: var(--button-hover-bg-color);
}
@media (max-width: 768px) {
    .container {
        flex-direction: column;
        align-items: center;
    }
    aside, .main {
        flex: 1 1 100%;
        margin-bottom: 20px;
    }
    .main {
        margin-bottom: 40px;
    }
}
@media (max-width: 480px) {
    h2 {
        font-size: 18px;
    }
    input[type="email"], button {
        width: 100%;
    }
}
#social-icons {
    background-color: rgba(255, 255, 252, 0.8);
    border-radius: 18px;
    height: max-content;
    width: max-content;
    border: 2mm ridge rgb(123, 170, 243);
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 10px;
    justify-self: right;
    box-shadow: 6px 6px 10px rgba(0, 0, 0, 0.3);
}
.svg-social {
    height: 35px;
    width: 35px;
}
#subscribe-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color:  var(--input-bg-color);
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 10px var(--shadow-color);
    width: 250px;
    margin: 2px;
}
#subscribe-container h3 {
    display: flex;
    justify-content: center;
    font-size: 18px;
    padding: 6px 0 10px 0;
    color: var(--text-color);
    width: 100%;
}
#subscribe-container input {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid var(--input-border-color);
    border-radius: 5px;
    font-size: 14px;
    color: var(--text-color);
}
#subscribe-container input::placeholder {
    color: #888;
}
#subscribe-container button {
    background-color: #3498db;
    color: white;
    padding: 12px 20px;
    border: none;
    border-radius: 5px;
    width: 100%;
    cursor: pointer;
    transition: background-color 0.3s;
}
#subscribe-container button:hover {
    background-color: #2980b9;
}
#notification-svg {
    height: 25px;
    width: 25px;
    vertical-align: middle;
    margin-left: 8px;
}
.blogs-container{
    display: flex;
    flex-direction: column;
    justify-content: start;
    gap: 20px;
    min-width: 320px;
    padding: 1px;
}
.blog-content{
    display: flex;
    flex-direction: column;
    padding: 30px;
    gap: 10px;
    min-width: 320px;
    min-height: 200px;
    overflow: hidden;
    box-shadow: 0 4px 10px var(--shadow-color);
    border-radius: 20px;
    background-color: var(--blog-container);
}
.blog-title{
    font-size: 1.5rem;
    font-weight: bold;
}
.blog-stats-container {
    display: flex;
    justify-content: space-between;
    width: 100%;
    align-items: center;
    margin-top: -6px;
}
.blog-date {
    flex: 1;
    text-align: left;
    color: var(--stats-color);
}
.blog-stats {
    display: flex;
    gap: 20px;
    justify-content: flex-end;
    align-items: center;
}
.stat {
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--stats-color);
}
.stat img {
    height: 20px;
    width: 20px;
}
.blog-link{
    color: var(--link-color);
    text-align: start;
    cursor: pointer;
}

.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.85);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
}
.spinner {
    width: 60px;
    height: 60px;
    border: 8px solid #f3f3f3;
    border-top: 8px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
@media screen and (min-width: 320px) and (max-width: 770px) {
    body{
        width: 90vw;
    }
    .header{
        width: 99vw;
    }
    .left{
        width: 80vw;
    }
    .blogs-container{
        width: 81vw;
        padding: 10px;
    }
    .container {
        width: 90vw;
        flex-direction: column;
        gap: 30px;
        justify-content: center;
        align-items: center;
    }
    .container .left {
        order: 1;
        display: flex;
        flex-direction: row;
        justify-content: center;
        gap: 15px;
        padding: 10px 0;
        /*border-bottom: 2px solid #ccc;*/
    }
    .container .left #social-icons {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 12px;
    }
    .container .left a img {
        width: 40px;
        height: 40px;
        transition: transform 0.3s;
    }
    .container .left a img:hover {
        transform: scale(1.1);
    }

    .container .main {
        order: 2;
        padding: 10px 5%;
    }

    .container .blog-title {
        font-size: 1.8rem;
        text-align: center;
    }

    .container .blog-summary {
        font-size: 1rem;
        line-height: 1.6;
    }

    .container .right {
        order: 3;
        padding: 15px;
        text-align: center;
    }

    .container #subscribe-container h3 {
        font-size: 1.4rem;
    }

    .container #emailInput,
    .container #subscribe-btn {
        width: 90%;
        max-width: 400px;
        margin: 0 auto;
    }

    .footer {
        padding: 20px 10px;
        font-size: 0.9rem;
        line-height: 1.5;
    }

    .footer a {
        font-size: 1rem;
    }

    button, a {
        transition: all 0.3s;
    }

    button:hover, a:hover {
        transform: scale(1.05);
    }
    #social-icons{
        flex-direction: unset;
    }
}
