* {
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
}

/* هدف هذا المحدد هو جعل جميع العناصر تظهر بنفس السمات الأساسية على جميع المتصفحات */
html,
body,
div,
span,
applet,
object,
iframe,
h1,
h2,
h3,
h4,
h5,
h6,
p,
blockquote,
pre,
a,
abbr,
acronym,
address,
big,
cite,
code,
del,
dfn,
em,
img,
ins,
kbd,
q,
s,
samp,
small,
strike,
strong,
sub,
sup,
tt,
var,
b,
u,
i,
center,
dl,
dt,
dd,
ol,
ul,
li,
fieldset,
form,
label,
legend,
table,
caption,
tbody,
tfoot,
thead,
tr,
th,
td,
article,
aside,
canvas,
details,
embed,
figure,
figcaption,
footer,
header,
hgroup,
menu,
nav,
output,
ruby,
section,
summary,
time,
mark,
audio,
video {
    margin: 0;
    padding: 0;
    border: 0;
    font: inherit;
    font-size: 100%;
    line-height: normal;
    vertical-align: baseline;
}

body {
    background-color: #999;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    min-height: 100vh;
    transition: background-image 0.5s ease-in-out;
}

.background-container {
    position: relative;
    min-height: 100vh;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.4);
    z-index: 1;
}

main {
    width: 480px;
    margin: 100px auto 0;
    position: relative;
    z-index: 2;
}

#search {
    padding: 30px 0;
}

input {
    -webkit-box-flex: 1;
    -ms-flex: 1 1 auto;
    flex: 1 1 auto;
    padding: 5px;
    /* font-size: 1.5em; */
    border-radius: 3px;
    border: 0;
}

input:first-child {
    margin-right: 5px;
    width: 100%;
    text-transform: capitalize;
}

input[type=submit] {
    background-color: #02AC0C;
    color: #fff;
    cursor: pointer;
    transition: 0.3s;
    padding: 6px 20px;
}

input[type=submit]:hover {
    background-color: #00C60C;
}

input[type=submit][disabled] {
    background-color: #6D80A4;
    color: rgba(255, 255, 255, .35);
    cursor: not-allowed;
}

.flex {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    margin-top: 10px;
}

.label {
    color: #fff;
    font-size: 1.5em;
    font-weight: 500;
    text-align: center;
    text-transform: capitalize;
}


#result {
    position: relative;
    width: 100%;
    padding: 10px 20px;
    background-color: rgba(9, 29, 60, 0.5);
    color: #FFF;
    display: none;
    border-radius: 5px;
}

h1 {
    font-size: 4em;
    font-weight: bold;
    text-shadow: 0 2px 2px #30415D;
}


h2 {
    color: #E1E1E1;
    margin: 15px 0 4px;
    font-weight: bold;
    font-size: 0.9em;
}

p {
    margin: 0;
    padding: 0;
}

#mainIcon {
    width: 75px;
    margin-right: 5px;
    vertical-align: middle;
}


.conditions {
    -webkit-box-align: center;
    -ms-flex-align: center;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    align-items: center;
    margin: 10px 0 50px;
    padding: 20px 0;
    border-top: 1px solid #ddd;
}

.conditions>li {
    -webkit-box-flex: 1;
    -ms-flex: 1 1 auto;
    flex: 1 1 auto;
    list-style: none;
}

.main {
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    display: -webkit-inline-box;
    display: -ms-inline-flexbox;
    display: inline-flex;
    flex-direction: column;
}

.main>p {
    text-transform: capitalize;
}

#mainTemp {
    height: 60px;
    font-size: 3em;
    text-transform: capitalize;
    vertical-align: middle;
}

footer {
    margin-top: 2rem;
    text-align: center;
    padding: 1rem;
    border-top: 1px solid #ccc;
}

.site-info {
    margin-bottom: 1rem;
}

.site-info h2 {
    color: #e0e0e0;
    margin-bottom: 0.5rem;
}

.site-info p {
    color: #d3d3d3;
    margin: 0.25rem 0;
}

a,
time {
    color: #AEAEAE;
}

footer>cite {
    display: block;
    text-align: left;
}

/* Mobile-friendly styles */
@media screen and (max-width: 600px) {
    main {
        width: 95%;
        margin: 20px auto 0;
        padding: 10px;
    }

    #search {
        padding: 15px 0;
    }

    .flex {
        flex-direction: column;
    }

    input:first-child {
        margin-right: 0;
        margin-bottom: 10px;
    }

    input[type=submit] {
        width: 100%;
        padding: 12px 20px;
        font-size: 16px;
    }

    #result {
        padding: 15px;
    }

    h1 {
        font-size: 2.5em;
    }

    #mainTemp {
        font-size: 2.5em;
    }

    .conditions {
        flex-wrap: wrap;
        gap: 15px;
        margin: 10px 0 30px;
    }

    .conditions > li {
        flex: 1 1 40%;
        text-align: center;
    }

    #mainIcon {
        width: 60px;
    }

    .site-info h2 {
        font-size: 1.5em;
    }

    .site-info p {
        font-size: 0.9em;
    }
}

/* Ensure touch targets are large enough on mobile */
@media (hover: none) {
    input, 
    input[type=submit] {
        min-height: 44px;
    }
}
