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

body {
    font-family: 'Arial', sans-serif;
    background-color: #f0f0f0;
    color: #333;
    margin: 0;
    padding: 0;
    line-height: 1.6;
    text-align: center; /* Ensures everything stays centered */
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 16px 40px;
}

header {
    background-color: #333;
    color: #fff;
    padding: 20px;
}

header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
}

header p {
    font-size: 1.1em;
}

main {
    padding: 20px;
    max-width: 800px;
    margin: 30px auto;
}

.headline-section {
    background-color: #fff;
    padding: 30px;
    text-align: center;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.headline-section h2 {
    font-size: 2em;
    transition: color 0.5s ease, opacity 0.5s ease;
    opacity: 0;
}

.headline-section h2.show {
    opacity: 1;
}

.controls {
    text-align: center;
    margin-bottom: 30px;
}

.buttons {
    margin-bottom: 10px;
}

.buttons button,
.copy-headline button,
.theme-toggle button {
    padding: 10px 20px;
    margin: 10px;
    font-size: 1em;
    cursor: pointer;
    background-color: #333;
    color: #fff;
    border: none;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.buttons button:hover,
.copy-headline button:hover,
.theme-toggle button:hover {
    background-color: #555;
}

.counter {
    font-size: 1.1em;
    margin-top: 5px;
}

.social-share {
    text-align: center;
    margin: 20px 0;
}

.social-share h3 {
    margin-bottom: 15px;
}

.social-icon {
    margin: 0 15px;
    text-decoration: none;
    color: #1DA1F2;
    font-size: 1.1em;
}

.social-icon img {
    vertical-align: middle;
    width: 20px;
    height: 20px;
    margin-right: 5px;
}

.loader {
    font-size: 1.2em;
    display: none;
}

footer {
    background-color: #333;
    color: #fff;
    text-align: center;
    padding: 20px;
    margin-top: 50px;
}

/* Dark Mode */
body.dark-mode {
    background-color: #121212;
    color: #fff;
}

.container.dark-mode {
    background-color: #1e1e1e;
    color: #fff;
}

.headline-section.dark-mode {
    background-color: #2b2b2b;
    color: #fff;
    box-shadow: 0 4px 10px rgba(255, 255, 255, 0.1);
}

.buttons button.dark-mode,
.theme-toggle button.dark-mode,
.copy-headline button.dark-mode {
    background-color: #555;
    color: #fff;
}

footer.dark-mode {
    background-color: #1e1e1e;
}

/* Responsive Design */
@media (max-width: 768px) {
    header h1 {
        font-size: 2em;
    }

    .headline-section h2 {
        font-size: 1.7em;
    }

    .buttons button,
    .theme-toggle button,
    .copy-headline button {
        padding: 8px 16px;
        font-size: 0.9em;
    }

    .social-icon img {
        width: 18px;
        height: 18px;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.7em;
    }

    .headline-section h2 {
        font-size: 1.5em;
    }

    .buttons button,
    .theme-toggle button,
    .copy-headline button {
        padding: 7px 14px;
        font-size: 0.8em;
    }

    .social-icon img {
        width: 16px;
        height: 16px;
    }
}
